# Hunt Sqli

> Turn a DB-reaching input surface into evidence-carrying CANDIDATES for

- Skill: `encod3d-sec/hunt-sqli-2` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx get-skill add encod3d-sec/hunt-sqli-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/encod3d-sec/hunt-sqli-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: Encod3d-Sec (https://skillmd.com/u/encod3d-sec)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/encod3d-sec/hunt-sqli-2

---


# Hunt: SQL Injection (golden-image rework)

Turn a DB-reaching input surface into evidence-carrying CANDIDATES for
SQL and NoSQL injection: error-based, UNION, boolean-blind, time-based,
second-order, OOB. This skill produces candidates, never verdicts -
findings leave ONLY through the G1 proof gate (triage).

> Current emphasis (update on wiki harvest): pre-auth write-path
> injection and the login-redirect oracle over classic in-param quote
> probing - models over-index on over-represented old methods; the
> newest harvested technique leads until superseded.

**Assumes `hunt-core`** for the scope gate, two-account rule,
confirmation gate, enumeration limits, stop conditions, wiki protocol,
FIND output, and Deadends. Do not re-derive any of that here.

## Wiki

Hub: [[web-moc]] - Primary page: [[sql-injection]] - Payload
arsenal: `wiki/payloads/sqli.md`
Anchors: [[nosql-injection]], [[orm-injection]]
**REFS:** [[sql-injection]], wiki/payloads/sqli.md

mcp__wiki-search__query (lex) "SQL injection SQLi NoSQL union boolean-blind time-based
error-based" via wiki-search MCP - ONLY on a concrete hint the map
above does not cover; not a blanket first step.

Shared bypass arsenal (blocked implies research, but walk this first): `skills/exploit/hunt/hunt-sqli/references/bypass-arsenal.md` - NEW 2025-2026 classes (JSON unicode-escape contexts, ORDER BY CASE WHEN oracle, second-order readers, ORM raw-escape sinks, H2 alias chain) alongside references/payloads.md + waf-bypass.md..

## Paths (binding - define once at the top of the run notes)

    # seat side (wsl) - engagement tree is DOUBLE-NESTED in VMshare:
    ENG_DIR=/mnt/c/Users/Lenovo/Desktop/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/sqli/<host>
    # VM side (WHERE tools run, same tree through the VMware share):
    ENG_DIR=/mnt/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/sqli/<host>

Corpus and probes live in the VMshare tree; the VM runs tools against
the /mnt/VMshare spelling as user tz; the seat reads the same bytes at
the /mnt/c/Users/Lenovo/Desktop/VMshare spelling. The repo tree targets/
<eng> is admin/ingest only - probe artifacts NEVER land there.

## 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): no root-only paths, no sudo.
- vm-ssh.sh takes the command as ONE argument. Commands containing
  quotes ship as base64: write the script, then run
  `echo <b64> | base64 -d | bash` inside the vm-ssh argument.
- Non-login shells do NOT source profile.d: the PATH scope-shim is NOT
  active. Target-facing fetches MUST use the shim binaries by absolute
  path /opt/scope-shim/bin/{curl,httpx}.
- Shim verdict semantics (verified live): explicit out-of-scope host
  dies rc 126 (never work around it); in-scope passes; UNKNOWN hosts
  get an ADVISORY and the fetch proceeds - an advisory is NOT approval;
  verify against scope.md and self-deny anything not clearly in scope.
- Commands longer than ~2 minutes run DETACHED (bash scripts/vm-scan.sh
  <eng> <target> '<cmd>' or nohup + DONE-marker poll) - the direct
  bridge drops at ~2min and empty output then reads as a dead target.
  sqlmap runs ALWAYS go through `bash scripts/vm-bg.sh <eng>
  sqlmap-<asset> '...'` + `--read` for exactly this reason.

## Entry gate

All four must pass before Step 1; each is falsifiable:

1. Active engagement exists (repo tree targets/<eng>/active.md) and
   <host> is on the targets/<eng>/scope.md in-scope list. Scope-guard
   is the deny. (targets/ is the repo admin tree; $ENG_DIR holds
   corpus and run artifacts only - see Paths.)
2. hunt-core loaded (skills/exploit/hunt/hunt-core/SKILL.md - it owns
   scope gate, two-account rule, confirmation gate, enum limits; never
   restated here).
3. Producer verified - at least ONE of:
   (a) $ENG_DIR/state.md asset table has >= 1 searchable/filter/sort/
   login-class endpoint row for <host>; \
   (b) $ENG_DIR/js/<domain>/findings/endpoints.jsonl parses AND its
   manifest.sha256 sidecar passes `sha256sum -c` run FROM that
   findings/ dir on the VM; \
   (c) the kickoff seeded $RUN/raw/vector-map.md.
   None = dispatch the surface lane first; never probe blind.
4. Toolchain preflight (fails LOUD; sqlmap probed, fatal only for the
   sqlmap branch - manual extraction is always available):

       for t in /usr/bin/jq /usr/bin/python3 \
                 /opt/scope-shim/bin/curl \
                 /home/tz/go/bin/interactsh-client; do
         [ -x "$t" ] || { echo "MISSING TOOL: $t"; exit 1; }
       done
       [ -x /usr/bin/sqlmap ] \
        || { sudo apt-get install -y sqlmap 2>/dev/null; } \
        || echo "N/A: sqlmap absent on VM (install failed - needs apt/sudo)"  # manual branch

## Checklist (mandatory)

Copy checklist.md (this skill's dir) to
`$ENG_DIR/hunt/sqli/<host>/sqli-checklist.md` at run start. Tick boxes
as steps finish; unchecked at stop = UNCHECKED lane, re-run from the
first unchecked step. The SKILL.md text and the checklist header agree
byte-for-byte on that copy target.

## Nudge

Review-skill re-injection text (pinned for vocabulary match; NOTE: the
completion-gate script itself emits a different generic nudge - see
scripts/completion-gate.py NUDGE - both strings mean the same thing:
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.

On this nudge: resume at the FIRST unchecked box of
$ENG_DIR/hunt/sqli/<host>/sqli-checklist.md - never restart the run
from zero. REVIEW may only be ticked after every earlier box is
ticked.

### Technique dispatch (split routing)

After the core confirms injectability + context verdicts, techniques
route to their experts: `Skill(hunt-sqli-error)` (visible oracle),
`Skill(hunt-sqli-union)` (reflective sink), `Skill(hunt-sqli-boolean)`
(TRUE/FALSE differential), `Skill(hunt-sqli-time)` (fully blind),
`Skill(hunt-sqli-oob)` (DB egress). The core owns the vector map,
context verdicts, second-order/PROCESSLIST capture, and the CANONICAL
sqlmap escalation contract (experts inherit BY REFERENCE).

## Confirmation gate

**NOT confirmation:** a generic 500; a WAF block page or a "SQL
injection detected" string (that is the app's filter firing, not the
database); a reflected error string you have not proved originates
from the DB; a single non-repeatable slow response; a boolean or time
inference with no differential (no clean baseline-vs-injected delta);
the payload echoed back from your own request; any verdict read off a
response body without a clean-session re-verify; MySQL 1265/1366/1054
from a write endpoint (usually the connector coercing a BOUND value,
not injection; decisive test: a payload that would span multiple SQL
tokens returns the SAME single coercion error) [[sql-injection]].

**IS confirmation:** a DB error whose text is demonstrably from the
engine (extractvalue/updatexml output, a driver error naming the
DBMS); UNION or error-based output that returns real DB content; a
boolean oracle that flips TRUE/FALSE consistently across probes; a
time delta that reproduces on repeat (baseline vs SLEEP(5)/
pg_sleep(5)/WAITFOR, re-run); or an out-of-band DNS/HTTP hit to your
unique Collaborator/interactsh subdomain. Re-verify in a CLEAN session
every time; on a login-redirect oracle clear the session cookie
between probes (a stale authenticated session reads as always-true).

**Out-of-band (blind SQLi via DNS/HTTP).** When you plant a blind/OOB
payload, append a row to targets/<eng>/oob.md: `| <token> | <sink
url+param> | sqli | <date> | waiting | |` (columns: token | sink |
class | planted | status | source, token = your unique
Collaborator/interactsh label). Exfil sinks: MySQL LOAD_FILE/UNC
path, MSSQL xp_dirtree, Oracle UTL_HTTP. The recon-capture hook
auto-correlates the callback to flip the row to HIT and SessionStart
surfaces HITs; a HIT row is the gate to scaffold the FIND. Do NOT
claim a blind SQLi without a HIT row.

## Methodology

**Order: in-band before blind.** Error-based and UNION (direct data/
errors) BEFORE boolean/time-based - blind is slow and easily masked
(e.g. an anti-bruteforce SLEEP() on the login page adds a constant
delay that hides your injected SLEEP). UNION/error need a place where
query output or a DB error is REFLECTED; if the page reflects nothing,
test on one that does.

**Rank before testing** (highest-value injection points first):
authentication/login (a bypass here is auth bypass; the login-redirect
oracle turns even a filtered, output-less login into a blind
extractor); pre-auth WRITE paths (register/dup-check, resend-
verification, reset submit - separate queries, frequently
string-concatenated when the login SELECT is parameterized; fresh
username per probe so the dup check actually runs; an OR-expanded
payload turns the dup-vs-created message difference into a boolean
oracle); search/filter/sort/report params (?q=, ?category=,
?sort=&order= ORDER BY injection, ?start_date=); anything reflecting
query output or a DB error; JSON bodies with nested objects (NoSQL
operator injection); second-order sinks (stored safely, rendered
unsafely - profile, dashboard, "last logins"); headers, cookies, path
segments (least-tested; ORDER BY / LIMIT frequently take raw input).

URL patterns: /search?q= /filter?category= /sort?by=&order=
/report?start_date= /api/v1/items?id= /index.php?id=
/gallery?album_id= ?page=&limit=

Fingerprint the DB: PHP + Apache -> MySQL; Express + MongoDB -> NoSQL;
application/json with nested objects -> potential NoSQL.

### Step 1 - Vector map

Enumerate all input vectors (GET, POST, JSON body, headers, cookies,
path segments), ranked by the list above. Row schema `endpoint |
param | context guess | rank`:

    { \
      echo "/login | user, pass | string, WHERE | 1-login"
      echo "/register | username | dup-check SELECT | 2-preauth-write"
    } >> "$RUN"/raw/vector-map.md

### Step 2 - Baselines + opaque-token decode

Baseline every response (length, status, time). Opaque constant-format
token -> DECODE-INSPECT it FIRST (base58 for short alphanumeric IDs,
then base64, hex). A parameter whose value is an ENCODING of the real
SQL input (field:value) silently defeats every plaintext/sqlmap probe -
each returns a clean "bad request" that reads exactly like a
server-side format gate. Decode, inject INSIDE the decoded string,
re-encode the whole value. sqlmap cannot find these (it fuzzes the raw
parameter). Worked pattern: [[sql-injection]] (encoded-parameter
wrapper).

### Step 3 - Error probes in every quote context

' " ` ') ") and numeric/no-quote. A ' doing nothing does NOT mean
safe: the sink may be double-quoted (WHERE x="$v"). Watch for a
reflected DB error or any length change. On a numeric-looking id
param, test the NUMERIC context FIRST with a boolean pair - id=1 AND
1=1 (row shows) vs id=1 AND 1=2 (row gone). That one request pair
settles the context before you burn turns theorizing quote/LIKE
breakouts; a ' that only errors can be a WAF/troll page, not the real
query shape.

### Step 4 - In-band (N/A: no reflective sink - blind still runs)

Error-based (extractvalue/updatexml) and UNION (ORDER BY for col
count, then UNION SELECT). Mind display truncation when sizing
extracted chunks.

### Step 5 - Blind (only after in-band)

Boolean (AND 1=1 vs AND 1=2) then time (SLEEP(5)/pg_sleep(5)/
WAITFOR) with an A/B control pair for clock skew. Caveat: a flat time
battery does NOT close a zero-row sink (a dup-check/uniqueness
SELECT): SLEEP is volatile, never constant-folded, and cannot fire
there even when the param IS injectable, while error-based
extractvalue/updatexml folds during optimization and reflects ~32
chars of any subquery; probe error-based first on exactly those sinks
[[sql-injection]].

### Step 6 - Second-order

If login/register is parameterized, the SAME stored value may be
unsafe on another page (profile/dashboard/"last logins") OR simply
wherever the app echoes your stored name back - a greeting, a
"Welcome X", a counter/result line. Register the payload as the
username, log in, then load the page that renders it - and READ THE
WHOLE reflected block, not a keyword grep: the phrasing can shift
(singular "1 word" vs plural "N words") and hide the dumped data.
Always try this before concluding a parameterized login is safe. See
the PROCESSLIST section below.

### Step 7 - NoSQL (N/A: no NoSQL surface)

MongoDB: replace value with {"$gt": ""} or param[$ne]=invalid.
2025-2026 upgrades (references/waf-bypass.md NoSQL section): error-based
document dump `'; throw new Error(JSON.stringify(this)); '` (leaks the
FULL first document in the error; iterate with
`if(!['bob'].includes(this.username)){throw ...}`), `$expr`/`$toInt`
cast oracle (cast error shows the value), duplicate-key last-value-wins
to strip filter preconditions, and aggregation-pipeline injection when
the param IS the stage array (`$lookup`/`$unionWith` cross-collection
read, `$replaceWith`+`$merge` = INSERT/UPDATE).

### Step 8 - Manual confirm, then sqlmap

Confirm manually in 1-2 requests only (e.g. an arithmetic tell:
id=2-1 evaluates to row 1 = injection proven) - the NEXT step is
sqlmap, never a hand-rolled group_concat/LIMIT paging loop:

    # ONE confirming curl (baseline vs injected); then hand off
    /opt/scope-shim/bin/curl -o /dev/null -s -w "%{time_total}
" \
      "https://<host>/search?q=test' AND SLEEP(5)-- -"

    # sqlmap owns the rest: fingerprint, WAF bypass, enumeration
    bash scripts/vm-bg.sh <eng> sqlmap-<asset> \
      'sqlmap -u "https://<host>/search?q=test" --level=3 --risk=2 --batch --dbs --ignore-stdin'
    bash scripts/vm-bg.sh --read <eng> sqlmap-<asset>

sqlmap alternative for 2024+ WAFs: **ghauri** (better on time-based
blind against modern WAFs); NoSQLMap for the Mongo classes.

Over a non-TTY stdin (an ssh/VM pipe or an agent driver), sqlmap
silently discards -r request files and the run false-negatives
(baseline auth 401s); always add --ignore-stdin there
[[wiki/tools/sqlmap]]. Retrieval stalls/corrupt dumps or a blocked
0x-cast -> rerun with --no-cast (or --hex for binary); login-form OR
injections need --risk=2+; --os-shell over UNION returning no output
-> retry --technique=E. Rate-sensitive/fragile/worker-starving target
-> gentle: --delay 2 --timeout 40, and let sqlmap RESUME from its own
session (same output dir/target) instead of restarting. Keep exactly
ONE manual curl in the writeup as the confirming PoC; sqlmap owns
enumeration.

**Scope sqlmap to PROVING the vuln, not mass-exfiltrating records.**
An automated table dump is data extraction under the hunt-core
enumeration limits: confirm + fingerprint + a bounded sample (--dump
with --start 1 --stop 5), never --dump-all. Sample of 5, ceiling 20
with operator approval, 0 under no_bruteforce.

**Anti-automation signal -> do NOT run sqlmap at all (stay manual +
serial).** A taunt string ("try sqlmap", "I dare you"), a
request-rate-limiter/lockout, a char-blacklist WAF, or intermittent
empty/ban responses after a burst = the box is BUILT to defeat sqlmap.
Its detection burst just trips the limiter, and every response after
that measures the ban, not the app (easily misread as "server load /
worker starvation"). Injection is already manually confirmed, so
sqlmap adds nothing: extract by hand, ONE serial request at a time.
Bypass the char blacklist with functions + hex literals (database(),
0x7573657273 for a blocked table/column name) instead of
quotes/comments, and put the data in a column that reflects. Record
the run-or-skip decision + reason in probes/sqlmap-decision.md.

### Step 9 - OOB blind

Plant exfil-sink payloads with oob.md rows (targets/<eng>/oob.md;
token | sink | sqli | planted | waiting | source) and mirror tokens
to $RUN/raw/oob-tokens.md. A blind claim REQUIRES a HIT row.

### Step 10 - Exit artifact (candidates)

Merge probe JSONLs (union, truncate+dedupe on endpoint+method+class;
keys class|host|endpoint|method|evidence|confidence|next).
candidates.md: human table + probe counts, EVERY class section
present ("no hits" where true; a missing class section = failed
lane). Pointer $ENG_DIR/hunt-sqli-<host>.md:

    SQLI-HUNT-DONE inband=<n> blind=<n> second-order=<n> next=<techniques to dispatch> (token map: inband->error|union, blind->boolean|time)
    nosql=<n> oob=<n>

Plus: _requests.md rows (lane = hunt-sqli), state.md asset rows
(access=exploit-candidate, source=hunt-sqli), Deadends rows with the
WHY.

Every probe JSONL row: {class, host, endpoint, method, evidence
(absolute probes/raw/ path), observed, confidence}. Every request/
response pair under $RUN/probes/raw/ (filename = sha256 of
method+path+body).

## Chaining

Once you have a working injection, escalate along these edges (keep
extraction scoped to proof):

- **File read** - MySQL LOAD_FILE('/etc/passwd'), MSSQL OPENROWSET,
  Oracle UTL_FILE; the OOB DNS-exfil sinks double as blind file read.
  Before MySQL file ops, prove the lane through the injection itself:
  super_priv/user_privileges for FILE, then secure_file_priv from
  information_schema.global_variables (SHOW VARIABLES cannot ride a
  UNION); NULL = dead lane, empty = anywhere [[sql-injection]].
- **File write -> RCE** - MySQL INTO OUTFILE/DUMPFILE a web-shell
  into the docroot; MSSQL xp_cmdshell; Postgres COPY ... TO PROGRAM;
  stacked queries where the driver allows. Find the docroot by reading
  the server config through LOAD_FILE (nginx sites-enabled,
  apache2.conf, IIS applicationHost.config) and write the shell as a
  hex blob so no quote has to survive the payload context. Hand off
  to hunt-rce once you have command execution. wiki/payloads/sqli.md
- **Credential reuse** - hashes/plaintext pulled from the DB (see
  PROCESSLIST below) are frequently reused for SSH, not the web
  login. Crack, then pivot; hand off to hunt-auth for the ATO.
- **Dumped table -> targeted crack wordlist.** A dumped user/
  credential table (even a different app's plaintext passwords) is a
  high-value CUSTOM wordlist for cracking a related hash elsewhere -
  beats rockyou. See [[password-attacks]].

## Second-order + PROCESSLIST credential capture

When the app hashes the password INSIDE the SQL (... AND
pass=md5("PLAINTEXT")) the plaintext sits in the live query. If a
bot/admin logs in periodically (often held a few seconds by an
anti-bruteforce SLEEP()), read it via the SQLi - the app connects as
the same DB user, so you see its threads even without global PROCESS
priv:

    " UNION SELECT 1,SUBSTRING((SELECT info FROM information_schema.PROCESSLIST
      WHERE id=(SELECT MIN(id) FROM information_schema.PROCESSLIST)),POS,16)-- -   -- POS=1,17,33,...

INFO is non-NULL only while running -> poll fast, timed to the bot.
Output truncates to the sink's display width -> register one
second-order account per N-char window, log each in, hammer the
rendering page with all sessions during the bot's window, concatenate
the blocks. Recovered creds are often reused for SSH, not the web
login. Full writeup: [[sql-injection]].

## Cracking recovered hashes (try easy first)

1. Unsalted MD5/SHA1 -> online lookup first (CrackStation 190GB
   table, hashes.com) - instant for leaked/common passwords that
   rockyou+rules miss. (Needs a browser/captcha; if the tooling host
   has no internet, do it from a box that does.)
2. Then local: hashcat -m 0 h /usr/share/wordlists/rockyou.txt -r
   best64, then john.
3. A hash that resists all of the above on a "hard" box may be a
   decoy/rabbit-hole - pivot (e.g. PROCESSLIST capture above) instead
   of grinding. A 0e... MD5 is only a magic hash for PHP == if EVERY
   char after 0e is a digit.

## App keyword-filter + login redirect oracle (sqlmap blind-spot)

App rolls its own preg_match blacklist (returns a fixed "SQL Injection
detected" string). Map it one token at a time, then bypass: AND logic
not OR, -- - not /**/, quoted literals not 0x hex, CASE WHEN not
IFNULL. If the post-login page is static, the LOGIN REDIRECT is the
oracle: user' AND 1=1-- - -> 302 (TRUE), AND 1=2 -> 200 (FALSE).
sqlmap usually FAILS here (hex-encodes data as 0x -> blocked; follows
the 302 -> diff confusion), so hand-roll a boolean extractor and
CLEAR THE SESSION COOKIE EVERY PROBE (a login oracle otherwise stays
authenticated -> always-true). Don't name the script enum.py
(shadows stdlib). See [[sql-injection]].

## Evasion

A WAF block or a "SQL injection detected" string is NOT "closed" - it
is a filter to map and bypass, not a fix. The shared obfuscation
arsenal is `references/waf-bypass.md` (this skill's dir): fingerprint
WHICH layer blocked you (block-page byte length per layer; an app
"SQL injection detected" string is the app filter, not the WAF),
rotate ONE dimension per re-fire (encoding, whitespace, case,
syntax-substitute), substitute ONLY the blocked token, and re-run the
boolean canary after every rotation. Highest-yield 2025-2026 families
in the arsenal: JSON-function rotation (`' OR JSON_LENGTH('{}') <=
8896 UNION DISTINCTROW SELECT @@version #`), scientific notation
(`1' or 1.e(1)`), one-shot DIOS/json_arrayagg extraction for
rate-limit windows, and the tamper shortlist.

## Validation

- Proof = in-band data return with a marker (version/@@canary in
  output), or a blind BOOLEAN pair where TRUE and FALSE branches
  differ ONLY on the payload char, or an OOB DNS hit with a unique
  subdomain. Time-based needs the A/B control pair for clock skew.

## False Positives

- SQL error echoing your input (parse error, not injection).
- WAF block read as not-vulnerable (blocked != clean; evasion ladder
  first).
- Boolean "diff" caused by caching: bypass cookies on the pair.
- ORDER BY / column-position influence that reorders but returns no
  unauthorized data.
- sleep() matched onto an inherently slow query (no control request).

## Cross-routing

- hunt-auth for auth-bypass outcomes of the injection.
- hunt-cloud when the DB is managed-cloud (different blast radius/
  escalation).
- Not this skill: NoSQL/GraphQL operator shapes (hunt-injection).

## Severity

Confirmed = data extracted, a DB-sourced error/UNION reflection, a
consistent boolean oracle, a reproducible time delta on repeat, or an
OOB HIT.

| Demonstrated | Typical |
|---|---|
| Full DB dump, or RCE via xp_cmdshell / INTO OUTFILE web-shell | critical |
| Arbitrary data extraction (auth bypass, cross-table read, credentials) | high |
| Blind boolean/time-based only, no data pulled | medium |

Rate on demonstrated impact per hunt-core, not the theoretical
maximum.

## Deadends

    Append: - [ ] SQLi on <host> param <x> -- all probes 200/same-
    length, no time delta or DB error; tried quote contexts / UNION /
    boolean / time / OOB, WAF filter mapped and bypassed

Record what you tried, not just that it failed. The next pass needs to
know the boundary.

## N/A escapes

- "N/A: no NoSQL surface"
- "N/A: sqlmap absent on VM (install failed - needs apt/sudo)" (manual branch)
- "N/A: no reflective sink" (in-band skip; blind still runs)
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

When the kickoff designates this run freehand: skip the checklist copy
and numbered steps, one freehand pass over the vector map, output
lands ONLY in $RUN/analysis/bitter-pill.md (tried / found / dismissed,
every claim carries file:line or request evidence). Never edits
structured outputs. Proof gates still apply - freehand never skips
proof, and the OOB-mandatory rule survives freehand. Declare with one
_requests.md row (lane = hunt-sqli-bitterpill) so completion-gate
routes to this artifact contract instead of the checklist ledger.

### 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

ONE exit artifact set: $RUN/candidates.jsonl (machine) +
candidates.md (human) + $ENG_DIR/hunt-sqli-<host>.md (pointer with
SQLI-HUNT-DONE + counts). The consumer (triage) finds at $RUN:
raw/vector-map.md, raw/oob-tokens.md, probes/*.jsonl, probes/raw/*,
probes/sqlmap/, candidates.{jsonl,md}. Findings leave ONLY through G1
(triage). Distill confirmed GENERIC patterns: `python3
scripts/wiki-stage.py --kind technique --slug <slug> --target-page
techniques/web/sql-injection.md`.

## Stop conditions

Terminal states complete (probed | N/A with reason | deadend row
written), nothing written into skill dirs (skills/exploit/hunt/
hunt-sqli/ stays untouched), 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.

