From P-Code to GNN Extracting Binary Code Semantics - #2842
Open
carlospolop wants to merge 1 commit into
Open
carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: http://blog.quarkslab.com/from-p-code-to-gnn-extract-binary-code-semantics.html Content Categories: Based on the analysis, this content was categorized under "Reversing > Reversing Tools & Basic Methods > Architecture-Neutral Semantic Binary Analysis with Ghidra P-Code and Graph Neural Networks". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The post introduces
pcode_graph, an open-source Python library developed by Quarkslab to abstract binary-code semantics. It lifts a function, basic block, or arbitrary byte sequence into Ghidra P-Code and builds visualizable Control & Data Flow Graphs (CDGs). The resulting representation is intended for obfuscation identification, ROP gadget indexing or automatic chaining, binary diffing, function identification, vulnerability discovery, and ...🔧 Technical Details
Architecture-neutral semantic extraction: Lift raw machine code through SLEIGH/
pypcodeinto Ghidra P-Code, then perform instruction indexing, unreachable-code detection, and reaching-definition analysis. Replace temporary P-Code variables with dependency edges, remove redundant nodes, and retain meaningful inputs, constants, operations, memory effects, Phi nodes, outputs, and termination nodes. Add control-flow dependencies where data flow alone cannot express the condition selecting a value. This produces a compact representation that is less dependent on instruction mnemonics, compiler output, and optimization level. Useful commands includecdg pcode binary,cdg table binary,cdg html --dataflow-only binary -o graph.html, andcdg md --dataflow-only binary.Cross-architecture function and vulnerability matching: Convert CDGs into PyTorch Geometric tensors and encode physical reg...
🤖 Agent Actions
Updated
src/reversing/reversing-tools-basic-methods/README.mdwith:pcode_graphinstallation and CLI examplesValidation passed:
git diff --check, Markdown fence/reference checks, and source URL reachability.mdbookwas unavailable locally.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.