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.

Enterprise license required — 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
TechniqueBanner grab, port probe, CVE matchingActive probe (HTTP, SMB, SSH, MySQL, custom)
IDS/IPS riskVery lowMedium — may trigger alerts
AuthorisationYesExplicit written authorisation required
FindingsVersion-based CVE matchingVerified exploitability / misconfiguration
Feature gatesec_scan_basic / sec_scan_fullsec_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 endpointsLow
exposures/Exposed files, API keys, backup filesLow
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_anonymousAnonymous SMB null sessionSMB TCP 445
http_basic_loginDefault HTTP Basic Auth credentialsHTTP
mysql_default_credsDefault MySQL root/admin credentialsMySQL TCP 3306
ssh_bannerSSH banner + known-vulnerable version stringsTCP 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.

Sandbox architecture
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/shadow access before storing
Scripts receive two environment variables: TARGET (hostname) and TARGET_IP (resolved IP). All other network connections are blocked.

API reference

Attack Test API
# 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-privileges reduces 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-interactsh disables OOB callbacks.
  • Custom script upload abuse: Restrict sec_attack_test to trusted operators only.

Next steps

  • → Remediation — fix findings via SSH with Vault credentials
  • → Features — full scan capabilities