Binary code search is vital for software reuse and vulnerability detection. Current methods often rely on internal code semantics or function call graphs, but these have limitations. Internal models ignore inter-function relationships, struggling with techniques like function inlining. Combining call graphs with internal semantics is also insufficient for complex real-world problems. To overcome these issues, the BinEnhance framework is proposed, enhancing internal code semantics with inter-function information. It builds an External Environment Semantic Graph (EESG) to create a stable external environment for similar functions using various inter-function relationships. Existing internal semantic model embeddings initialize the EESG nodes. A Semantic Enhancement Model (SEM) using Relational Graph Convolutional Networks and a residual block learns external semantics from the EESG. This generates enhanced semantic embeddings for binary code search queries. BinEnhance also refines semantic embedding similarity using data feature similarity. Experiments across six tasks, including function inlining, demonstrate BinEnhance's performance and robustness. Applied to several existing models against public datasets, BinEnhance improved Mean Average Precision from 53.6% to 69.7% and quadrupled efficiency.
securityboulevard.com
securityboulevard.com
bsky.app
Hacker & Security News on Bluesky @hacker.at.thenote.app
Create attached notes ...
