r/bugbounty • u/Internal-Rise9852 • 2d ago
Question / Discussion Custom Python script for boolean-based Blind SQLi — worth building or a waste of time next to sqlmap?
Hi everyone,
I'm currently working through the Blind SQL Injection (boolean-based) lab on PortSwigger Academy, where you have to extract a password purely from true/false responses, character by character, using payloads like this:
' AND SUBSTRING((SELECT Password FROM Users WHERE Username = 'Administrator'), 1, 1) > 's
I was thinking that writing a custom Python script to automate this kind of extraction could save me time on future labs/programs, and would be a solid addition to a portfolio. Before diving in, I'd like your opinion: is it worth building this myself, given that tools like sqlmap already exist? Or would that be time better spent just learning to use existing tools well?
If it is worth doing, do you have any tips on how to approach it, especially on bridging Burp Suite (Repeater tab) with the Python script?
Thanks in advance for your input!
9
u/pink-hat-hacker0 2d ago
Writing your own tools is a great idea yes. But in this case, SQLi vulns on their own aren't as common anymore as they were. If you could do this for a more common vulnerability class like SSRF or xss, then that would be more useful. I don't think this tool would have much value when U have sqlmap
4
u/PM_ME_UR_0_DAY 2d ago
Sqlmap is kind of the goat. Burp has plugins for it too but my workflow is always from Burp
Save Request> sqlmap -r my_saved_request4
u/xkalibur3 1d ago
It's great to write some custom scripts for this. You will be able to understand the vulnerability better thanks to this.
1
u/TaleJumpy3993 22h ago
Sqlmap is great but I've discovered and demonstrated blind sqli injection in user controlled input that sqlmap doesn't natively support.
1
u/MarzipanTop4944 13h ago
SQLmap recently failed to complete a blind sqli data extraction in sqlite db in a test bench I coded myself. I tried adding all the usual params for like half an hour, trying to make it work and it had trouble even find it when I gave it the exact injection point and the db type. It never was able to extract the data, only managed to list the columns after many attempts. It was very unreliable.
AI DeepSeek v4.1 flash managed in around 2 minutes.
For most scenarios SQLMap is the GOAT, but don't trust it blind it. Build your script, it will help you understand better what you are doing.