Attack Flow Generator
Generate SITF-compliant attack flow JSON files from attack descriptions or incident reports.
Usage
/attack-flow <attack-name> [source]
attack-name: Identifier for the attack (e.g., "s1ngularity", "solarwinds")
source: URL, "websearch" for auto-research, or omit to use conversation context
Arguments: $ARGUMENTS
Instructions
When this skill is invoked:
Phase 1: Research
If source is "websearch" or a URL, gather attack details:
- Attack timeline and phases
- Entry point and initial access method
- Lateral movement and persistence techniques
- Data exfiltration or impact
- Affected components (CI/CD, VCS, Registry, Endpoint, Production)
If source is omitted, use context from the current conversation.
Phase 2: Technique Mapping
Read techniques.json to get the full technique library.
For each attack step, find the best matching technique:
- Match by action semantics, not surface keywords
- Example: Uploading stolen data to repos → T-V003 (Secret Exfiltration), NOT T-V008 (Malicious Hosting)
- Example: Accessing VCS with stolen creds → T-V001 must come BEFORE any VCS actions
If no matching technique exists:
- Create a placeholder node with
"type": "technique-gap"
- Include suggested technique metadata in the data field
- Note in output that
/technique-proposal should be run for gaps
Phase 3: Layout Calculation
Apply these layout rules:
Rule 1: Component Layout (Left-to-Right by Attack Flow)
- Order components by their sequence in the attack chain, not by standard SITF order
- If attack flows CI/CD → Registry → Endpoint → VCS, layout left-to-right accordingly
- Minimum horizontal gap between components: 80-100px
- Component x-positions: Use increments of ~300px starting from x=0
Rule 2: Technique Ordering (Top-to-Bottom)
- Primary: Order techniques by their sequence in the attack flow
- Secondary: Within same attack step, order by stage (Initial Access → Discovery → Post-Compromise)
- Vertical gap between techniques: ~130-150px
- First technique starts at y = component.y + 80
Rule 3: Technique-Component Alignment
- Every technique node MUST be visually positioned within its parent component
- Calculate x-position:
component.x + 30
- Validate technique.data.component matches parent component.data.componentId
Rule 4: Component Sizing
- Height = (technique_count × 150) + 120 (padding)
- Width = 230-250px
Rule 5: Edge Connections
- Connect source.bottom → target.top for vertical flows within component
- Connect source.right → target.left for cross-component flows
- Add labels for significant transitions ("Second wave", etc.)
- Use
"type": "smoothstep" for all edges
Phase 4: JSON Generation
Generate the attack flow JSON with this structure:
{
"metadata": {
"name": "Attack Name",
"created": "ISO-8601 timestamp",
"version": "1.0",
"framework": "SITF",
"description": "Brief attack description"
},
"nodes": [
// Entry points, components, techniques, exit points
],
"edges": [
// Connections between nodes
]
}
Node types:
entryPoint: Attack entry (Phishing, Vulnerability Exploit, Stolen Credentials, etc.)
component: SITF component container (endpoint, vcs, cicd, registry, production)
technique: Attack technique from techniques.json
technique-gap: Placeholder for missing technique (flag for /technique-proposal)
exitPoint: Attack outcome (Future Breach, Persistence, Secondary Supply Chain Attack, etc.)
Phase 5: Validation
Run this checklist before outputting:
[ ] Valid JSON structure (parse test passes)
[ ] Required fields present: metadata.{name,created,version,framework}, nodes[], edges[]
[ ] All node IDs are unique
[ ] All edge source/target reference valid node IDs
[ ] All techniques positioned within their component boundaries (x/y validation)
[ ] Techniques ordered by attack flow sequence
[ ] Initial Access techniques appear first when order is ambiguous
[ ] All technique IDs exist in techniques.json OR flagged as technique-gap
[ ] Exit points connected to terminal techniques
[ ] No orphaned nodes (every non-entry node has incoming edge)
Phase 6: Output
- Write the JSON file to
sample-flows/<attack-name>.json
- Validate the JSON with Python:
python3 -c "import json; json.load(open('file'))"
- Provide a summary table of the attack flow
- If any technique-gaps exist, list them and recommend running
/technique-proposal
Example
/attack-flow s1ngularity websearch
This will:
- Search for s1ngularity attack details
- Map attack steps to SITF techniques
- Generate
sample-flows/s1ngularity.json
- Output attack flow summary
1---2name: attack-flow3description: Generate SITF-compliant attack flow JSON files from attack descriptions or incident reports. Use when analyzing supply chain attacks, breaches, or security incidents.4argument-hint: <attack-name> [websearch|url]5tools: Read, Grep, Glob, WebSearch, WebFetch, Write, Bash6metadata:7 source: https://skillmd.com/skills/aibot88/attack-flow8---910# Attack Flow Generator1112Generate SITF-compliant attack flow JSON files from attack descriptions or incident reports.1314## Usage1516```17/attack-flow <attack-name> [source]18```1920- `attack-name`: Identifier for the attack (e.g., "s1ngularity", "solarwinds")21- `source`: URL, "websearch" for auto-research, or omit to use conversation context2223Arguments: $ARGUMENTS2425## Instructions2627When this skill is invoked:2829### Phase 1: Research30311. If source is "websearch" or a URL, gather attack details:32 - Attack timeline and phases33 - Entry point and initial access method34 - Lateral movement and persistence techniques35 - Data exfiltration or impact36 - Affected components (CI/CD, VCS, Registry, Endpoint, Production)37382. If source is omitted, use context from the current conversation.3940### Phase 2: Technique Mapping41421. Read `techniques.json` to get the full technique library.43442. For each attack step, find the best matching technique:45 - Match by **action semantics**, not surface keywords46 - Example: Uploading stolen data to repos → T-V003 (Secret Exfiltration), NOT T-V008 (Malicious Hosting)47 - Example: Accessing VCS with stolen creds → T-V001 must come BEFORE any VCS actions48493. If no matching technique exists:50 - Create a placeholder node with `"type": "technique-gap"`51 - Include suggested technique metadata in the data field52 - Note in output that `/technique-proposal` should be run for gaps5354### Phase 3: Layout Calculation5556Apply these layout rules:5758#### Rule 1: Component Layout (Left-to-Right by Attack Flow)59- Order components by their **sequence in the attack chain**, not by standard SITF order60- If attack flows CI/CD → Registry → Endpoint → VCS, layout left-to-right accordingly61- Minimum horizontal gap between components: 80-100px62- Component x-positions: Use increments of ~300px starting from x=06364#### Rule 2: Technique Ordering (Top-to-Bottom)65- **Primary**: Order techniques by their **sequence in the attack flow**66- **Secondary**: Within same attack step, order by stage (Initial Access → Discovery → Post-Compromise)67- Vertical gap between techniques: ~130-150px68- First technique starts at y = component.y + 806970#### Rule 3: Technique-Component Alignment71- Every technique node MUST be visually positioned within its parent component72- Calculate x-position: `component.x + 30`73- Validate technique.data.component matches parent component.data.componentId7475#### Rule 4: Component Sizing76- Height = (technique_count × 150) + 120 (padding)77- Width = 230-250px7879#### Rule 5: Edge Connections80- Connect source.bottom → target.top for vertical flows within component81- Connect source.right → target.left for cross-component flows82- Add labels for significant transitions ("Second wave", etc.)83- Use `"type": "smoothstep"` for all edges8485### Phase 4: JSON Generation8687Generate the attack flow JSON with this structure:8889```json90{91 "metadata": {92 "name": "Attack Name",93 "created": "ISO-8601 timestamp",94 "version": "1.0",95 "framework": "SITF",96 "description": "Brief attack description"97 },98 "nodes": [99 // Entry points, components, techniques, exit points100 ],101 "edges": [102 // Connections between nodes103 ]104}105```106107Node types:108- `entryPoint`: Attack entry (Phishing, Vulnerability Exploit, Stolen Credentials, etc.)109- `component`: SITF component container (endpoint, vcs, cicd, registry, production)110- `technique`: Attack technique from techniques.json111- `technique-gap`: Placeholder for missing technique (flag for /technique-proposal)112- `exitPoint`: Attack outcome (Future Breach, Persistence, Secondary Supply Chain Attack, etc.)113114### Phase 5: Validation115116Run this checklist before outputting:117118```119[ ] Valid JSON structure (parse test passes)120[ ] Required fields present: metadata.{name,created,version,framework}, nodes[], edges[]121[ ] All node IDs are unique122[ ] All edge source/target reference valid node IDs123[ ] All techniques positioned within their component boundaries (x/y validation)124[ ] Techniques ordered by attack flow sequence125[ ] Initial Access techniques appear first when order is ambiguous126[ ] All technique IDs exist in techniques.json OR flagged as technique-gap127[ ] Exit points connected to terminal techniques128[ ] No orphaned nodes (every non-entry node has incoming edge)129```130131### Phase 6: Output1321331. Write the JSON file to `sample-flows/<attack-name>.json`1342. Validate the JSON with Python: `python3 -c "import json; json.load(open('file'))"`1353. Provide a summary table of the attack flow1364. If any technique-gaps exist, list them and recommend running `/technique-proposal`137138## Example139140```141/attack-flow s1ngularity websearch142```143144This will:1451. Search for s1ngularity attack details1462. Map attack steps to SITF techniques1473. Generate `sample-flows/s1ngularity.json`1484. Output attack flow summary