Post

From P-Code to GNN: extract binary code semantics

Quarkslab releases pcode_graph, a Python library for extracting semantic Control & Data Flow Graphs from binary code, abstracting away architecture and compilation differences. The tool translates assembly into Ghidra’s P-Code intermediate representation (63 opcodes vs. thousands of x86 mnemonics) to enable architecture-agnostic function similarity detection via neural networks. Key use cases include deobfuscation, vulnerability detection, gadget identification, and binary versioning; the approach sidesteps limitations of statistical feature extraction and compiler-specific variations that defeat simpler comparison methods. Open-sourced and pip-installable, with application to the Cisco-Talos benchmark dataset and a published ESANN 2026 paper on deobfuscation.

Read original article

This post is licensed under CC BY 4.0 by the author.