← Lab /Software

LLMs can identify obfuscated Android code without handcrafted rules

Off-the-shelf LLMs are able to detect code obfuscation in Android apps without dedicated training

Software arXiv 12 Jun 2026 Measurement Simulation evidence

Published as “Evaluating LLMs for Obfuscation Detection and Classification in Android Apps”

Why it matters

LLM-based analysis can be deployed to automatically flag obfuscated Android apps, especially those using renaming, offering a more flexible alternative to rule-based SAST detectors.

Summary

LLMs can detect Android app obfuscation with an F1-score of 0.88, achieving precision 0.82 and recall 0.96, and they substantially outperform existing SAST tools. The study shows strong performance especially for identifier-renaming techniques, while reflection and call-indirection remain harder to spot. However, some models (e.g., deepseek-r1) exhibit high false-positive rates, and the controlled benchmark is limited to only 10 apps, so the evidence, while promising, is not uniformly strong across all techniques or models.

What they found 4

  1. LLMs achieve high detection performance on real-world apps

    “Precision of 0.82, a Recall of 0.96, and an F1-score of 0.88.”

  2. LLMs outperform existing SAST tools on the benchmark

    “LLMs consistently outperformed the evaluated SAST tools on our benchmark.”

  3. LLMs are especially effective at recognizing identifier-renaming obfuscation

    “LLMs are particularly effective on renaming-based obfuscation.”

  4. Identifier-renaming transformations achieve the highest detection rates

    “identifier-based transformations such as class, method, and field renaming consistently achieved the highest detection and classification rates.”

Caveats 6

  • Some models, such as deepseek-r1, achieve relatively weak performance in binary detection due to a high false positive rate, yet still demonstrate a reasonable ability to identify the specific obfuscation technique
  • Techniques such as reflection and call indirection remained more difficult to detect, indicating uneven coverage across obfuscation families
  • LLM non-determinism and reproducibility LLMs are inherently non-deterministic and may occasionally generate inconsistent or hallucinated outputs.
  • LLM selection constraints. The study evaluates a representative set of contemporary open-weight and proprietary models based on our financial and hardware capabilities.
  • Benchmark Size. The controlled benchmark (DGT ) was intentionally designed to provide ground-truth labels, enabling the systematic evaluation of different LLM configurations. Although the benchmark comprises only 10 apps...
  • Bytecode-level obfuscation scope. Our analysis is performed on Smali code obtained from decompiled APKs, and therefore, our detector is fundamentally tailored to bytecode-level obfuscation.

What’s new here 4

  • Applies off-the-shelf LLMs directly to Smali code without any dedicated training or handcrafted feature extraction.
  • Evaluates both detection (binary) and fine-grained classification of ten obfuscation techniques.
  • Compares LLM performance against traditional SAST-based detectors on a real-world dataset of 1,000 Google Play apps.
  • Provides an open benchmark and prompt designs for reproducible LLM-based obfuscation analysis.