Trim My View: An LLM-Based Code Query System for Module Retrieval in Robotic Firmware

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Arasteh, Sima, Jandaghi, Pegah, Weideman, Nicolaas, Perepech, Dennis, Raghothaman, Mukund, Hauser, Christophe, Garcia, Luis
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915184033923072
author Arasteh, Sima
Jandaghi, Pegah
Weideman, Nicolaas
Perepech, Dennis
Raghothaman, Mukund
Hauser, Christophe
Garcia, Luis
author_facet Arasteh, Sima
Jandaghi, Pegah
Weideman, Nicolaas
Perepech, Dennis
Raghothaman, Mukund
Hauser, Christophe
Garcia, Luis
contents The software compilation process has a tendency to obscure the original design of the system and makes it difficult both to identify individual components and discern their purpose simply by examining the resulting binary code. Although decompilation techniques attempt to recover higher-level source code from the machine code in question, they are not fully able to restore the semantics of the original functions. Furthermore, binaries are often stripped of metadata, and this makes it challenging to reverse engineer complex binary software. In this paper we show how a combination of binary decomposition techniques, decompilation passes, and LLM-powered function summarization can be used to build an economical engine to identify modules in stripped binaries and associate them with high-level natural language descriptions. We instantiated this technique with three underlying open-source LLMs -- CodeQwen, DeepSeek-Coder and CodeStral -- and measured its effectiveness in identifying modules in robotics firmware. This experimental evaluation involved 467 modules from four devices from the ArduPilot software suite, and showed that CodeStral, the best-performing backend LLM, achieves an average F1-score of 0.68 with an online running time of just a handful of seconds.
format Preprint
id arxiv_https___arxiv_org_abs_2503_03969
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Trim My View: An LLM-Based Code Query System for Module Retrieval in Robotic Firmware
Arasteh, Sima
Jandaghi, Pegah
Weideman, Nicolaas
Perepech, Dennis
Raghothaman, Mukund
Hauser, Christophe
Garcia, Luis
Cryptography and Security
Software Engineering
The software compilation process has a tendency to obscure the original design of the system and makes it difficult both to identify individual components and discern their purpose simply by examining the resulting binary code. Although decompilation techniques attempt to recover higher-level source code from the machine code in question, they are not fully able to restore the semantics of the original functions. Furthermore, binaries are often stripped of metadata, and this makes it challenging to reverse engineer complex binary software. In this paper we show how a combination of binary decomposition techniques, decompilation passes, and LLM-powered function summarization can be used to build an economical engine to identify modules in stripped binaries and associate them with high-level natural language descriptions. We instantiated this technique with three underlying open-source LLMs -- CodeQwen, DeepSeek-Coder and CodeStral -- and measured its effectiveness in identifying modules in robotics firmware. This experimental evaluation involved 467 modules from four devices from the ArduPilot software suite, and showed that CodeStral, the best-performing backend LLM, achieves an average F1-score of 0.68 with an online running time of just a handful of seconds.
title Trim My View: An LLM-Based Code Query System for Module Retrieval in Robotic Firmware
topic Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2503.03969