Preview

Practical Identification of Sql Injection Vulnerabilities

Powerful Essays
Open Document
Open Document
4315 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Practical Identification of Sql Injection Vulnerabilities
Practical Identification of SQL Injection Vulnerabilities
Chad Dougherty

Background and Motivation
The class of vulnerabilities known as SQL injection continues to present an extremely high risk in the current network threat landscape. In 2011, SQL injection was ranked first on the MITRE Common Weakness Enumeration (CWE)/SANS Top 25 Most Dangerous Software Errors list.1 Exploitation of these vulnerabilities has been implicated in many recent high-profile intrusions. Although there is an abundance of good literature in the community about how to prevent SQL injection vulnerabilities, much of this documentation is geared toward web application developers. This advice is of limited benefit to IT administrators who are merely responsible for the operation of targeted web applications. In this document, we will provide concrete guidance about using open source tools and techniques to independently identify common SQL injection vulnerabilities, mimicking the approaches of attackers at large. We highlight testing tools and illustrate the critical results of testing.

SQL Injection
Causes
Simply stated, SQL injection vulnerabilities are caused by software applications that accept data from an untrusted source (internet users), fail to properly validate and sanitize the data, and subsequently use that data to dynamically construct an SQL query to the database backing that application. For example, imagine a simple application that takes inputs of a username and password. It may ultimately process this input in an SQL statement of the form string query = "SELECT * FROM users WHERE username = " '" + username + " ' AND password = '" + password + " '";

Since this query is constructed by concatenating an input string directly from the user, the query behaves correctly only if password does not contain a single-quote character. If the user enters

1

http://cwe.mitre.org/top25/archive/2011/2011_cwe_sans_top25.html
1

© 2012 Carnegie Mellon University.



References: [1] The Open Web Application Security Project (OWASP). “SQL Injection.” Last updated December 6, 2011. Available from https://www.owasp.org/index.php/SQL_Injection (accessed June 28, 2012). [2] Provos, Niels. “Lizamoon SQL Injection Campaign Compared.” April 3,2011. Available from http://www.provos.org/index.php?/archives/92-Lizamoon-SQL-Injection-CampaignCompared.html (accessed June 28, 2012). [3] Hipolito, J. M. “LizaMoon, Etc. SQL Injection Attack Still Ongoing.” March 32, 2011. http://blog.trendmicro.com/lizamoon-etc-sql-injection-attack-still-on-going/ (accessed June 28, 2012). [4] US-CERT/NIST. National Vulnerability Database, CVE-2008-1982. Last revised March 11, 2011. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-1982 (accessed June 28, 2012). [5] US-CERT. “SQL Injection” [background paper]. 2009. Available from http://www.uscert.gov/reading_room/sql200901.pdf (accessed June 28, 2012). [6] The Open Web Application Security Project (OWASP). “Guide to SQL Injection” [SQLi avoidance]. Last modified September 6, 2010. https://www.owasp.org/index.php/Guide_to_SQL_Injection (accessed June 28, 2012). [7] The Open Web Application Security Project (OWASP). “SQL Injection Prevention Cheat Sheet.” Last modified March 29, 2012. https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet (accessed June 28, 2012). [8] Friedl, Steve. “SQL Injection Attacks by Example.” Last modified October 10, 2007. Available from http://www.unixwiz.net/techtips/sql-injection.html (accessed June 28, 2012). 15

You May Also Find These Documents Helpful

  • Good Essays

    When a client connects to the MySQL server, the server uses the username provided by the client and the client host to select the appropriate account row from the mysql.user table. It then uses this row to authenticate the client. Before MySQL 5.5.7, the server authenticates the password provided by the client against the Password column of the account row.…

    • 406 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Database administrators should monitor their SQL databases for unauthorized or abnormal SQL injections and write scripts for alarming as well as Simple Network Management Protocol (SNMP) alerts. Additional safeguards can be placed that include encrypting the data elements that reside in long-term storage of the SQL…

    • 575 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    SQL Slammer worm caused a denial of service on Internet host and slowed down general internet traffic. On January 25, 2003 it spread rapidly and infected 75,000 victims in ten minutes. The worm exploited the buffer overflow and would generate random IP addresses, send itself out to those addresses. If one of those addresses happens to belong to a host that is running an unpatched copy of Microsoft SQL Server Resolution Service, the host becomes infected and sprays the Internet with more copies of the worm.…

    • 499 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    - Any action that a database takes, creating objects, adding rows, changing data in rows, removing rows, and so on.…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    pt2520 unit 8

    • 287 Words
    • 1 Page

    When a client connects to the MySQL server, the server uses the username provided by the client and the client host to select the appropriate account row from the mysql.user table. It then uses this row to authenticate the client. Before MySQL 5.5.7, the server authenticates the password provided by the client against the Password column of the account row. As of MySQL 5.5.7, the server authenticates clients using plugins. Selection of the proper account row from the mysql.user table is based on the user name and client host, as before, but the server authenticates the client credentials as follows: The server determines from the account row which authentication plugin applies for the client. If the account row specifies no plugin name, the server uses native authentication; that is, authentication against the password stored in the Password column of the account row. This is the same authentication method provided by MySQL servers older than 5.5.7, before pluggable authentication was implemented, but now is implemented using two plugins that are built in and cannot be disabled. If the account row specifies a plugin, the server invokes it to authenticate the user. If the server cannot find the plugin, an error occurs. The plugin returns a status to the server indicating whether the user is permitted to connect.…

    • 287 Words
    • 1 Page
    Good Essays
  • Better Essays

    It255 Project Part 1

    • 634 Words
    • 3 Pages

    References: David Kim., and Michael G. Solomon. Fundamentals of Information Systems Security , 2012: Sudbury, MA 2012…

    • 634 Words
    • 3 Pages
    Better Essays
  • Satisfactory Essays

    Unit 6 True

    • 287 Words
    • 1 Page

    The * in SELECT * clause of an SQL statement is a wildcard for returning all columns in a table. TRUE…

    • 287 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Assignment

    • 533 Words
    • 3 Pages

    Organizations are under increased pressure to audit every action that a user performs within a database. This is due to increased focus on security, risk, accountability and avoidance of fraud and corruption. While security prevention measures (logins, firewalls, tokens etc.) are important to prevent unauthorized access to the data in the first place, as this survey shows, most breaches occur by users who are authorized but are either negligent or malicious.…

    • 533 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    unit 6

    • 360 Words
    • 2 Pages

    6) The * in SELECT * clause of an SQL statement is a wildcard for returning all columns in a table.…

    • 360 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    After analyzing the headquarters and Riordan’s other sites it was found that they were not…

    • 2582 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    References: Bayles, A., Butler, K., Collins, A., Meer, H., Miller, E., Phillips, G. M., et al. (2007). Penetration Tester 's Open Source Toolkit (Vol. II). Burlington, MA: Syngress Publishing Inc.…

    • 2643 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    NT2580

    • 526 Words
    • 5 Pages

    Introduction to Information Security © ITT Educational Services, Inc. All rights reserved. Page 2 Key Concepts  Attacks, threats, and vulnerabilities in a typical IT infrastructure …

    • 526 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    References: Fonseca, J., Seixas, N., Viera, M., & Madeira, H. (2014). Analysis of Field Data on Web Security Vulnerabilities. IEEE Transaction on Dependable & Secure Computing, 11(2), 89-100 doi:10.1109/TDSC.2013.37…

    • 3199 Words
    • 8 Pages
    Powerful Essays
  • Satisfactory Essays

    Physical Security

    • 272 Words
    • 2 Pages

    This paper is to outline Riordan Manufacturing’s existing Information Security Systems, determine their weaknesses, and develop solutions to those weaknesses by addressing security issues in the areas of physical, network, data, and the web.…

    • 272 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    "SQL - Definition | WordIQ.com." Dictionary, Encyclopedia and Thesaurus - WordIQ Dictionary. N.p., n.d. Web. 26 Sept. 2012. <http://www.wordiq.com/definition/SQL>.…

    • 701 Words
    • 3 Pages
    Good Essays

Related Topics