
AI-driven automated threat analysis pipeline that routes files, URLs, IPs, domains, or images through specialized security analyzers and generates professional PWNDoc reports with integrated YARA and Sigma rule.
Drop in any file, URL, IP, domain, or image. SecFlow routes it through specialized analyzers, reasons about findings with AI, and produces a professional security report with YARA rules, SIGMA rules, and exportable PDF β automatically.
Quick Start Β· Architecture Β· Report Output Β· Docs
SecFlow is an open-source automated threat analysis pipeline built for security analysts, SOC teams, and researchers. Instead of manually running disparate tools and correlating results, SecFlow:
| Feature | Detail |
|---|---|
| AI-Driven Routing | Groq qwen/qwen3-32b decides the next analyzer after each pass β no manual configuration |
| 5 Specialized Analyzers | Malware Β· Steganography Β· Reconnaissance Β· Web Vulnerability Β· Macro/Office |
| Smart First-Pass | file + python-magic deterministic rules on pass 1 β AI only called when type is ambiguous |
| Download-and-Analyze | Follows IOCs β downloads payloads found in raw output and routes them through the right analyzer |
| YARA Rule Generation | Auto-generates 2β5 deployable YARA rules per analysis, each citing the exact evidence that drove it |
| SIGMA Rule Generation | Auto-generates 2β4 SIGMA rules for Splunk / Elastic / Sentinel β covering different log sources |
| MITRE ATT&CK Mapping | Every finding mapped to real TTP IDs with tactic names |
| Dual Report Formats | HTML report (print-to-PDF in browser) + structured JSON report (feed directly to AI for further analysis) |
| React Dashboard | Full frontend UI β submit analyses, view live pipeline progress, browse results per analyzer |
| VirusTotal Integration | Both Malware and Macro analyzers query 70+ AV engines via VT API v3 |
| Configurable Loop Depth | 3, 4, or 5 passes β exits early if AI signals no further signals |
| Standalone Mode | Every analyzer microservice exposes its own REST API β use them independently |
User Input (file / URL / IP / domain / image)
β
βΌ
ββββββββββββββββββββββββββββββββββ
β Input Classifier β file + python-magic β deterministic rule
β (Rule-based, pass 1 only) β unknown type? β Groq AI fallback
βββββββββββββββββ¬βββββββββββββββββ
β first analyzer selected
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Analyzer Loop (N = 3 / 4 / 5 passes) β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Run Analyzer (HTTP β Docker microservice) β β
β β Malware Β· Steg Β· Recon Β· Web Β· Macro β β
β βββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ β
β β findings + raw_output β
β βββββββββββββββββΌβββββββββββββββββββββββββββββββββββ β
β β AI Routing Engine (Groq qwen/qwen3-32b) β β
β β IOC extraction β next_tool + target β β
β βββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββ΄βββββββββββββββββββ β
β next tool null β
β β β β
β β Download HTTP payloads β
β β from raw_output β re-analyze β
β βββββββββββββββββ repeat ββββββββββββββββββββββ
βββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββ
β Findings Store β All passes Β· all findings accumulated
βββββββββββββββββ¬βββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β Threat Intelligence Engine β
β (Groq llama-3.3-70b-versatile) β
β ββ Threat Summary + MITRE ATT&CK TTPs β
β ββ YARA Detection Rules (2β5 rules) β
β ββ SIGMA SIEM Rules (2β4 rules) β
βββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββ
β PWNDoc HTML Report β Groq summary β browser-rendered HTML
β β One-click Export PDF button
ββββββββββββββββββββββββββββββββββ
git clone https://github.com/aradhyacp/SecFlow.git
cd SecFlow/backend
cp .env.example .env
Edit .env with your keys:
# Required
GROQ_API_KEY=your_groq_api_key_here
VIRUSTOTAL_API_KEY=your_vt_api_key_here
# Optional β unlock additional OSINT capabilities
NUMVERIFY_API_KEY=your_numverify_key # Phone number lookups
THREATFOX_API_KEY=your_threatfox_key # Higher ThreatFox rate limits
ipAPI_KEY=your_ipapi_key # Higher ip-api.com rate limits
# Pipeline control
MAX_PASSES=3 # 3 | 4 | 5
docker compose up -d
This starts 6 containers:
| Service | Port | Role |
|---|---|---|
orchestrator | 5000 | Pipeline controller β main entry point |
malware-analyzer | 5001 | Ghidra decompilation + VirusTotal |
steg-analyzer | 5002 | binwalk + zsteg + steghide + ExifTool |
recon-analyzer | 5003 | ip-api + ThreatFox + OSINT |
web-analyzer | 5005 | HTTP vuln scanner + header audit |
macro-analyzer | 5006 | oletools (olevba) + VirusTotal |
Note: First start may take several minutes β the Malware Analyzer downloads Ghidra 12.0.1 (~500 MB) and requires a JDK 21 JVM.
Analyze a file:
curl -X POST http://localhost:5000/api/smart-analyze \
-F "file=@/path/to/suspicious.exe" \
-F "passes=3"
Analyze a URL, IP, or domain:
curl -X POST http://localhost:5000/api/smart-analyze \
-H "Content-Type: application/json" \
-d '{"target": "192.168.1.100", "passes": 3}'