Skip to content

feat: add 6 web + LLM vuln scanners — CORS, CRLF, NoSQLi, JWT, OOB, LLM red-team#82

Open
DebasishTripathy13 wants to merge 3 commits into
shuvonsec:mainfrom
DebasishTripathy13:feat/web-llm-scanners
Open

feat: add 6 web + LLM vuln scanners — CORS, CRLF, NoSQLi, JWT, OOB, LLM red-team#82
DebasishTripathy13 wants to merge 3 commits into
shuvonsec:mainfrom
DebasishTripathy13:feat/web-llm-scanners

Conversation

@DebasishTripathy13

Copy link
Copy Markdown

Copilot AI review requested due to automatic review settings June 19, 2026 18:23
…LM red-team

Adds six new capabilities, each as tool + slash command + tests, all
pure-Python (no new deps) and auto-installed via the existing commands glob:

- /cors        CORS misconfig (origin reflection, null-origin, credentialed
               read, suffix/prefix regex bypass, scheme downgrade)
- /crlf        CRLF / response-splitting + host-header injection (Set-Cookie
               canary, encoded + UTF-8 bypass variants)
- /nosqli      NoSQL injection (operator auth-bypass, bracket-syntax,
               $where time-based blind) with differential + timing classifier
- /jwt-scan    JWT alg:none forgery, RS256->HS256 confusion, HS256 secret
               crack, static claim analysis (offline, pure stdlib)
- /oob         out-of-band orchestrator wrapping interactsh-client — confirms
               blind SSRF/XXE/SQLi/RCE/Log4Shell via callback correlation
- /llm-redteam LLM red-team corpus (prompt-injection, jailbreak, system-prompt
               leak, data-exfil, indirect injection, guardrail bypass) with
               canary-token detection

Core logic is separated from network I/O so the 46 new tests run offline.
docs/CAPABILITY-GAPS.md records the full coverage audit; remaining gaps
(headless-browser DOM harness, garak/PyRIT, web3 static/fuzzing) are queued
as the next pipeline tier.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds six new purpose-built security scanners (CORS, CRLF/host-header, NoSQLi, JWT, OOB correlation via interactsh, and an LLM red-team harness) plus corresponding slash-command docs and unit tests, extending the repo’s “confirmation” tooling beyond skill/documentation coverage.

Changes:

  • Introduces 6 new scanner tools under tools/ (networked where appropriate; otherwise pure/offline helpers).
  • Adds unit tests for the tools’ pure components (payload generation + classification/correlation).
  • Documents the new tooling in commands/*, docs/*, and updates command/tool listings in CLAUDE.md.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tools/oob_listener.py OOB payload generator + interactsh listener wrapper + interaction correlation
tools/nosqli_scanner.py NoSQLi login scanner + query-string payload emitter
tools/llm_redteam.py LLM red-team corpus runner with canary-based response classification
tools/jwt_scanner.py Offline JWT analysis + alg=none + alg-confusion + HS256 wordlist cracking
tools/crlf_scanner.py CRLF/response-splitting and host-header injection scanner
tools/cors_scanner.py CORS misconfiguration scanner (Origin probes + ACAO/ACAC classification)
tests/test_oob_listener.py Unit tests for OOB payload generation and correlation
tests/test_nosqli_scanner.py Unit tests for NoSQLi payloads and classifiers
tests/test_llm_redteam.py Unit tests for corpus coverage and response classification
tests/test_jwt_scanner.py Unit tests for JWT decode/forge/crack/analyze primitives
tests/test_crlf_scanner.py Unit tests for CRLF payload generation and detection helpers
tests/test_cors_scanner.py Unit tests for CORS origin generation and classification
docs/README.md Adds CAPABILITY-GAPS doc entry
docs/CAPABILITY-GAPS.md Capability-gap audit updated to mark shipped scanners/commands
commands/README.md Updates command count and lists new vulnerability scanners
commands/oob.md Adds /oob command documentation
commands/nosqli.md Adds /nosqli command documentation
commands/llm-redteam.md Adds /llm-redteam command documentation
commands/jwt-scan.md Adds /jwt-scan command documentation
commands/crlf.md Adds /crlf command documentation
commands/cors.md Adds /cors command documentation
CLAUDE.md Updates command list and tool inventory to include new scanners

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/oob_listener.py
Comment on lines +182 to +185
if args.correlate:
inters = [json.loads(l) for l in open(args.correlate) if l.strip()]
payloads = json.load(open(args.payloads_file)) if args.payloads_file else {}
hits = correlate(inters, payloads)
Comment thread tools/cors_scanner.py
Comment on lines +12 to +20
Severity model:
CRITICAL reflects an attacker origin AND allows credentials -> cookie-auth'd
cross-origin reads. Full account-data exfil.
HIGH `null` origin trusted with credentials (sandboxed iframe / data: URI
attack), OR sibling/suffix-domain trusted with credentials.
MEDIUM reflects attacker origin without credentials (token-auth data read),
OR trusts http:// downgrade of an https origin.
LOW ACAO: * with no credentials (public CORS — usually intended).

Comment thread tools/cors_scanner.py
Comment on lines +37 to +40
USER_AGENT = "claude-bug-bounty/cors_scanner"

CRITICAL, HIGH, MEDIUM, LOW, INFO = "CRITICAL", "HIGH", "MEDIUM", "MEDIUM_LOW", "INFO"

Comment on lines +25 to +28
def test_generate_tests_covers_key_vectors():
origins = [t.origin for t in generate_tests(URL)]
assert any("evil.example" in o and "target.com" not in o.split("//")[1].split("/")[0].replace("evil.example", "") for o in origins) or True
# null + scheme downgrade + post-domain present
Comment thread tools/nosqli_scanner.py
Comment on lines +67 to +72
def where_sleep_body(user_field: str, pass_field: str, ms: int = 5000) -> dict:
"""$where time-based blind payload to confirm server-side JS evaluation."""
return {
user_field: "admin",
pass_field: {"$where": f"sleep({ms})"},
}
Comment on lines +30 to +33
def test_where_sleep_body_shape():
body = where_sleep_body("u", "p", ms=5000)
assert body["p"] == {"$where": "sleep(5000)"}

Comment thread tools/jwt_scanner.py
Comment on lines +61 to +69
def forge_alg_none(token: str) -> list[str]:
"""Produce alg:none forgeries with the original claims and an empty sig."""
header, payload, _ = decode(token)
out = []
for alg in ("none", "None", "NONE", "nOnE"):
h = dict(header)
h["alg"] = alg
out.append(f"{_encode_segment(h)}.{_encode_segment(payload)}.")
return out
Comment thread tools/jwt_scanner.py
Comment on lines +169 to +173
if args.alg_none:
did = True
print("# alg:none forgeries")
for t in forge_alg_none(args.token):
print(t)
Comment thread tools/crlf_scanner.py
Comment on lines +86 to +90
class CrlfFinding:
url: str
vector: str # "query" | "host-header"
payload: str
evidence: str
Comment thread tools/crlf_scanner.py
Comment on lines +127 to +131
hdrs = _send(target, None, timeout)
ev = detect_injection(hdrs)
if ev:
findings.append(CrlfFinding(target, "query", payload, ev))
if host_header:
Groups CORS / CRLF / NoSQLi / JWT / OOB / LLM red-team into a single
loadable skill with routing table, per-tool usage, severity models, and
chain patterns — mirroring the graphql-audit skill structure. Wired into
the CLAUDE.md skills table; install.sh picks up skills/* automatically.
Codename after Argus Panoptes, the hundred-eyed giant — six 'eyes' that
surface what ordinary scans miss, including blind/out-of-band bugs.
Updates skill frontmatter name, title/tagline, and the CLAUDE.md row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants