Subtrace v2 β€” Attack Surface Mapper

Subtrace v2 is a reconnaissance and attack surface mapping tool developed in Python. The main goal is to transform raw reconnaissance data into a structured view of a target’s exposure: subdomains, endpoints, historical URLs, client-side routes extracted from JavaScript, and enriched metadata such as reachability, technologies, and risk heuristics.

Disclaimer: This tool is intended for authorized security testing and controlled environments only. Passive data sources and generated queries must be used responsibly and according to their terms of service.

🎯 What Does Subtrace Do?

Subtrace runs a modular pipeline that combines passive discovery, live crawling, JavaScript intelligence, technology fingerprinting, and risk scoring. Results are stored in a graph model to enable reporting and exporting into formats useful for security analysis.

🧠 Use Cases

πŸ” Implemented Features

πŸ—οΈ How It Was Created (Architecture)

The project was implemented as a set of independent modules connected by a CLI orchestrator. Each stage outputs structured data that is converted into nodes in an Attack Surface Graph.

πŸ“¦ Installation

πŸ–₯️ Main Menu

Subtrace provides an interactive CLI with target selection, scanning modules, and export controls. The crawler stage also displays a progress bar with visited/discovered counters.

Attack Surface Mapper

T  Set Target
1  Passive Discovery (+DNS + probe)
2  Live Crawling
3  Playwright SPA Scan
4  Historical URL Analysis
5  Technology Fingerprinting
6  Risk Analysis
7  Run Full Pipeline
8  Export Reports (HTML/MD/JSON/CSV/Neo4j)
D  Google Dorks (generate links)
S  Settings (Semgrep/TruffleHog)
0  Exit

πŸš€ How to Use

A typical workflow is:

Select option: T
Target: example.com

Select option: 7
Running passive discovery...
Starting crawler...
Crawling complete ... visited=300 discovered=...
Detected technologies: ...
Risk scoring applied to endpoints.

🧾 Reporting & Findings Distribution

Subtrace generates an HTML report designed to provide both a quick overview and actionable details. The report includes:

πŸ§ͺ JavaScript Vulnerability Scanning (Heuristics + External Tools)

During crawling, Subtrace collects JavaScript files and performs:

Note: These findings are indicators and require manual verification. The goal is to surface high-signal leads quickly during reconnaissance.

πŸ“€ Export Formats

🧩 Neo4j Integration (How to Read the Graph)

Subtrace exports a Cypher script (subtrace_neo4j.cypher) that can be imported into Neo4j.

cypher-shell -a bolt://localhost:7687 -u neo4j -p yourpassword < subtrace_neo4j.cypher

Example queries:

MATCH (e:ENDPOINT)
RETURN e.value, e.risk, e.score
ORDER BY e.score DESC
LIMIT 25;

βœ… Summary

Subtrace v2 demonstrates end-to-end security tooling development: async networking, parsing, graph modeling, heuristic analysis, and reporting. The project was designed to be modular and extendable, allowing new data sources, new extraction rules, and new scanners to be added with minimal disruption.

πŸ“  https://github.com/MarcoAbreu2002/Subtrace