Hunt: SQLi - boolean-blind expert (microskill)
Boolean-blind extraction expert of the sqli split: no output renders, but the response DIFFERS between TRUE and FALSE. The core (hunt-sqli) owns mapping and the sqlmap contract; this skill owns the differential oracle and the hand extractor.
Load-bearing ideas: (1) the oracle can be anything observable - body length, a 302 vs 200 login redirect, an error vs none, a row present vs absent; (2) every extraction needs an A/B CONTROL PAIR run back-to-back - load and caches flip bits that look like answers; (3) map keyword filters ONE token at a time before building extractors.
Wiki
Hub: [[sql-injection]] - Primary page: [[sql-injection]] REFS: [[sql-injection]]
qmd on hint only: "blind sqli boolean differential oracle extractor redirect" - the sqli page first.
Shared obfuscation arsenal: hunt-sqli/references/waf-bypass.md -
blocked-token ladder with one-dimension rotation (re-run the boolean
canary after every rotation), = substitutes (LIKE/BETWEEN/REGEXP),
JSON-function boolean (' OR JSON_LENGTH('{}') <= 8896).
Paths (binding - shared with the core run)
# seat side (wsl):
ENG_DIR=/mnt/c/Users/Lenovo/Desktop/VMshare/<eng>/<eng>
RUN=$ENG_DIR/hunt/sqli/<host> # SHARED with hunt-sqli
# VM side:
ENG_DIR=/mnt/VMshare/<eng>/<eng>
RUN=$ENG_DIR/hunt/sqli/<host>
Experts write probes/sqli-boolean.jsonl into the core's $RUN tree.
Transport
Every VM-native command block ships through ONE documented transport:
wsl.exe -d kali-linux -u root bash -c "cd /mnt/c/Users/Lenovo/Documents/ObisidianVaults/ZTorch/ZTorch && bash scripts/vm-ssh.sh '<command>'"
- vm-ssh lands as user tz (NOT root); one argument per call; quotes
ship as base64 (
echo <b64> | base64 -d | bash). - Target-facing curls MUST use /opt/scope-shim/bin/curl by absolute path; out-of-scope dies rc 126 (never work around); UNKNOWN = ADVISORY, self-deny.
- Serial 1-rps probing by default (differentials need a quiet channel); the extractor loop runs on the VM writing straight to $RUN.
- sqlmap escalation lives in the CORE's canonical contract - BY REFERENCE, never a second copy here.
Entry gate
All four must pass; each is falsifiable:
Active engagement exists; the injection point is on targets//scope.md in-scope. Scope-guard is the deny.
hunt-core loaded (skills/exploit/hunt/hunt-core/SKILL.md).
Core verified: $RUN/raw/vector-map.md exists AND the core pointer carries SQLI-HUNT-DONE with boolean named in next=. Missing = dispatch hunt-sqli core first.
Toolchain preflight (fails LOUD):
for t in /usr/bin/jq /usr/bin/python3 \ /opt/scope-shim/bin/curl; do [ -x "$t" ] || { echo "MISSING TOOL: $t"; exit 1; } done
Checklist (mandatory)
Copy checklist.md (this skill's dir) to
$ENG_DIR/hunt/sqli/<host>/sqli-boolean-checklist.md at run start.
Unchecked at stop = UNCHECKED lane, re-run from the first unchecked
step. SKILL.md and the checklist header agree byte-for-byte on that
copy target.
Nudge
Review-skill re-injection text (pinned; NOTE: completion-gate emits its own generic nudge - both mean: resume at the first unchecked box):
Your work was just reviewed by the review skill and it was found
that you either missed a step of analysis, or didn't generate an
artifact of sufficient proof. Look at the markdown based checklist
and the output for each step, find what you missed, and complete
that step.
Confirmation gate
NOT confirmation: one "TRUE-looking" response; a differential observed once without its A/B control; a redirect that differs for reasons other than the payload (cookie expiry).
IS confirmation: a STABLE differential - the TRUE and FALSE controls flip consistently across repeat pairs - extracting a known value correctly (version() first, verify it against the banner), reproduced from your own written steps.
Methodology
Step 1 - Oracle definition
Find the observable: body length, 302 vs 200 (login-redirect oracle), error vs none, row-present marker. Record the oracle + which side is TRUE. Cookie discipline: re-establish or clear cookies EVERY probe - an expired session looks exactly like a FALSE.
Step 2 - A/B control pair
TRUE control (AND 1=1) and FALSE control (AND 1=2) run back-to-back, repeated: the differential must be stable before any extraction. Load or cache flips = wait, not "answer".
Step 3 - Filter mapping
Keyword/WAF filters mapped ONE token at a time (AND, OR, SELECT, UNION, spaces, comments): which survive, which kill the request. Build the extractor grammar from survivors only (CASE WHEN, IF(), comment styles, CHAR() for blocked strings).
Step 4 - Hand extractor
Binary search per character (SUBSTRING + ASCII/ORD comparisons) through the oracle; version() first (verify vs banner), then schema names, then the core's ranked data targets. Serial, 1 rps, straight into $RUN/probes/sqli-boolean.jsonl. Every extracted value cites its probe sequence.
Step 5 - Exit
Append rows to the core's $RUN/candidates.jsonl;
SQLI-BOOLEAN-DONE oracle=<shape> values=<n> appended to the core
pointer $ENG_DIR/hunt-sqli-.md; _requests.md rows (lane =
hunt-sqli-boolean); Deadends per unstable oracle.
Chaining
- Differential collapses under load -> hunt-sqli-time (a slower but load-immune channel).
- An outbound path exists (LOAD_FILE/UNC/UTL_HTTP) -> hunt-sqli-oob.
- sqlmap when manual bounds exceed: the CORE's contract (--technique=B).
Validation
- Proof = stable A/B differential + a known value (version/banner) extracted correctly.
- Negative control: the FALSE control returns the FALSE side consistently.
False Positives
- Session/cookie expiry mimicking FALSE.
- Cache serving the TRUE response for the FALSE probe.
- A redirect differential caused by auth state, not the payload.
Severity
CRITICAL = credential/sensitive extraction. HIGH = schema + one sensitive value chain. MEDIUM = proof of differential, version() only.
N/A escapes
- "N/A: no stable differential oracle" (control-pair evidence) An N/A tick is a claim with a reason, never a silent pass. Identical strings in SKILL.md and checklist.md.
Bitter-pill variant
Freehand run: skip checklist + numbered steps, one freehand pass over the vector map, output ONLY $RUN/analysis/bitter-pill.md. The stable-differential gate survives freehand. Declare with a _requests.md row (lane = hunt-sqli-boolean-bitterpill).
Depth walk (mandatory)
Walk EVERY applicable row of the payload arsenal page cited above.
Record each row in $RUN/coverage-depth.md as a table
| row | state | evidence | where state is probed, blocked, or
N/A, and evidence is a probe-pair path or a Deadends.md line. A bare
probed with no evidence reference fails the completion gate
(NEEDS-REVIEW). N/A rows cite why (surface shape forbids it).
Blocked implies research: before any Deadend is claimable on a blocked
row, (a) walk the arsenal page's bypass-ladder rows for that control
class, and (b) run one wiki query AND one mcp__wigolo__search for the
specific tech-plus-control bypass. Results, or a genuine null, land in
coverage-depth.md. "No research tried" is not a claimable state.
Exit artifact + handoff
Appends into the shared core $RUN: probes/sqli-boolean.jsonl,
candidates.jsonl rows, pointer line SQLI-BOOLEAN-DONE. Consumer:
triage. Findings leave ONLY through G1. Distill: python3 scripts/wiki-stage.py --kind technique --slug <slug> --target-page techniques/web/sql-injection.md.
Stop conditions
All steps terminal; stable-differential proof on every claimed value; serial discipline held; nothing written into skill dirs; no unchecked boxes above REVIEW; hunt-core stop conditions fire unchanged.
Attack surface
APPROACH: Hit login/search/sort/report params first; probe every quote context, take in-band (error/UNION) before blind (boolean/time), confirm in 1-2 manual requests then hand the dump to sqlmap (scoped, gentle, resume). AVOID: A generic 500, a WAF "SQL injection detected" string, an un-reproduced time delta, or a single-session login oracle is NOT confirmation - re-verify in a clean session, clear the cookie on a login oracle.
Cross-routing
- Load hunt-auth for auth-bypass outcomes of the injection.
- Load hunt-cloud when the DB is managed-cloud (different blast radius/escalation).
- Not this skill: NoSQL/GraphQL operator shapes (hunt-injection).