Skip to main content

vamp-easm

Continuous External Attack Surface Management with daily diff tracking

Part of the VampSecure Labs security toolkit.


Overview

vamp-easm is a lightweight EASM engine designed to run continuously (via cron or CI/CD) against one or more external domains. Unlike point-in-time scanners, its core value is delta detection: each run is compared against the previous snapshot stored in a local SQLite database, surfacing only what changed.

Key Features

  • Subdomain enumeration — queries crt.sh (Certificate Transparency) and HackerTarget via standard urllib (no external dependencies for this layer)
  • Port scanning — async TCP connect scan over the top-100 most common ports using asyncio + stdlib socket; optional nmap backend for accuracy
  • TLS certificate inspection — hostname, issuer, expiration date, SANs, self-signed detection and SHA-256 fingerprint via stdlib ssl
  • SQLite history — every scan is stored; diffs are computed against the last completed scan for the same target
  • Structured findings — diffs are normalized as VSL findings (prefix EASM-NNN) compatible with vamp-penreport
  • Webhook alerts — POSTs a JSON payload (Slack/Discord/Mattermost compatible) when CRITICAL or HIGH diffs are found
  • Exit codes — machine-friendly: 0 clean, 1 HIGH diffs, 2 CRITICAL diffs (CI/CD and monitoring ready)

Diff Types and Severities

Category Severity Description
NUEVO_SUBDOMINIO HIGH A subdomain not seen in the previous scan has appeared
NUEVO_PUERTO MEDIUM A TCP port is open that was closed in the previous scan
CERT_EXPIRADO HIGH / CRITICAL TLS certificate expires within 30 days (HIGH) or is already expired (CRITICAL)
CERT_CAMBIADO CRITICAL TLS fingerprint changed since the last scan — possible re-issue or MitM
SERVICIO_DESAPARECIDO LOW A previously open port is no longer reachable
IP_CAMBIADA MEDIUM DNS resolution for a known subdomain returned a different IP

Installation

pip install vamp-easm
# o con Homebrew:
brew install vampsecure-labs/labs/vamp-easm
# 1. Clone and enter the directory
git clone https://github.com/Vampsecure-Labs/vamp-easm.git
cd vamp-easm

# 2. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

Optional: install nmap on your system and use --nmap for more reliable port scanning.


Usage

Scan a target

# Default: top-100 ports, stdlib async scanner
python vamp_easm.py scan --target example.com

# Custom port list
python vamp_easm.py scan --target example.com --ports 22,80,443,8080,8443

# Use nmap as port-scan backend (requires nmap in PATH)
python vamp_easm.py scan --target example.com --nmap

# Export findings as HTML and JSON reports
python vamp_easm.py scan --target example.com --html --json

# Send alerts to a webhook on CRITICAL/HIGH diffs
python vamp_easm.py scan --target example.com --alert-webhook https://hooks.slack.com/...

# Full example
python vamp_easm.py scan \
  --target example.com \
  --ports top100 \
  --html \
  --alert-webhook "$SLACK_WEBHOOK" \
  --client "AcmeCorp" \
  --engagement "Q3-2026-EASM"

View scan history

python vamp_easm.py history --target example.com
python vamp_easm.py history --target example.com --limit 20

List known assets

python vamp_easm.py assets --target example.com

Export a snapshot

# Export last scan as both JSON and HTML
python vamp_easm.py export --target example.com

# JSON only
python vamp_easm.py export --target example.com --json

Cron Example

Run a daily EASM scan with Slack alerts and log output:

0 6 * * * cd /opt/vamp-easm && .venv/bin/python vamp_easm.py scan --target midominio.com --alert-webhook $SLACK_URL >> /var/log/vamp-easm.log 2>&1

For CI/CD, use the exit code to gate pipelines:

python vamp_easm.py scan --target example.com
EXIT=$?
if [ $EXIT -eq 2 ]; then
  echo "CRITICAL diffs detected — blocking pipeline"
  exit 1
elif [ $EXIT -eq 1 ]; then
  echo "HIGH diffs detected — review required"
fi

Environment Variables

Variable Description
EASM_ALERT_WEBHOOK Webhook URL for alerts (alternative to --alert-webhook)

Database

The SQLite database vamp_easm.db is created automatically in the working directory. It contains three tables:

  • scans — one row per scan run (UUID, target, timestamps, asset/diff counts)
  • assets — discovered hosts, subdomains, open ports and services with first/last-seen timestamps
  • certs — TLS certificate snapshots (issuer, expiration, SANs, SHA-256 fingerprint)

The database file is excluded from version control (.gitignore). Back it up if you want to preserve historical data.


Integration with vamp-penreport

vamp-easm exports findings in the VSL standard format used across all VampSecure Labs tools. To include EASM findings in a pentest report:

# 1. Generate JSON snapshot from the last scan
python vamp_easm.py export --target example.com --json

# 2. Merge with vamp-penreport (pass the JSON as an additional findings source)
python ../vamp-penreport/vamp_penreport.py \
  --findings easm_export_example.com_*.json \
  --client "AcmeCorp" \
  --engagement "Pentest-2026-Q3" \
  --html report_acmecorp.html

The EASM-NNN finding IDs are stable within a single scan run and can be referenced in report narratives.


Dependencies

Package Purpose
aiohttp>=3.9.0 Async HTTP client for subdomain source queries
rich>=13.7.0 Terminal output tables and panels
stdlib only Port scanning, TLS inspection, DNS queries, alerts

License

MIT License — see LICENSE for details.

© VampSecure Studios — VampSecure Labs Security Research Division
For authorized penetration testing use only.


Versión

v1.3 — VampSecure Labs Security Research Division

Release files for vamp-easm 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vamp-easm 1.4
File Size Uploaded
vamp_easm-1.4.tar.gz 43.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vamp-easm 1.4
File Interpreter ABI Platform
vamp_easm-1.4-py3-none-any.whl Python 3 none any Details

Total release size: 87.9 kB

Release files / vamp_easm-1.4.tar.gz

Download URL vamp_easm-1.4.tar.gz
Size 43.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e88cb5f6f0d46b6e82d81ec01d6d78a4178584eebe83c70860a871c8eedbea10
BLAKE2b-256 checksum
How to use checksums
616739edab48bd0565012468afe6925ebfc1e27e330557442e96176973f6c3c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / vamp_easm-1.4-py3-none-any.whl

Download URL vamp_easm-1.4-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fad3aa281eab6905d302731f644f30cdbff293eccb16bf49350171603d9bac94
BLAKE2b-256 checksum
How to use checksums
22ff4ded29ec5de2e67adb4e0d2f37e90a285e34c4aa69f9acc4b5e7e8caa3c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.5

2 release files

This release

1.4 This release

2 release files

1.3

2 release files

1.2

1 release file

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page