Ticking SQLi
This talk provides a technical overview of various SQL injection techniques, including in-band, union-based, boolean-based, and time-based blind SQL injection. It demonstrates how to manually craft payloads to bypass authentication and extract sensitive database information, such as version numbers. The presentation emphasizes the importance of manual testing and script development over reliance on automated tools. Practical examples are provided using curl and SQLmap to illustrate the exploitation process.
Beyond Automated Scanners: Mastering Manual SQL Injection Payloads
TLDR: Automated tools like SQLmap are essential for efficiency, but they often fail to uncover complex, time-based, or non-standard SQL injection vulnerabilities. This post breaks down how to manually craft payloads for in-band, union-based, and time-based blind SQLi to bypass authentication and extract database metadata. Pentesters should prioritize manual verification to catch edge cases that automated scanners miss.
Automated vulnerability scanners are the workhorses of modern security testing. They are fast, they are consistent, and they are necessary when you are staring down a scope with thousands of endpoints. However, relying solely on them creates a dangerous blind spot. If you are only running a tool and reporting the output, you are missing the nuances of how a database actually processes your input. The most critical vulnerabilities often hide in the logic gaps that scanners are not programmed to bridge.
The Mechanics of Manual Injection
SQL injection remains a top-tier threat, consistently appearing in the OWASP Top 10 under the injection category. While many developers have moved toward parameterized queries, legacy systems and poorly implemented custom ORMs still leave doors wide open.
When you encounter an endpoint that seems to ignore your automated payloads, it is time to go manual. Start by probing the input fields with simple characters like a single quote (') or a double single quote (''). If the application returns a 500 Internal Server Error, you have a potential entry point. If it returns a 200 OK, the database might be swallowing your input without erroring out, which is where blind techniques become necessary.
Union-Based Exploitation
Union-based SQLi is the most straightforward way to exfiltrate data because it allows you to append the results of your own query to the original application query. The key is matching the number of columns and the data types of the original query.
' UNION SELECT 1, user(), database() --
If the application reflects the output of the query, you will see the database user and name directly in the response. If you get an error, you need to adjust the number of columns in your SELECT statement until the query succeeds. This is a manual process that requires patience, but it provides a direct line to the database schema.
Time-Based Blind SQLi
When the application does not reflect any data and does not return distinct errors, you have to rely on the database's behavior. Time-based blind injection uses the database's ability to pause execution to confirm your hypothesis.
' OR IF(SUBSTRING(version(),1,1)='8', SLEEP(5), 0) --
In this example, you are asking the database to sleep for five seconds if the first character of the version string is '8'. If the response takes five seconds, you have confirmed the character. This is tedious to do by hand, which is why writing a custom script is the mark of a seasoned researcher. A simple Python script using the requests library can automate this character-by-character enumeration, giving you full control over the timing and the payload structure.
Why Manual Testing Still Wins
Automated tools like SQLmap are incredibly powerful, but they are predictable. They use known signatures and patterns that modern Web Application Firewalls (WAFs) are tuned to detect. When you write your own scripts, you can introduce jitter, change the timing, or use non-standard encoding that bypasses these filters.
Furthermore, manual testing allows you to understand the context of the application. During a recent engagement, I found that an automated scanner was failing because the application required a specific header to be present for the SQL injection to trigger. By manually inspecting the traffic in Burp Suite, I identified the missing header, added it to my manual payload, and successfully dumped the database. The scanner never stood a chance.
Defensive Strategies
Defending against these attacks requires more than just a WAF. The root cause is almost always the concatenation of user input into raw SQL queries. The only reliable defense is the use of parameterized queries or prepared statements. When you use prepared statements, the database treats the user input as data, not as executable code, effectively neutralizing the injection attempt regardless of how clever your payload is.
If you are working with a development team, push them to use established ORMs that handle parameterization by default. If they must write raw SQL, ensure they are using the database driver's built-in parameterization features.
What to Do Next
Stop treating your tools as a black box. The next time you are on an engagement, take one of the endpoints that your scanner flagged and try to reproduce the finding manually. If you can't, figure out why. Is it a false positive, or is the scanner doing something you don't understand?
If you want to sharpen your skills, the PortSwigger Web Security Academy is the best resource for practicing these techniques in a controlled environment. It provides the labs you need to move from "tool operator" to "security researcher." The goal is to understand the underlying mechanics so well that you don't need a scanner to tell you where the vulnerability is. You will be able to spot it just by looking at the request.
Vulnerability Classes
Tools Used
Target Technologies
Attack Techniques
OWASP Categories
Up Next From This Conference

Breaking Secure Web Gateways for Fun and Profit

Listen to the Whispers: Web Timing Attacks That Actually Work

Abusing Windows Hello Without a Severed Hand
Similar Talks

Kill List: Hacking an Assassination Site on the Dark Web

Firewalls Under Fire: China's Ongoing Campaign to Compromise Network Protection Devices

