RCE CVE(≧9.0) scanner
# cve-scanner
Fingerprint-driven blind CVE scanner: first identify Web / service fingerprints, and only run CVE/vulnerability exp mapped to matched components. Falls back to full blind scanning when application fingerprint is not recognized. Automatically detects targets and verifies actual command execution (RCE).
**All targets use real Docker images, no mocking.**
---
## Fingerprint-driven workflow
```
target ──► fingerprint.Detect()
│
├─ Hit application fingerprint (WebLogic/Tomcat/Struts2/Spring/Shiro/ActiveMQ/...)
│ └─► Only execute CVE exp mapped to that component (+ generic leak detection)
│
├─ Only hit weak Web service fingerprint (nginx/Apache/PHP/Node.js)
│ └─► Treat as unrecognized, execute full exp blind scanning
│
└─ No fingerprint matched
└─► Full exp blind scanning
```
### Secondary fingerprint expansion during collection
All exp requests go through the same collector (`internal/capture`):
1. First round `fingerprint.Detect()` (`bb` as `QuickDetect`) gets baseline fingerprint;
2. Each exp / detection response is re-matched for fingerprints (`fingerprint.ObserveResponse`);
3. When new components appear beyond baseline (e.g., WebLogic / Struts2 / Shiro / Tomcat not recognized initially but exposed in later exp responses), immediately merge into fingerprint and continue executing exp mapped to that component; deduplication of already executed detections via `ran` set;
4. Both `bb` and `scan` follow this workflow; collection results from `scan` are also the payload source for smuggling replay.
### Smuggling replay after zero success (second pass)
When `bb` completes normal scanning with **0 findings** and `scan` has **0 PASS globally (no actual command output)**, automatically enter second pass:
1. Collector has recorded each actual exp request (method / path / headers / body) and direct response from this round;
2. For each target, first confirm CL.TE / TE.CL channel with limited TE obfuscation combinations;
3. Replay all collected payloads **completely** through the channel one by one (deduplicate by request, no longer limit count);
4. Smuggling response shows RCE features absent in direct response → `CRITICAL`; only confirm channel and successful delivery → `HIGH`;
5. Smuggling response is also subject to fingerprint identification: if new component is exposed, supplement running exp mapped to that component.
Supports http/https; automatically skip if no payload available for replay (e.g., only ran GET probes). `scan` mode has been integrated with the same collector, smuggling replay results written to result file as `CVE=SMUGGLING-REPLAY`.
Built-in fingerprint library references matching methods from webanalyze / Wappalyzer (response headers, Server, Set-Cookie, title, body features + deep probing for WebLogic Console / Tomcat Manager / Actuator / Nacos / Metabase / GeoServer / OFBiz / Solr), pure standard library implementation, no third-party dependencies. Component → CVE mapping see [internal/fingerprint/cve_map.go](internal/fingerprint/cve_map.go).
View fingerprints separately:
```bash
./cve-scanner fp -t http://127.0.0.1:7001
./cve-scanner fp -t http://127.0.0.1:8161 -json
```
---
## Supported vulnerabilities
| CVE | Component | Protocol | CVSS | Affected versions | Port | id | whoami | hostname | pwd |
|-----|-----------|----------|------|-------------------|------|-----|--------|----------|-----|
| [CVE-2026-70748](docs/CVE-2026-70748.md) | Oracle WebLogic Server | T3/IIOP | 9.8 | 12.2.1.4, 14.1.1.0 | 7