vamp-log-hunter
Forensic log analyzer that detects Indicators of Compromise across 14 attack categories
VampSecure Labs · Security Research Division
🇬🇧 English
vamp-log-hunter is a forensic log analysis tool for detecting Indicators of Compromise (IoC) in system logs. It processes nginx, Apache, auth.log, syslog, and journald logs line-by-line — without loading full files into memory — and correlates events across 14 attack categories ranging from SSH brute force and SQL injection to webshell access and anomalous nocturnal activity. Each finding carries remediation steps and structured evidence lines ready for inclusion in client security reports.
Built-in threat intelligence covers known scanner IP ranges (Shodan, Censys, GreyNoise, Tor exit nodes) and automatically tags findings whose source IPs match those ranges.
Features
- 14 IoC categories: SSH brute force, web brute force (4xx flood), directory scanning, SQL injection, XSS, path traversal / LFI, webshell access, sensitive file enumeration (
.env,.git,wp-config, etc.), scanner User-Agent detection,sudo/suprivilege escalation, suspicious cron jobs, direct root SSH login, known-scanner IP correlation, and anomalous nocturnal traffic (02:00–05:59) - Known-scanner intelligence: built-in IP and CIDR database for Shodan, Censys, GreyNoise, SecurityTrails, Masscan, and Tor exit nodes — findings from those sources are automatically labelled
- Multi-format log support: nginx / Apache Combined Log Format, syslog, auth.log (gzip-compressed
.log.gzhandled transparently); stdin pipe via--file - - Configurable thresholds for brute-force event counts (
--threshold-brute) and directory scan path counts (--threshold-scan) - Time-window filtering with
--last-hoursto focus on recent events without reprocessing full logs - Top offensive IPs table summarizing total event counts per source with scanner tag
- JSON export — structured schema with full finding metadata: severity, category, source IPs, first/last seen timestamps, evidence lines, and remediation
- Standalone dark-theme HTML report — zero CDN dependencies; KPI summary bar + sortable findings table + detailed expandable cards
- Unified VSL client report (HTML/PDF) via
--report-html/--report-pdfflags - Rich console output with color-coded severity panels and a top-IPs summary table
Requirements
pip install -r requirements.txt
| Package | Version |
|---|---|
rich |
>= 13.7.0 |
Standard library: argparse, gzip, ipaddress, json, re, sys, collections, datetime, pathlib.
Installation
pip install vamp-log-hunter
# or with Homebrew:
brew install vampsecure-labs/labs/vamp-log-hunter
git clone https://github.com/Vampsecure-Labs/vamp-log-hunter.git
cd vamp-log-hunter
pip install -r requirements.txt
Usage
python vamp_log_hunter.py --help
usage: vamp_log_hunter.py [-h] [--file FILE] [--log-type {nginx,apache,auth,syslog,journald,auto}]
[--log-dir DIR] [--last-hours N] [--threshold-brute N]
[--threshold-scan N] [--json FILE] [--html FILE] [-v]
Examples
Scan all logs in /var/log (auto-discovery):
python vamp_log_hunter.py
Analyze specific log files:
python vamp_log_hunter.py --file /var/log/nginx/access.log \
--file /var/log/auth.log
Focus on the last 24 hours, lower brute-force threshold to 5 events:
python vamp_log_hunter.py --last-hours 24 --threshold-brute 5
Export JSON and standalone dark-theme HTML report:
python vamp_log_hunter.py --json report.json --html report.html
Read from stdin (pipe):
cat /var/log/nginx/access.log | python vamp_log_hunter.py --file -
Analyze a gzip-compressed rotated log:
python vamp_log_hunter.py --file /var/log/nginx/access.log.1.gz
IoC Category Reference
| ID | Category | Log Source |
|---|---|---|
| LOG-001 | SSH brute force | auth.log / syslog |
| LOG-002 | Web brute force (4xx flood) | nginx / apache |
| LOG-003 | Directory enumeration (unique 404s) | nginx / apache |
| LOG-004 | SQL injection in URI | nginx / apache |
| LOG-005 | XSS payload in URI | nginx / apache |
| LOG-006 | Path traversal / LFI | nginx / apache |
| LOG-007 | Webshell access or RCE parameter | nginx / apache |
| LOG-008 | Sensitive file access | nginx / apache |
| LOG-009 | Scanner User-Agent | nginx / apache |
| LOG-010 | sudo / su privilege escalation | auth.log / syslog |
| LOG-011 | Suspicious cron job commands | syslog |
| LOG-012 | Direct root SSH login | auth.log |
| LOG-013 | Known-scanner IP | nginx / apache |
| LOG-014 | Anomalous nocturnal activity (02:00–05:59) | nginx / apache / auth |
Output Formats
| Format | Flag | Description |
|---|---|---|
| Console (Rich) | (default) | Severity-ordered panels with evidence, IPs, timestamps, and remediation |
| JSON | --json FILE |
Full structured export with all finding fields |
| HTML | --html FILE |
Standalone dark-theme report with KPI bar and finding cards |
Exit Codes
| Code | Meaning |
|---|---|
0 |
No IoC found |
1 |
One or more IoC findings detected |
Sample Output
vamp-log-hunter v1.4 · scanning /var/log/ (5 sources, 248 MB)
──────────────────────────────────────────────────────────────
[+] nginx/access.log · auth.log · syslog parsed in 4.1s
┌─ CRITICAL ──────────────────────────────────────────────────────────┐
│ LOG-001 SSH Brute Force │
│ Source: 192.168.0.0/16 proxy · 847 failed logins in 12 min │
│ Targets: root, ubuntu, admin, deploy │
│ First: 2026-10-07T03:14:22 · Last: 2026-10-07T03:26:11 │
│ ATT&CK: T1110.001 · Remediation: block IP range, enable fail2ban │
└─────────────────────────────────────────────────────────────────────┘
[HIGH] LOG-004 SQL injection — 23 requests from 10.0.2.45
Payload: ' OR 1=1 UNION SELECT ... · URI: /api/search
[HIGH] LOG-007 Webshell probe: /wp-content/uploads/shell.php (404->200)
[HIGH] LOG-013 Known scanner IP: 192.0.2.55 (Shodan crawler range)
[MEDIUM] LOG-003 Directory enumeration: 1,847 unique 404s in 3 min
[MEDIUM] LOG-014 Nocturnal activity: 312 auth events between 02:00-05:59
[LOW] LOG-012 Direct root SSH login: 2 events from 192.168.10.5
──────────────────────────────────────────────────
Top offensive IPs:
192.0.2.55 · 1,204 events · [SHODAN SCANNER]
10.0.2.45 · 147 events
192.0.2.199 · 89 events · [TOR EXIT NODE]
Total: 7 findings · 14 categories scanned
Why vamp-log-hunter vs. Fail2ban · GoAccess · CrowdSec
| Feature | vamp-log-hunter | Fail2ban | GoAccess | CrowdSec |
|---|---|---|---|---|
| Forensic IoC detection across 14 categories | ✅ | ❌ | ❌ | ❌ |
| Structured JSON export with evidence lines | ✅ | ❌ | ✅ | ✅ |
| Built-in scanner IP intelligence (Shodan, Tor, Censys) | ✅ | ❌ | ❌ | ✅ |
| Offline / air-gapped operation | ✅ | ✅ | ✅ | ❌ |
| HTML dark-theme standalone report | ✅ | ❌ | ✅ | ❌ |
| Reads compressed (.log.gz) rotated logs | ✅ | ❌ | ✅ | ❌ |
| Remediation steps per finding | ✅ | ❌ | ❌ | ❌ |
| Multi-category correlation without daemon/agent | ✅ | ❌ | ❌ | ❌ |
| MITRE ATT&CK technique per finding | ✅ | ❌ | ❌ | ❌ |
- Post-incident forensics vs. live blocking. Fail2ban and CrowdSec are daemons that react in real time — they produce no forensic report, no evidence lines, and no historical re-analysis. vamp-log-hunter was designed for investigations: feed it any log file from any date and get structured findings ready for a client report.
- IoC intelligence baked in. The built-in database of Shodan, Censys, GreyNoise, SecurityTrails, Masscan, and Tor exit-node CIDRs automatically labels known-scanner activity without a cloud lookup or API key.
- 14 correlated categories in one pass. GoAccess gives you traffic statistics. vamp-log-hunter gives you an attacker story: SQL injection origin, webshell probe at 03:14, root SSH login at 03:26 — correlated across nginx, auth.log, and syslog simultaneously.
- Report-ready output. Every finding ships with severity, ATT&CK mapping, evidence lines, timestamps, and remediation text — structured to paste directly into a penetration-test or incident-response report.
Check Coverage
| Check ID | Description | Standard | Severity |
|---|---|---|---|
| LOG-001 | SSH brute force: repeated authentication failures on sshd | MITRE T1110.001 | HIGH |
| LOG-002 | Web brute force: 4xx flood from single source in short window | MITRE T1110 | HIGH |
| LOG-003 | Directory enumeration: high unique 404 count (path fuzzing) | MITRE T1083 | MEDIUM |
| LOG-004 | SQL injection patterns in request URI or POST body | OWASP A03:2021 · MITRE T1190 | CRITICAL |
| LOG-005 | XSS payload detected in URI parameters | OWASP A03:2021 · MITRE T1190 | HIGH |
| LOG-006 | Path traversal / LFI: ../ sequences or /etc/passwd in URI |
OWASP A01:2021 · MITRE T1083 | HIGH |
| LOG-007 | Webshell access or RCE-style parameter in web request | MITRE T1505.003 | CRITICAL |
| LOG-008 | Sensitive file probing: .env, .git, wp-config, private keys |
MITRE T1083 | HIGH |
| LOG-009 | Scanner User-Agent fingerprint (sqlmap, nikto, nmap, gobuster…) | MITRE T1595 | MEDIUM |
| LOG-010 | sudo / su privilege escalation with suspicious commands | MITRE T1548.003 | HIGH |
| LOG-011 | Suspicious cron job commands (persistence) | MITRE T1053.003 | HIGH |
| LOG-012 | Direct root SSH login (PermitRootLogin bypass) | MITRE T1078.003 | HIGH |
| LOG-013 | Source IP matches known scanner range (Shodan, Censys, Tor exit) | MITRE T1595 | MEDIUM |
| LOG-014 | Anomalous nocturnal activity: auth or web events at 02:00–05:59 | MITRE T1078 | MEDIUM |
Part of VampSecure Labs Toolkit
This tool is part of the VampSecure Labs Security Toolkit — a collection of research-grade security tools for authorized penetration testing and red/blue team exercises.
- Full toolkit: github.com/Vampsecure-Labs
Version History
| Version | Main changes |
|---|---|
| v1.4 | MITRE ATT&CK technique per finding, mapped by category (attack field in JSON, shown in console and HTML). Completed the Check Coverage catalog (LOG-005 → T1190, LOG-011 → T1053.003). |
| v1.3 | Bilingual README (EN/ES) |
| v1.2 | 14 IoC categories, known-scanner IP intelligence, dark-theme HTML report |
© VampSecure Studios — VampSecure Labs Security Research Division
For authorized security testing only.
🇪🇸 Español
vamp-log-hunter es una herramienta de análisis forense de logs para detectar Indicadores de Compromiso (IoC) en logs del sistema. Procesa logs de nginx, Apache, auth.log, syslog y journald línea a línea —sin cargar ficheros completos en memoria— y correlaciona eventos en 14 categorías de ataque, desde fuerza bruta SSH e inyección SQL hasta acceso a webshells y actividad nocturna anómala. Cada hallazgo incluye pasos de remediación y líneas de evidencia estructuradas listas para incluir en informes de seguridad para clientes.
La inteligencia de amenazas integrada cubre rangos de IP de escáneres conocidos (Shodan, Censys, GreyNoise, nodos de salida Tor) y etiqueta automáticamente los hallazgos cuyas IPs de origen coincidan con esos rangos.
Características
- 14 categorías de IoC: fuerza bruta SSH, fuerza bruta web (flood 4xx), escaneo de directorios, inyección SQL, XSS, path traversal / LFI, acceso a webshells, enumeración de ficheros sensibles (
.env,.git,wp-config, etc.), detección de User-Agent de escáner, escalada de privilegiossudo/su, cron jobs sospechosos, login directo como root SSH, correlación de IPs de escáneres conocidos y tráfico nocturno anómalo (02:00–05:59) - Inteligencia de escáneres conocidos: base de datos integrada de IPs y CIDRs de Shodan, Censys, GreyNoise, SecurityTrails, Masscan y nodos de salida Tor — los hallazgos de esas fuentes se etiquetan automáticamente
- Soporte multi-formato de logs: Combined Log Format nginx/Apache, syslog, auth.log (
.log.gzcomprimido gzip tratado de forma transparente); pipe stdin vía--file - - Umbrales configurables para conteo de eventos de fuerza bruta (
--threshold-brute) y conteo de rutas en escaneo de directorios (--threshold-scan) - Filtrado por ventana de tiempo con
--last-hourspara centrarse en eventos recientes sin reprocesar logs completos - Tabla de IPs ofensivas top que resume el conteo total de eventos por fuente con etiqueta de escáner
- Exportación JSON — esquema estructurado con metadatos completos de hallazgos: severidad, categoría, IPs de origen, timestamps de primera/última aparición, líneas de evidencia y remediación
- Informe HTML dark-theme standalone — sin dependencias CDN; barra de resumen KPI + tabla de hallazgos ordenable + tarjetas expandibles detalladas
- Informe unificado VSL para cliente (HTML/PDF) vía flags
--report-html/--report-pdf - Salida enriquecida en consola con paneles de severidad con código de colores y tabla resumen de IPs top
Requisitos
pip install -r requirements.txt
| Paquete | Versión |
|---|---|
rich |
>= 13.7.0 |
Librería estándar: argparse, gzip, ipaddress, json, re, sys, collections, datetime, pathlib.
Instalación
pip install vamp-log-hunter
# o con Homebrew:
brew install vampsecure-labs/labs/vamp-log-hunter
git clone https://github.com/Vampsecure-Labs/vamp-log-hunter.git
cd vamp-log-hunter
pip install -r requirements.txt
Uso
python vamp_log_hunter.py --help
Ejemplos
Escanear todos los logs en /var/log (auto-descubrimiento):
python vamp_log_hunter.py
Analizar ficheros de log específicos:
python vamp_log_hunter.py --file /var/log/nginx/access.log \
--file /var/log/auth.log
Centrarse en las últimas 24 horas, reducir umbral de fuerza bruta a 5 eventos:
python vamp_log_hunter.py --last-hours 24 --threshold-brute 5
Exportar JSON e informe HTML dark-theme standalone:
python vamp_log_hunter.py --json report.json --html report.html
Leer desde stdin (pipe):
cat /var/log/nginx/access.log | python vamp_log_hunter.py --file -
Analizar un log rotado comprimido con gzip:
python vamp_log_hunter.py --file /var/log/nginx/access.log.1.gz
Referencia de categorías IoC
| ID | Categoría | Fuente de log |
|---|---|---|
| LOG-001 | Fuerza bruta SSH | auth.log / syslog |
| LOG-002 | Fuerza bruta web (flood 4xx) | nginx / apache |
| LOG-003 | Enumeración de directorios (404 únicos) | nginx / apache |
| LOG-004 | Inyección SQL en URI | nginx / apache |
| LOG-005 | Payload XSS en URI | nginx / apache |
| LOG-006 | Path traversal / LFI | nginx / apache |
| LOG-007 | Acceso a webshell o parámetro RCE | nginx / apache |
| LOG-008 | Acceso a fichero sensible | nginx / apache |
| LOG-009 | User-Agent de escáner | nginx / apache |
| LOG-010 | Escalada de privilegios sudo / su | auth.log / syslog |
| LOG-011 | Comandos sospechosos en cron job | syslog |
| LOG-012 | Login SSH directo como root | auth.log |
| LOG-013 | IP de escáner conocido | nginx / apache |
| LOG-014 | Actividad nocturna anómala (02:00–05:59) | nginx / apache / auth |
Formatos de salida
| Formato | Flag | Descripción |
|---|---|---|
| Consola (Rich) | (predeterminado) | Paneles ordenados por severidad con evidencia, IPs, timestamps y remediación |
| JSON | --json FILE |
Exportación estructurada completa con todos los campos del hallazgo |
| HTML | --html FILE |
Informe dark-theme standalone con barra KPI y tarjetas de hallazgos |
Códigos de salida
| Código | Significado |
|---|---|
0 |
Sin IoC encontrados |
1 |
Uno o más hallazgos de IoC detectados |
Por qué vamp-log-hunter vs. Fail2ban · GoAccess · CrowdSec
| Feature | vamp-log-hunter | Fail2ban | GoAccess | CrowdSec |
|---|---|---|---|---|
| Detección forense de IoC en 14 categorías | ✅ | ❌ | ❌ | ❌ |
| Exportación JSON estructurada con líneas de evidencia | ✅ | ❌ | ✅ | ✅ |
| Inteligencia de IP de escáneres conocidos (Shodan, Tor, Censys) | ✅ | ❌ | ❌ | ✅ |
| Operación offline / air-gapped | ✅ | ✅ | ✅ | ❌ |
| Informe HTML dark-theme standalone | ✅ | ❌ | ✅ | ❌ |
| Lee logs rotados comprimidos (.log.gz) | ✅ | ❌ | ✅ | ❌ |
| Pasos de remediación por hallazgo | ✅ | ❌ | ❌ | ❌ |
| Correlación multi-categoría sin daemon/agente | ✅ | ❌ | ❌ | ❌ |
| Técnica MITRE ATT&CK por hallazgo | ✅ | ❌ | ❌ | ❌ |
Cobertura de checks
| Check ID | Descripción | Estándar | Severidad |
|---|---|---|---|
| LOG-001 | Fuerza bruta SSH: autenticaciones fallidas repetidas en sshd | MITRE T1110.001 | HIGH |
| LOG-002 | Fuerza bruta web: flood 4xx desde fuente única en ventana corta | MITRE T1110 | HIGH |
| LOG-003 | Enumeración de directorios: alto conteo de 404 únicos (path fuzzing) | MITRE T1083 | MEDIUM |
| LOG-004 | Patrones de inyección SQL en URI o cuerpo POST de la petición | OWASP A03:2021 · MITRE T1190 | CRITICAL |
| LOG-005 | Payload XSS detectado en parámetros URI | OWASP A03:2021 · MITRE T1190 | HIGH |
| LOG-006 | Path traversal / LFI: secuencias ../ o /etc/passwd en URI |
OWASP A01:2021 · MITRE T1083 | HIGH |
| LOG-007 | Acceso a webshell o parámetro estilo RCE en petición web | MITRE T1505.003 | CRITICAL |
| LOG-008 | Sondeo de ficheros sensibles: .env, .git, wp-config, claves privadas |
MITRE T1083 | HIGH |
| LOG-009 | Huella digital de User-Agent de escáner (sqlmap, nikto, nmap, gobuster…) | MITRE T1595 | MEDIUM |
| LOG-010 | Escalada de privilegios sudo / su con comandos sospechosos | MITRE T1548.003 | HIGH |
| LOG-011 | Comandos sospechosos en cron job (persistencia) | MITRE T1053.003 | HIGH |
| LOG-012 | Login SSH directo como root (bypass PermitRootLogin) | MITRE T1078.003 | HIGH |
| LOG-013 | IP de origen coincide con rango de escáner conocido (Shodan, Censys, Tor exit) | MITRE T1595 | MEDIUM |
| LOG-014 | Actividad nocturna anómala: eventos de auth o web entre 02:00–05:59 | MITRE T1078 | MEDIUM |
Parte del toolkit VampSecure Labs
Esta herramienta es parte del Toolkit de Seguridad de VampSecure Labs — una colección de herramientas de seguridad de grado investigación para pruebas de penetración autorizadas y ejercicios red/blue team.
- Portfolio completo: github.com/Vampsecure-Labs
Historial de versiones
| Versión | Cambios principales |
|---|---|
| v1.4 | Técnica MITRE ATT&CK por hallazgo, mapeada por categoría (campo attack en JSON, mostrada en consola y HTML). Catálogo de cobertura completado (LOG-005 → T1190, LOG-011 → T1053.003). |
| v1.3 | README bilingüe (EN/ES) |
| v1.2 | 14 categorías IoC, inteligencia de IPs de escáneres conocidos, informe HTML dark-theme |
© VampSecure Studios — VampSecure Labs Security Research Division
Solo para pruebas de seguridad autorizadas.
Metadata
Release files for vamp-log-hunter 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vamp_log_hunter-1.4.tar.gz | 68.6 kB | Without provenance | Details for vamp_log_hunter-1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vamp_log_hunter-1.4-py3-none-any.whl | Python 3 | none | any | Details for vamp_log_hunter-1.4-py3-none-any.whl |
Total release size: 125.3 kB
Release files / vamp_log_hunter-1.4.tar.gz
| Download URL | vamp_log_hunter-1.4.tar.gz |
|---|---|
| Size | 68.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f1c2091d4904be21bcbdbc71fba93fb2ce7507dde8d2089c67e22da999a8509
|
|
BLAKE2b-256 checksum How to use checksums |
49ad4344e7b66c305da0c8afaf9608a46ae8f3790ec97227ada77c376901657b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / vamp_log_hunter-1.4-py3-none-any.whl
| Download URL | vamp_log_hunter-1.4-py3-none-any.whl |
|---|---|
| Size | 56.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cb2a1fe9b5e79af4aebbb3bebd80214be6bb6a208e66967181dc3d4e9c0bd1c
|
|
BLAKE2b-256 checksum How to use checksums |
b854a1282ebdf969e2b2ecad04ff536b43e801f5ffe8d58720f89c59588736f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for vamp-log-hunter 1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.