Habr•July 27, 2026•🇷🇺Translated from Russian

Automating Malware Reverse Engineering with Local LLMs, PyGhidra and Neo4j Graphs

A researcher has built an automated system that combines PyGhidra, Neo4j and a local large language model to speed up the initial analysis of malicious binaries. The project addresses the main drawbacks of sending decompiled code to cloud LLMs: leakage of indicators of compromise, possible censorship of sensitive modules, and rapid context overflow when a sample contains 100–200 functions.

Architecture and data flow

The pipeline begins with ghidra_extractor.py, which uses PyGhidra to disassemble and decompile a binary without launching the Ghidra GUI. For every function the extractor records its address, name, size, cyclomatic complexity, decompiled C pseudocode (truncated at 6000 characters with a 30-second timeout), call-graph neighbors, string references and imported API calls. Metadata such as PE format, architecture and all standard file hashes are also stored. All extracted entities are loaded into Neo4j as distinct node types: Sample, Function, String, Import, Analysis, Capability and Behavior.

Next, worker.py and mcp.py iterate over functions and send each one to a locally hosted Qwen3 model running inside LM Studio. The prompt includes both the decompiled code and the function’s position in the call graph, allowing the model to understand caller-callee relationships. The model returns structured JSON describing the function’s purpose, extracted IOCs, tags, network indicators, command-line usage and anti-analysis techniques.

aggregator.py then aggregates tags across all functions into Capability nodes that carry a strength weight reflecting how often each capability appears. builder.py combines these capabilities with the call graph to detect higher-level behavioral patterns such as file encryption combined with network activity. Finally, generator.py produces a human-readable report by querying the enriched graph.

Graph data model

Storing functions in a flat table makes it difficult to answer questions such as whether five anti-debug functions call one another. In the Neo4j model a Function node is connected to other Function nodes via CALLS edges, to String nodes via REFERENCES edges, and to Import nodes via USES edges. Capability and Behavior nodes sit above the function level and are linked through weighted relationships, enabling concise Cypher queries instead of recursive joins.

Validation on WannaCry

The pipeline was tested on a WannaCry sample obtained from MalwareBazaar. Processing 195 functions took 126 minutes on a machine with 60 GB RAM and an Nvidia 5070 Ti. The generated report identified three behavioral patterns with 100 percent confidence: File Encryption (supported by 40 functions), C2 Communication and Anti-Analysis. A publicly available YARA rule confirmed the anti-debug findings discovered by the system.

The complete source code is available in the repository Dvoranchik/MLMalwareAnalyzer. Future work will focus on refining call-graph traversal and prompt engineering to surface additional indicators.

Related articles

BoletimSec•Malware & Botnets

Group-IB Discovers RemControl Android Banking Trojan Using Dynamic Overlay Attacks to Steal Banking PINs

Group-IB has identified a new Android banking trojan named RemControl with samples dating back to July 2026. The malware targets more than 30 financial institutions across Europe, the Middle East, and Canada, with Italy and France as primary focus areas. RemControl employs an overlay technique that displays a full-screen phishing replica of the legitimate banking app when the victim launches the real application, capturing PINs, access codes, and card details before seamlessly returning control to the authentic app. Phishing screens are not bundled in the APK but are fetched dynamically from operator-controlled servers reachable via Telegram channels, allowing rapid target changes without reinfection. Distribution relies on fake Google Play listing pages that mimic a streaming application, with geo-targeted delivery for Italian visitors. The trojan requests VPN permissions to block Play Store traffic and bypass real-time security checks, followed by accessibility service access that enables screen reading, keystroke logging, remote taps, and unlock pattern reconstruction.

AntiMalware•Malware & Botnets

Solar and F6 Integrate Solar webProxy with F6 Malware Detonation Platform to Filter Web Threats

GC Solar and F6 have confirmed compatibility between the Solar webProxy web access management system and the F6 Malware Detonation Platform. The integration allows Solar webProxy to pre-filter web objects and forward only suspicious files via the ICAP protocol to F6 MDP for reputation checks, static analysis, and dynamic detonation in an isolated virtual environment. Administrators can tune the level of filtering to avoid sending benign items such as fonts and icons to the sandbox, preserving resources for genuine threats. Data from the Solar webProxy team shows that archives accounted for an average of 37 percent of web threats in 2025, with malware frequently hidden inside ZIP, RAR, and 7Z containers. The solution targets medium and large organizations in finance, industry, and the public sector that handle high volumes of web traffic daily.

Habr•Malware & Botnets

Engineer Tackles Jane Street ASIC Reverse Engineering Puzzle with Custom Simulator and Verilog Extraction

A detailed technical account describes how one engineer spent weeks reverse engineering an ASIC from GDS files provided in a Jane Street puzzle. The process began with parsing the GDS layout using the gdstk Python library to identify 27 cells in the warmup challenge and thousands of elements in the main task. The engineer built a custom logic simulator backed by SQLite, developed a domain-specific hardware description language, and eventually extracted a netlist that could be converted into Verilog for simulation. Key components identified included shift registers, an adder, and a comparator named comparitor496 in the warmup round. In the full challenge, nearly 10,000 instances of 81 different sky130 standard cells were processed, revealing an unexpected floating net that prompted a bug report to Jane Street. The effort combined manual schematic tracing, graph-based connectivity analysis, and waveform inspection with Surfer to confirm functional behavior.

BoletimSec•Malware & Botnets

EtherHiding Campaign Hides Banking Trojan C2 in Polygon Smart Contracts

Security researchers have detailed the EtherHiding campaign, which conceals command-and-control infrastructure inside smart contracts on the Polygon blockchain. The final payload is a malicious browser extension that functions as a banking trojan, intercepting credentials and two-factor codes from approximately 479 financial and cryptocurrency websites. Instead of embedding fixed addresses in its code, the malware queries an encrypted C2 server address from the smart contract, allowing operators to change destinations through low-cost blockchain transactions that bypass domain blocking. Infection begins when victims visit one of 31 compromised legitimate sites that inject JavaScript displaying a fake CAPTCHA prompt. The prompt instructs users to press Windows+R and execute a PowerShell command, a social engineering technique known as ClickFix that downloads the malicious scripts without exploiting any software vulnerability. The campaign has remained active from November 2025 through at least September 2026, demonstrating the resilience of blockchain-based infrastructure against traditional takedown methods.