atlas

Research map / Large language models / Agents, code and math

Can LLMs Obfuscate Code? A Systematic Analysis of Large Language Models into Assembly Code Obfuscation

AAAI 2025 · Large language models › Agents, code and math · approach: Code generation benchmarks · 13 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Builds MetamorphASM Dataset (MAD) of 328,200 assembly snippet pairs with three obfuscations (dead code, register substitution, control flow change) and benchmarks LLMs on generating obfuscated x86 assembly using delta entropy, cosine similarity and human review.

Problem

Whether LLMs can generate new obfuscated assembly code, which could let malware rewrite itself via API calls to evade anti-virus engines, and how reliably current LLMs do this.

Approach

Creates a script-generated assembly obfuscation dataset with three techniques and evaluates zero-shot and few-shot LLM obfuscation using entropy-change and cosine-similarity proxies plus expert ranking, also fine-tuning CodeT5 on the data.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use 1-shot instead of zero-shot prompting (ablation)GPT-4o-mini · Dead Code InsertionDelta entropy (%): 26.90 -> 21.00Hurt
Use 15-shot instead of zero-shot prompting (ablation)DeepSeekCoder-v2 · Dead Code InsertionDelta entropy (%): 19.50 -> 27.50Helped
Use 15-shot instead of zero-shot prompting (ablation)Codestral · Dead Code InsertionDelta entropy (%): 30.25 -> 11.93Hurt
Use 15-shot instead of zero-shot prompting (ablation)DeepSeekCoder-v2 · Register substitutionDelta entropy (%): 15.71 -> 18.55Helped
Use 15-shot instead of zero-shot prompting (ablation)Codestral · Register substitutionDelta entropy (%): 40.12 -> 41.33Mixed
Use 15-shot instead of zero-shot prompting (ablation)GPT-4o-mini · Control Flow ChangeDelta entropy (%): 15.61 -> 48.63Helped
Use 15-shot instead of zero-shot prompting (ablation)DeepSeekCoder-v2 · Control Flow ChangeDelta entropy (%): 49.20 -> 52.55Helped
Use 15-shot instead of zero-shot prompting (ablation)CodeLlama · Dead Code InsertionDelta entropy (%): 2.20 -> 1.55No clear effect
Fine-tune on MAD (ablation)CodeT5 · Dead Code InsertionDelta entropy (%): The paper reports 0.06Hurt
Fine-tune on MAD (ablation)CodeT5 · Register substitutionDelta entropy (%): The paper reports 0.01Hurt

Surprising findings

Limitations

Experimental setup

Datasets: MetamorphASM Dataset (MAD)

Benchmarks: MetamorphASM Dataset (MAD)

Metrics: delta entropy cosine similarity human expert ranking

Baselines: GPT-3.5 Starcoder CodeGemma CodeLlama Codestral DeepSeekCoder-v2 LLaMA 3.1

Builds on: CodeT5

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy