Hash All The Things / Get All The Sig(s) - Introducing Sighthouse for Seamless Function Detection
Sami Babigeon (Security Researcher · Quarkslab), Benoît Forgette (Cybersecurity Engineer · Quarkslab)
RE//verse 2026 · Day 1 · Coral Ballroom A
Overview
In the intricate world of reverse engineering, especially when dealing with embedded firmware, analysts often face a daunting challenge: identifying the origin of unknown code segments. Sami Babigeon and Benoît Forgette from Quarkslab addressed this pervasive problem at RE//verse with their talk, "Hash All The Things / Get All The Sig(s)," introducing Sighthouse, a novel open-source platform designed to act as an "oracle" for binary code. Much like Wappalyzer identifies technologies used on a website or Shazam recognizes a song from an audio snippet, Sighthouse aims to pinpoint the exact libraries, SDKs, or frameworks embedded within stripped firmware, even when symbols are long gone.

Key moments
- 0:50 The "Oracle" problem for firmware analysis
- 7:50 A brief history of binary similarity approaches
- 14:00 Benchmarking binary similarity tools and choosing BSim
- 21:00 Introducing Sighthouse: a binary similarity platform
- 24:00 SIGHASH architecture for automatic database population
- 31:30 BobRoss algorithm to enhance BSim function identification
- 38:50 Q&A: Addressing BSim hash stability and deduplication
Hash All The Things / Get All The Sig(s) - Introducing Sighthouse for Seamless Function Detection
Speakers: Sami Babigeon (Security Researcher, Quarkslab); Benoît Forgette (Cybersecurity Engineer, Quarkslab)
Conference: RE//verse
YouTube: https://www.youtube.com/watch?v=AKEizmIFLME
Overview
In the intricate world of reverse engineering, especially when dealing with embedded firmware, analysts often face a daunting challenge: identifying the origin of unknown code segments. Sami Babigeon and Benoît Forgette from Quarkslab addressed this pervasive problem at RE//verse with their talk, "Hash All The Things / Get All The Sig(s)," introducing Sighthouse, a novel open-source platform designed to act as an "oracle" for binary code. Much like Wappalyzer identifies technologies used on a website or Shazam recognizes a song from an audio snippet, Sighthouse aims to pinpoint the exact libraries, SDKs, or frameworks embedded within stripped firmware, even when symbols are long gone.
The core motivation behind Sighthouse stems from the time-consuming nature of reverse engineering third-party or SDK code that could otherwise be easily identified. Firmware, typically statically linked and devoid of meaningful symbols, presents a black box scenario where every function appears as a generic, unnamed block. Sighthouse promises to revolutionize this process by providing immediate context, allowing reverse engineers to quickly understand the provenance of code and focus their efforts on proprietary or unknown functionalities. This capability is critical for accelerating security research, vulnerability discovery, and overall understanding of embedded systems.
The talk not only unveils Sighthouse but also provides a comprehensive historical overview of binary similarity techniques, benchmarks various state-of-the-art tools, and details the architectural decisions behind Sighthouse's development. By leveraging Ghidra's BSim engine and enhancing it with a robust, automated signature generation pipeline and intelligent post-processing, Sighthouse offers a powerful, cross-architecture solution. Its release as an open-source tool invites community contributions, aiming to equip reverse engineers with an essential weapon in the ever-escalating complexity of modern software.
Background
▶ Watch: The "Oracle" problem for firmware analysis (0:50)
Reverse engineering embedded firmware is notoriously challenging, primarily due to the "black box" nature of most devices. Engineers typically receive devices without documentation, source code, or even basic information about their internal components. The initial phase involves physical access, dissecting the device, identifying the main CPU (e.g., STM32) and other integrated circuits (e.g., CC2510 for BLE), and locating debug interfaces like UART, JTAG, or SWD to dump the firmware.
Once the raw firmware bytes are obtained, the next hurdle is interpretation: identifying the base address, instruction set (e.g., ARM), and entry points. Even after successfully loading the firmware into disassemblers like IDA Pro or Ghidra, analysts are confronted with a vast number of functions stripped of their original names. Unlike classic ELF binaries that use dynamic linking to optimize space and retain external library references by name, firmware often statically links everything, concatenating all code into a single blob and effectively obliterating symbols. This forces reverse engineers to spend invaluable hours re-identifying common SDK code or third-party libraries, a task that Sighthouse seeks to automate.
The concept of binary similarity, which Sighthouse heavily relies upon, has a rich history. It began in 1996 with IDA's Flirt (Fast Library Identification and Recognition Technology), a simple yet effective algorithm that hashes the initial bytes of a function, masking local sensitive information. Later, tools like BinDiff (2010) and Diaphora introduced structural analysis for diffing. In 2016, ANSSI released PolyGnome, which used fuzzy hashing on control flow graph descriptions, offering cross-architecture capabilities but struggling with scalability. Thomas Dullien's Function SimSearch (2017) at Google advanced fuzzy hashing by allowing distance metrics, specifically Hamming distance, between hashes. Ghidra's public release in 2019 brought its own Function ID (similar to Flirt). More recently, academic papers introduced GTrans (2022), which used machine learning to generate embeddings from instructions, and a Cisco paper (also 2022) highlighted Graph Matching Networks (GMN) as the most efficient approach for binary similarity, leveraging attributed control flow graphs for semantic and structural comparison. Finally, Ghidra's BSim (Behavioral Similarity) in 2023 introduced an approach based on its intermediate language, P-code, offering numerous advantages, while Binary Ninja's Warp (2024) improved upon Flirt-like methods. The speakers emphasized that there is "no silver bullet" in binary similarity; each method has strengths and weaknesses, and efficiency can vary significantly across architectures.
Key Findings
▶ Watch: Benchmarking binary similarity tools and choosing BSim (14:00)
Faced with a multitude of binary similarity approaches, the Sighthouse team undertook a rigorous benchmarking process to select the optimal foundation for their tool. Their criteria for selection were clear: the chosen solution needed to be free and open-source, support cross-architecture analysis, and offer reasonable query performance and storage requirements for their growing database.
The benchmark dataset comprised firmware from PlatformIO, supplemented with open-source projects like GLibC, SQLite, OpenSSL, kernel code, and zlib. They evaluated tools against metrics of precision (capability to find a function), recall (amount of relevant results among potential relevant results), and the F1 score (harmonic mean of precision and recall).
Their experimental results revealed significant disparities:
- Gimel: Proved too time-consuming, running for 6 days to process only 20% of the smallest dataset, rendering it impractical.
- Ghidra's built-in similarity tools: Showed poor performance scores.
- FunctionSimSearch: Performed "pretty good" but suffered from frequent crashes, making its reliability questionable for their use case.
- FunctionID: Delivered strong results but was limited to known functions and assembly-based, lacking true cross-architecture support (e.g., not compatible between ARM and x86).
- BSim (Behavioral Similarity): While not "the best" in every single metric, it emerged as the most balanced and suitable solution. It represented the "mean of the overall solution" and, crucially, offered robust cross-architecture matching.
Ultimately, Ghidra's BSim was chosen as the foundational engine for Sighthouse. Its primary advantage is its reliance on Ghidra's P-code, an intermediate language, which inherently enables cross-architecture matching across all architectures supported by Ghidra. BSim also supports multiple backends for signature storage, including file-based, PostgreSQL, and Elasticsearch. However, the speakers noted its limitations: sparse documentation, making it difficult to understand without deep code analysis, and the underlying algorithm's theory remaining largely obscure.
BSim operates as a Ghidra plugin, allowing users to select a database, choose functions to query, and set parameters like similarity threshold (0 to 1, for match precision) and confidence threshold (unbound, higher means more likely match). The results display matching functions from the database with similarity and confidence scores, along with metadata such as the original executable and ingestion date. A visual diff tool further aids in comparing functions, highlighting differences in cyan. Technically, BSim generates feature vectors from P-code's data flow and control flow operations, using cosine similarity to compare these vectors. An important caveat is that BSim only incorporates the sizes of constants, not their actual values, which can sometimes lead to discrepancies in matches.
Technical Deep Dive
▶ Watch: Introducing Sighthouse: a binary similarity platform (21:00)
Sighthouse, or Cygnus as it's referred to internally, is Quarkslab's full-fledged binary similarity platform built upon the chosen BSim foundation. Its objective is to automate firmware analysis, extracting functions, and comparing them against a vast, continuously updated database of known code to provide immediate context for reverse engineers. The platform was even used in real-world scenarios, such as the Pwn2Own Automotive competition, where it helped researchers identify symbols in an exploited Navy Charger.
The overall architecture of Sighthouse is modular and designed for scalability and ease of contribution. It comprises several key components:
- SARI Client: This is the Ghidra plugin that users interact with directly. It communicates with the front-end server.
- REST HTTP API & Front-end Server: Handles user authentication, stores user information, and embeds a Ghidra runner to analyze user-submitted files and query for signatures.
- Signature Pipeline: This is the intelligence engine that automatically populates the database. It consists of specialized workers:
- Scrapers: These workers continuously search online for new open-source projects or binaries to compile or analyze.
- Compiler Worker: Takes source code found by scrapers, attempts to compile it into binary files, and attaches crucial metadata (e.g., SDK name, version, download link). A critical design decision here is to run these workers disconnected from networks to mitigate supply chain attacks.
- Analyzer Worker (Ghidra): This worker extracts basic function signatures (P-code feature vectors) from the compiled binaries and stores them in the central database, making them available for future queries.
The design principles for Sighthouse emphasize simplicity, modularity, and extensibility. Python was chosen as the primary language for its ease of use and broad community support. Components are organized as Python packages, and creating new workers (e.g., a custom scraper or compiler) involves simply inheriting a base class and redefining a do_work method, ensuring that adding new functionalities is straightforward.
For the backend database, Sighthouse required multi-machine accessibility, fast search capabilities, and high storage capacity to accommodate a massive number of function signatures. After evaluating BSim's supported backends, H2 (a lightweight, local-only database) was discarded. The team benchmarked PostgreSQL and Elasticsearch. While PostgreSQL showed better performance for single-node deployments, Elasticsearch offered superior horizontal scaling for multi-node setups. Sighthouse implemented support for both, with PostgreSQL being the default choice for single-machine deployments.
A significant enhancement Sighthouse provides over raw BSim results is the enrichment of metadata. BSim offers similarity, confidence, function name, and binary origin. Sighthouse adds the SDK name and origin, SDK version, and a download link for the SDK, which is vital for validation and further analysis. Future plans include adding source code location and function prototypes.
To address specific weaknesses in BSim and improve accuracy, Sighthouse incorporates post-processing and filtering steps. A major source of false positives in BSim comes from very small functions; thus, Sighthouse filters out functions with fewer than 10 instructions from its database, planning to use tools like IFE IFIDB for such cases where they are more reliable.
Furthermore, Sighthouse introduces its own algorithm, affectionately named BobRoss, for consolidating and disambiguating match results. This algorithm leverages the concept of spatial locality—the observation that compilers often group functions from the same object file or library into contiguous memory regions. BobRoss implements a local voting process using k-nearest neighbors (specifically, three nearest neighbors) to "colorize" functions with the most probable SDK. If a function has multiple potential matches (e.g., from different libraries) but its neighbors predominantly belong to one specific SDK, BobRoss will assign that SDK to the central function, effectively enhancing BSim's results. While spatial locality is a strong hint, it's not a perfect rule, so future work includes incorporating call tree context to provide "bonuses" to matches that fit the surrounding call graph.
Demo / Proof of Concept
▶ Watch: BobRoss algorithm to enhance BSim function identification (31:30)
The Sighthouse team demonstrated the practical application of their tool through its Ghidra plugin, the SARI client. The demonstration highlighted how the tool seamlessly integrates into a reverse engineer's workflow, providing immediate and actionable context for unknown binaries.
Upon launching the plugin within Ghidra, users first log into their Sighthouse server. Once connected, the plugin automatically identifies potential signatures within the loaded firmware. In the example shown, Sighthouse found 190 potential signatures. These identified functions are then presented to the user, typically via Ghidra's bookmarking feature, but also through a visual "colorization" of the disassembly view.
For each identified function, the plugin provides rich metadata: the function's recognized name, the SDK name it belongs to, its version, and crucially, a download link for the original SDK. This allows researchers to quickly retrieve the exact source code for verification or deeper analysis.
The visual aspect of Sighthouse is particularly impactful. The demonstration showed a firmware image, initially a "blind" blob of code without names or colors. As Sighthouse processes it, the firmware view becomes "colorized" by the Beacon (Sighthouse backend). Different colors represent different identified SDKs (e.g., green for one SDK, blue for OpenSSL, orange for another). This immediate visual feedback allows a reverse engineer to instantly discern which parts of the firmware correspond to known, common libraries (like embedded SDKs or FreeRTOS components) versus unknown or proprietary code that requires focused attention. This transformation from a chaotic, unnamed binary to a clearly segmented and labeled codebase dramatically accelerates the initial reconnaissance phase of reverse engineering. The Pwn2Own Automotive anecdote also serves as a strong real-world proof of concept for Sighthouse's utility in high-stakes vulnerability research.
Defensive Implications
▶ Watch: Q&A: Addressing BSim hash stability and deduplication (38:50)
Sighthouse offers significant defensive implications for security professionals, particularly those involved in embedded systems, IoT, and firmware analysis. By automating the identification of known functions and libraries within stripped binaries, Sighthouse directly addresses several critical challenges:
- Accelerated Vulnerability Research: Defenders can quickly identify the specific versions of third-party libraries (e.g., OpenSSL, zlib) used in a device's firmware. This allows for rapid cross-referencing against public vulnerability databases (like CVEs) to determine if known exploits affect the device. Instead of manually reverse engineering a library to ascertain its version, Sighthouse provides this information almost instantly.
- Improved Software Bill of Materials (SBOM) Generation: In an era where supply chain security is paramount, Sighthouse helps organizations create more accurate and comprehensive SBOMs for their embedded products. Knowing precisely which SDKs and libraries are included, along with their versions, is crucial for managing risk and complying with emerging security regulations.
- Focused Reverse Engineering Efforts: Security analysts often waste valuable time re-analyzing well-known, open-source, or vendor-supplied SDK code. Sighthouse frees up reverse engineers to concentrate their expertise on proprietary, custom, or truly unknown code segments, where novel vulnerabilities are more likely to reside. This increases efficiency and allows for deeper, more impactful analysis.
- Enhanced Incident Response: In the event of an embedded device compromise, Sighthouse can aid incident responders in quickly understanding the affected codebase. Identifying the presence and versions of specific libraries can help narrow down potential attack vectors or confirm the use of known exploits.
- Cross-Architecture Visibility: The P-code based approach of BSim, and by extension Sighthouse, provides cross-architecture analysis. This is invaluable for organizations dealing with a diverse range of embedded devices utilizing various CPU architectures (ARM, MIPS, RISC-V, etc.), ensuring consistent identification capabilities across their entire product portfolio.
- Proactive Security Audits: Organizations can integrate Sighthouse into their continuous integration/continuous deployment (CI/CD) pipelines or security auditing processes to automatically scan new firmware builds for the inclusion of outdated or vulnerable components before deployment.
As the complexity of embedded systems and IoT devices continues to soar, manual reverse engineering approaches become increasingly unsustainable. Sighthouse provides a crucial, open-source tool that empowers defenders to stay ahead by gaining immediate, actionable intelligence about the software components lurking within their firmware.
Key Takeaways
- Sighthouse acts as a "Shazam for binaries": It's an open-source platform designed to automatically identify functions and libraries within stripped embedded firmware, providing immediate context to reverse engineers.
- Leverages Ghidra's BSim for cross-architecture analysis: After extensive benchmarking, BSim was chosen for its P-code based approach, enabling effective binary similarity detection across diverse CPU architectures.
- Automated signature generation pipeline: Sighthouse includes a robust system of scrapers, compilers, and analyzers that automatically find, compile, and extract signatures from open-source projects to continuously populate its database.
- Enriched metadata and post-processing: Beyond raw similarity scores, Sighthouse provides detailed metadata like SDK name, version, and download links, and employs the "BobRoss" algorithm to enhance match accuracy through local voting based on spatial locality.
- Modular and extensible design: Built in Python, Sighthouse is designed for ease of use and community contribution, allowing new components (scrapers, compilers) to be added straightforwardly.
- Significantly accelerates reverse engineering workflows: By identifying known code, Sighthouse allows security researchers and analysts to focus their efforts on novel or proprietary code, drastically reducing analysis time and improving overall efficiency in vulnerability research and security auditing.
About the Speaker(s)
Benoît Forgette is a Security Researcher at Quarkslab. His work primarily focuses on hardware, Android security, and automation topics. He conceived the initial idea for the Sighthouse project approximately four years prior to the talk, driven by the practical challenges faced in daily reverse engineering tasks.
Sami Babigeon is also a Security Researcher at Quarkslab. He works on similar subjects as Benoît, with a particular emphasis on designing robust architectures for security tools. Sami was instrumental in translating Benoît's early concepts and dreams for Sighthouse into a real, functional architecture, bringing the project to fruition. Both speakers share a significant part of their daily work in the demanding field of reverse engineering embedded firmware.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Quarkslab actually built something useful instead of just dropping another academic whitepaper on binary similarity math. Sighthouse wraps Ghidra's BSim in an automated ingestion pipeline and layers on genuinely clever spatial locality heuristics to filter out the noise. It won't solve everything, but it kills the mind-numbing busywork of identifying statically linked SDKs in stripped firmware.
Heather Calloway (CISO) — STRONG ACCEPT
This is a capability upgrade for any product security team dealing with embedded devices, IoT, or OT. Quarkslab has built a scalable way to extract Software Bill of Materials (SBOM) data from black-box firmware when the vendor won't give you one, carrying direct implications for hardware procurement and third-party risk.