
Automating Malware Reverse Engineering with Local LLMs, PyGhidra and Neo4j Graphs
A researcher has developed an automated pipeline that uses local large language models to analyze decompiled malware code extracted via PyGhidra. The system loads functions, call graphs, strings and imports into a Neo4j graph database to preserve context across hundreds of functions. Each function is sent to a local Qwen3 model running in LM Studio together with its neighboring call-graph context, producing structured JSON output on purpose, IOCs, tags and evasion techniques. Aggregated capabilities and behavioral patterns such as file encryption and C2 communication are then derived through graph queries. Testing on a WannaCry sample from MalwareBazaar processed 195 functions in 126 minutes and correctly identified File Encryption, C2 Communication and Anti-Analysis behaviors with 100 percent confidence. The approach keeps all sensitive indicators inside a local environment and avoids context overflow and censorship issues common with cloud-based models.
HabrJul 27, 2026Translated from Russian