Attack Test
Ravenscan's Attack Test module upgrades passive scanning into active vulnerability assessment — Nuclei templates, Metasploit-lite read-only scanners, and sandboxed custom scripts, all against pre-registered targets only.
sec_attack_test feature flag. Every run is permanently WORM-logged. Explicit written authorisation from the target owner is required before running attack tests. Passive scan vs. Attack Test
| Aspect | Passive Scan | Attack Test |
|---|---|---|
| Technique | Banner grab, port probe, CVE matching | Active probe (HTTP, SMB, SSH, MySQL, custom) |
| IDS/IPS risk | Very low | Medium — may trigger alerts |
| Authorisation | Yes | Explicit written authorisation required |
| Findings | Version-based CVE matching | Verified exploitability / misconfiguration |
| Feature gate | sec_scan_basic / sec_scan_full | sec_attack_test (Enterprise only) |
Nuclei templates
Ravenscan wraps the Nuclei binary (MIT-licensed, ProjectDiscovery). The binary is downloaded on first use from the official GitHub Releases page (SHA-256 verified) and is not bundled in the Docker image. ~10,000 community templates are synced via shallow git clone.
| Category | What it checks | False-positive rate |
|---|---|---|
cves/ | Known CVEs (requires exact version match or PoC) | Low–Medium |
misconfiguration/ | Default credentials, exposed admin panels, debug endpoints | Low |
exposures/ | Exposed files, API keys, backup files | Low |
network/ | Network-level misconfigurations (DNS, SMTP, etc.) | Very low |
fuzzing/ | Parameter fuzzing (SQLi, XSS, path traversal) | High — use with caution in production |
Flags used: -no-interactsh -timeout 30 -retries 1 -json -silent. No connections to external Interactsh servers.
Metasploit-lite scanners
Metasploit is not embedded (GPLv3 + too heavy). Ravenscan re-implements four safe auxiliary scanners in native Go. All are read-only — no exploit, no file write, no remote command execution.
| Scanner | Checks | Protocol |
|---|---|---|
smb_anonymous | Anonymous SMB null session | SMB TCP 445 |
http_basic_login | Default HTTP Basic Auth credentials | HTTP |
mysql_default_creds | Default MySQL root/admin credentials | MySQL TCP 3306 |
ssh_banner | SSH banner + known-vulnerable version strings | TCP 22 (no auth) |
Custom scripts (sandboxed)
Upload Python (.py) or Bash (.sh) scripts. Every script runs inside an ephemeral Docker container with hard network isolation.
docker run --rm
--name ravenscan-script-<id>
--network none # no general internet egress
--add-host=TARGET:<resolved_ip> # only this IP reachable
--memory 128m --cpus 0.5
--read-only # immutable rootfs
--tmpfs /tmp:rw,noexec,nosuid,size=10m
--security-opt no-new-privileges
-e TARGET=<host> -e TARGET_IP=<ip>
python:3.12-slim python3 /scripts/<script> - Hard timeout: 60 seconds (SIGKILL)
- Output cap: 1 MB
- Static safety check rejects fork bombs, recursive
rm -rf /, reverse shells (/dev/tcp/), and/etc/shadowaccess before storing
TARGET (hostname) and TARGET_IP (resolved IP). All other network connections are blocked.
API reference
# Start an attack test run
curl -X POST https://ravenscan.example.com/api/v1/attacktest/run \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_id": "uuid-of-registered-target",
"templates": ["misconfiguration/", "cves/"],
"scanners": ["smb_anonymous", "ssh_banner"]
}'
# Poll run status
curl https://ravenscan.example.com/api/v1/attacktest/runs/{run_id} \
-H "Authorization: Bearer $API_KEY"
# Upload a custom script
curl -X POST https://ravenscan.example.com/api/v1/attacktest/custom-scripts/upload \
-H "Authorization: Bearer $API_KEY" \
-F "[email protected]"
# Sync Nuclei templates (admin)
curl -X POST https://ravenscan.example.com/api/v1/attacktest/sync-templates \
-H "Authorization: Bearer $API_KEY" Residual security risks
- Sandbox escape: Docker
--network none+no-new-privilegesreduces but does not eliminate risk. Run Ravenscan on a CIS Docker Benchmark-hardened host. - Template supply chain: Nuclei templates are pulled from the ProjectDiscovery GitHub repo. A compromised template could exfiltrate data. Mitigation:
-no-interactshdisables OOB callbacks. - Custom script upload abuse: Restrict
sec_attack_testto trusted operators only.
Next steps
- → Remediation — fix findings via SSH with Vault credentials
- → Features — full scan capabilities