text stringlengths 0 1.99k |
|---|
- One or more symbolic expressions (e.g., x0_18, *x1_2) |
- Their SMT-solved value ranges |
- Decompiled pseudocode or IR from the associated function(s) |
Prompts focus on what to analyze while deliberately omitting unnecessary |
exclusions. Instead of relying on vague or negatively framed instructions, |
each prompt directs the model's attention to the data-flow and security |
implications of a specific set of symbolic expressions. |
This strategy eliminates the need to specify vulnerability classes |
(e.g., use-after-free or integer overflow). The model evaluates how |
untrusted data propagates through control flow, memory operations, and |
return values, without presupposing any specific bug type. |
To demonstrate how E0 guides LLM attention using scoped symbolic inputs, |
the following prompts show concrete examples of how symbolic expressions, |
value ranges, and function context are packaged into focused vulnerability |
analysis queries. |
.-------------------------------------------------------------------------. |
| Sample Prompt #1 | System + User Prompt (with few constraints) | |
|-------------------------------------------------------------------------| |
| System Prompt: | |
|-------------------------------------------------------------------------| |
| You are an expert in vulnerability researching C++ code. The user will | |
| provide: | |
| 1. A C++ function, which has been decompiled from ARM64 assembly. | |
| 2. A list of one or more user controllable expression(s) in the | |
| function. | |
| The user only controls the result of the provided controllable | |
| expression(s) and nothing else. | |
| | |
| Perform a security analysis of the usage of the output result of the | |
| user provided controllable expression(s). All other uncontrolled inputs | |
| to the function are safe. Do not make assumptions about subsequent | |
| operations that are not provided and/or do not exist in the provided | |
| function. Bypassing error handling and controlling the function return | |
| value is not a vulnerability. | |
| | |
| At the end of your response say Vulnerable or Not Vulnerable. | |
|-------------------------------------------------------------------------| |
| User Prompt: | |
|-------------------------------------------------------------------------| |
| Controllable Expression(s): | |
| - "get32Value()" : result range is 0x0 to 0xffffffff | |
| - "int32_t x0_18" : result range is 0x0 to 0xffffffff | |
| - "int32_t x0_26" : result range is 0x0 to 0xffff | |
| - "int32_t x0_27" : result range is 0x0 to 0xff | |
| - "uint32_t x8_12" : result range is 0x1 to 0x9 | |
| - "uint32_t x9_3" : result range is 0x8 to 0x20 | |
| - "x0_24" : result range is 0x0 to 0xffffffff | |
| | |
| Function: | |
| int64_t ABCPlugin::init(IIODictionary* arg1) | |
| { | |
| <function code ...> | |
| } | |
'-------------------------------------------------------------------------' |
The first prompt uses a structured System-User format with moderate |
constraints, including explicit negative instructions (e.g., what not to |
consider a vulnerability). In contrast, the second prompt is minimal and |
purely positive, containing no exclusions or negations. It leaves the |
model free to reason within the provided symbolic context alone. |
.-------------------------------------------------------------------------. |
| Sample Prompt #2 | Minimal Positive Prompt (with no constraints) | |
|-------------------------------------------------------------------------| |
| User Prompt: | |
|-------------------------------------------------------------------------| |
| Conduct a comprehensive security analysis of the following function, | |
| when the output of the following controllable expression is fully | |
| controlled by the attacker. The attacker only controls the result of | |
| the provided controllable expression and nothing else. | |
| Structure your response. | |
| At the end of your response say Vulnerable or Not Vulnerable: | |
| VULNERABLE/NOT VULNERABLE | |
| | |
| Controllable Expression: | |
| - "*(uint64_t*)((char*)arg6 + *(uint64_t*)(*(uint64_t*)arg6 - 0x138)) + | |
| 0x28" : result range is 0x0 to 0xffffffff | |
| | |
| Function: | |
| int64_t sub_18be031d0(int32_t arg1, int32_t arg2, void** arg3, | |
| uint32_t arg4, char* arg5, int64_t* arg6) | |
| { | |
| <function code ...> | |
| } | |
'-------------------------------------------------------------------------' |
These examples demonstrate how E0 grounds LLM reasoning in symbolic |
inputs, ensuring that prompts reflect only untrusted-input influence and |
feasible execution paths, driving both interpretability and a low |
false-positive rate. |
---[ 12.3 - Code Context Representation |
Modern LLMs reason best when provided with higher-level code |
representations. While E0's symbolic expressions originate from low-level |
assembly, these expressions are often difficult for LLMs to interpret in |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.