text stringlengths 0 1.99k |
|---|
isolation due to register reuse, control-flow indirection, and a lack of |
named variables. |
To improve interpretability and guide model focus, E0 translates each |
low-level symbolic definition into its corresponding higher-level |
representation, including the full function code and IR where the symbolic |
expression is captured or defined. These include: |
- Assembly |
- LLIL, MLIL, HLIL |
- MLIL SSA and HLIL SSA forms |
- Decompiled C-like pseudocode |
.--------------------------------------------------. |
| For example, consider a symbolic memory load | |
|--------------------------------------------------| |
| Assembly : ldrb w8, [x1] | |
| MLIL SSA : x8#1 = zx.d([arg2#0].b) | |
| HLIL : zx.d(*arg2) | |
| HLIL SSA : zx.d(*arg2#0) | |
| Pseudocode : (uint32_t)*(uint8_t*)arg2 | |
'--------------------------------------------------' |
| This single symbolic expression is represented across multiple |
| abstraction levels. SSA forms disambiguate variable lifetimes and |
| data-flow, while decompiled pseudocode offers a readable, semantically |
| rich view suited for LLM interpretation. Each representation offers a |
| distinct view to help ground symbolic definitions in their surrounding |
| code context. |
Among these formats, decompiled pseudocode consistently yields the best |
results during vulnerability analysis, as most LLMs are heavily trained on |
C-like syntax. SSA-form IR representations, particularly MLIL SSA, also |
prove valuable due to their static single assignment property, which helps |
the model track symbolic variables without aliasing or ambiguity. |
To gather this context, E0 includes a Python bridge that queries symbolic |
definitions stored in its runtime database and augments them with |
representation data fetched from Binary Ninja. This includes function |
signatures, code bodies, and intermediate representations. |
Although Binary Ninja was chosen for its Intermediate Representation (IR) |
ecosystem and Python API integration, the retrieval pipeline is modular. |
It can be adapted to other disassemblers and decompilers depending on user |
preference or available tooling. |
By coupling symbolic expressions with high-level function context, E0 |
ensures that LLMs operate on precise, structured inputs. This reduces |
confusion, improves reasoning accuracy, and more importantly, bridges |
the gap between dynamic symbolic execution and static code understanding. |
Each symbolic definition serves as an anchor point, enabling the model to |
expand its reasoning across entire functions and into adjacent functions |
in the call graph, while staying rooted in the concrete data-flow captured |
during (SSI) selective symbolic instrumentation. |
---[ 12.4 - Context Expansion via MCP, A2A and On-Demand Decompilation |
While E0 prompts are initially scoped to precise symbolic expressions |
within individual functions, complex vulnerability analysis sometimes |
requires a broader view. In such cases, the LLM may issue tool-calling |
requests to retrieve additional context using the Model Context Protocol |
(MCP). |
One example is the get_function_code tool call, where the LLM explicitly |
requests the complete code of one or more functions it deems relevant to |
the current analysis. The MCP server first checks the internal cache and |
the symbolic definition database; if the data is missing, it triggers a |
fallback to Binary Ninja backend to perform on-demand disassembly, IR |
recovery, and decompilation of the requested function(s). |
This design keeps prompts minimal and focused, while still granting the |
LLM access to full static context when needed. However, repeated MCP |
requests can consume significant context window space and increase |
inference latency, especially when retrieving large functions or |
traversing cross-function logic. |
To address this, E0 is evolving toward a more efficient Agent-to-Agent |
(A2A) architecture. In this model, the root LLM agent offloads specific |
questions (such as "What does this callee return?" or "Does this check |
ever fail?") to secondary agents with smaller, focused contexts. These |
sub-agents operate independently to retrieve only the necessary facts, |
summaries, or security inferences, which are then aggregated and returned |
to the root agent for final vulnerability classification. |
Below is a typical A2A JSON request issued by the root agent to assess a |
callee function's behavior. |
.-------------------------------------------------------------------------. |
| Sample A2A Query | |
|-------------------------------------------------------------------------| |
| { | |
| "sub_18c27aeb0": [ | |
| "What is the purpose of 'sub_18c27aeb0' and does it return a | |
| value that is bounded or validated before being used in memory | |
| operations?", | |
| "Does this function handle error conditions and return a safe | |
| default or zero when the input is invalid?" | |
| ] | |
| } | |
'-------------------------------------------------------------------------' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.