acceptodds
Under review as a conference paper at ICLR 2027

When Strings Lie: Evaluating the Adversarial Robustness of LLMs in Binary Semantic Recovery

Abstract

Large language models are increasingly applied to binary semantic recovery, recovering function names, variable names, behavioral summaries, and source code from the decompiled pseudocode of stripped binaries. While these capabilities advance program understanding, they also expose proprietary algorithms, trade secrets, and security-sensitive implementations to automated analysis. Developers commonly strip symbols and apply obfuscation to deter reverse engineering, but LLM-based recovery can still exploit residual lexical cues. This raises a fundamental question: do LLM-based tools genuinely understand program semantics, or do they simply read off surface-level shortcuts? We present BinTrap, the first large-scale benchmark for measuring the robustness of LLM-based binary semantic recovery. BinTrap comprises 500 real-world functions with counterfactual variants that preserve computation while perturbing variable names, function names, types, and string literals. We evaluate 14 systems spanning 7 specialized tools and 7 general-purpose LLMs across four recovery tasks. Among the single-vector perturbations, string injection is particularly effective, reaching a 54.8% mislead rate on decompilation-to-source. Under the combined perturbation, the average mislead rate reaches 54.7% on decompilation-to-source and 44.5% on summarization, while function-name recovery accuracy drops substantially. These results show that current binary semantic recovery systems can be strongly influenced by misleading lexical cues even when the underlying computation is unchanged.

Primary area:
datasets and benchmarks
Keywords:
Binary, Large Language Model, Reverse Engineering

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_ardmOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
1
Read review
Paper summary

This paper presents BinTrap, a counterfactual benchmark for testing the robustness of LLM-based binary semantic recovery to misleading lexical cues. It creates variants of decompiled C/C++ functions by renaming variables, functions, and types, and by injecting topic-related strings, while aiming to preserve the main computation. The paper tests specialized tools and general-purpose LLMs on function naming, variable naming, function summarization, and source reconstruction. It evaluates both semantic accuracy and the tendency of predictions to follow misleading topics. The results suggest that lexical cues can redirect recovery outputs, and the paper includes pipeline checks, human annotations, and comparisons between LLM judges.

Critical strengths

The paired counterfactual design tests a relevant gap in standard binary-recovery benchmarks: models can rely on names and strings instead of code logic. The coverage of several recovery tasks and both specialized tools and general LLMs makes the finding potentially useful across systems.

The authors provide more than aggregate results. The compile-strip-decompile test, human labels, a second LLM judge, confidence intervals, and optimization-level checks help assess the observed effects. In particular, the pipeline test supports the practical relevance of string injection.

Critical weaknesses

The benchmark does not always reflect the stripped-binary setting it aims to study. Table 3 shows that renamed functions, variables, and types disappear after stripping in the tested samples, but these attacks still make up much of the evaluation and the combined attack. Appendix F.4 uses source code directly, so it does not show that these attacks work on decompiled stripped binaries.

The mislead rate may count copied words as errors even when the recovered program logic is correct, especially for T4 source outputs. The two judges also give very different results: under T2 variable renaming, several general LLMs score below 12% with Claude but around 70% with GPT (Tables 5 and 11). This makes it hard to know how much to trust the reported mislead rates.

String injection adds print calls, so it changes what the program outputs. A model that mentions these calls may simply be describing the code correctly. Without a control using neutral strings and the same number of print statements, it is hard to tell whether the effect comes from the misleading topics or just the added code.

Several systems already struggle to recover the original code without any attack, especially the specialized source-reconstruction tools in Table 7. Appendix F.2 looks only at functions recovered correctly, but very few T4 examples remain. This leaves limited evidence for the strongest claims about T4 robustness.

Questions for authors
  1. How do the renaming attacks reflect the stripped-binary setting when Table 3 shows that these identifiers disappear after stripping?

  2. For T4, how do you distinguish incorrect program logic from copied names or strings when measuring the mislead rate?

  3. Do the string-injection effects persist when the same print statements contain neutral text instead of misleading topics?

Reviewer_EfuAOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes BinTrap, a benchmark for measuring the robustness of LLM-based binary semantic recovery. BinTrap consists of 500 real-world functions and constructs counterfactual variants by perturbing variable names, function names, type names, and string literals across 10 misleading topics while preserving the underlying computation. This paper evaluates 7 specialized tools and 7 general-purpose LLMs on BinTrap, showing that misleading names and strings significantly degrade recovery accuracy, with mislead rates reaching 54.7% for source recovery and 44.5% for summarization.

Critical strengths
  • Comprehensive evaluation: The paper evaluates diverse LLMs and specialized binary-analysis tools across four semantic recovery tasks, using multiple metrics to assess both accuracy and robustness.
  • Impactful topic: The proposed benchmark fills an important gap in evaluating the robustness of LLM-based binary semantic recovery.
Critical weaknesses

Problematic data sampling criteria

This paper mentioned their data sampling criteria in line 215:

From the deduplicated pool, we sample 500 functions with two constraints: the sample is balanced across function-length groups and no single package dominates the selected set.

This criteria does not consider whether the semantics of the sampled functions can actually be recovered from the given inputs. The prompts provided to LLMs (Appendix A) provide only the decompiled pseudocode, without any surrounding program context. For some functions, recovering the original semantics or identifiers from this information alone is nearly impossible. For example, sample 109 contains a simple function that checks whether two non-null pointers are equal.

bool FUN_00212e13(long param_1,long param_2)
{
	bool bVar1;
	if ((param_1 == 0) || (param_2 == 0)) {
		bVar1 = false;
}
	else {
		bVar1 = param_1 == param_2;
	}
	return bVar1;
}

However, the ground truth is a specialized function checking XML schema types.

int xmlSchemaAreEqualTypes(xmlSchemaTypePtr typeA,xmlSchemaTypePtr typeB)
{
	uint uVar1;
	xmlSchemaTypePtr typeB_local;
	xmlSchemaTypePtr typeA_local;
	if ((typeA == (xmlSchemaTypePtr)0x0) || (typeB == (xmlSchemaTypePtr)0x0)) {
		uVar1 = 0;
	}
	else {
		uVar1 = (uint)(typeA == typeB);
	}
	return uVar1;
}

It is hard to jusitfy that approach can map such generic implementaion in pseudocode can map to this certain application. And it might also make the evalution results less convincing.

Misleading conclusion

As BinTrap contains samples where the computation itself provides insufficient information to identify the original functionality, residual strings and identifiers may be the only available semantic clues to LLMs. As a result, it is unsurprising that LLMs rely heavily on these clues and that replacing them with misleading information changes their predictions.

Questions for authors

How do the authors ensure that the original semantics of the sampled functions can be reasonably inferred from the decompiled pseudocode alone?

Reviewer_THRVOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper introduces BINTRAP, a benchmark for evaluating the robustness of LLM-based binary semantic recovery against misleading lexical cues. It perturbs variable names, function names, type information, and string literals in decompiled functions while preserving the underlying computation. Evaluation of 14 systems across four semantic recovery tasks shows that these cues both reduce accuracy and redirect predictions toward unrelated semantic domains. Under combined perturbations, average mislead rates reach 54.7% for decompilation-to-source, highlighting substantial reliance on superficial lexical information.

Critical strengths

The paper presents an interesting approach to evaluating how misleading lexical cues affect LLM-based binary semantic recovery.

The experiments provide concrete evidence that these cues can redirect model predictions rather than merely reduce accuracy.

Critical weaknesses

I find the idea and experiments interesting, but the benchmark’s scale and diversity limit the generalizability of the findings. It contains only 500 samples and is restricted to C/C++, Arch Linux, and GCC. A larger evaluation—on the order of 10,000 samples—with additional languages such as Rust and Go, more diverse compilation settings, and a broader selection of real-world open-source GitHub projects would substantially strengthen the paper. I would consider raising my score if the evaluation were expanded along these dimensions.

Questions for authors

In common compiled programs, available lexical cues are often related to the underlying functionality. BINTRAP instead evaluates an adversarial setting in which these cues are deliberately designed to mislead. How much would the mislead rate decrease if models were explicitly warned that names, types, and string literals might be deceptive and instructed to prioritize computational behavior? Including this prompting baseline would help determine whether the observed vulnerability persists under a simple mitigation.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.