Principle:ARCANGEL0 EVA Attack Surface Graph Generation
| Knowledge Sources | |
|---|---|
| Domains | Pentest, Knowledge_Graphs, Visualization |
| Last Updated | 2026-10-29 14:00 GMT |
Overview
Method for transforming session intelligence records into a structured graph of nodes and edges — representing assets, services, findings, exploits, observations, and accounts — and rendering it as an interactive offline HTML visualization.
Description
During a pentest engagement, the session Intel accumulates structured records: assets (targets, domains, IPs, services), findings (vulnerabilities), exploits, observations, and accounts. Attack surface graph generation transforms these flat records into a knowledge graph:
- Node generation: Each Intel record becomes a graph node with a stable ID, category (asset, service, finding, exploit, observation, account, person), label, and detail fields.
- Edge derivation: Relationships are inferred from:
* Asset parent fields (domain → hostname → IP → service hierarchies) * Finding/exploit/observation "asset" references * CIDR network containment (IP within network) * Optional transcript-derived connections
3 HTML assembly: The graph is rendered as a self-contained offline HTML file with:
* Interactive SVG graph with zoom, pan, and search * Category-based color coding and filtering * Node detail panel with evidence * No external dependencies — works fully offline
This principle addresses the problem that flat Intel lists are hard to visualize; a graph makes relationships (e.g., "this service exposes this finding") immediately visible.
Usage
Use this principle when:
- Visualizing the attack surface from accumulated pentest intelligence.
- Generating shareable, offline-capable engagement artifacts.
- Helping operators understand asset-to-finding-to-exploit relationships.
- Producing evidence-backed graph visualizations for reporting.
Theoretical Basis
Node generation uses category mapping based on asset type:
# Abstract algorithm (NOT real implementation)
ASSET_CATEGORIES = {
"target": "asset", "domain": "asset", "ip": "asset",
"service": "service", "technology": "service",
}
def build_graph(session):
for section, category in SECTIONS:
for i, record in enumerate(session["intel"][section]):
node_id = f"{section}:{record.get('id', i)}"
nodes.append({id: node_id, category: category, label: record["value"]})
Edge derivation uses reference resolution:
# Abstract algorithm (NOT real implementation)
for record in findings + exploits + observations:
asset_ref = record.get("asset")
if asset_ref in by_reference:
edges.append({source: node_id_of(asset_ref), target: node_id_of(record),
label: "has finding"})
Practical Guide
- Use stable node IDs derived from record IDs so nodes are consistent across regenerations.
- Cap evidence and details per node (12 evidence items, 40 total details) to keep the graph readable.
- Deduplicate edges using a key set to prevent duplicate connections.
- Embed all CSS and JS in the HTML template so the map works offline with no dependencies.
- Escape graph data for HTML safety — replace `<`, `>`, `&` with unicode escapes.
- Save with 0o600 permissions as an artifact under the session directory.