Djini 7B CVE Hunter (dpo21)
A 7B security model specialized in finding real vulnerabilities in decompiled mobile code, from Mobile Hacking Lab B.V. and Djini.ai.
The base model had zero measured skill on this task: in our benchmarks, Qwen2.5-Coder-7B-Instruct produced no verified findings on decompiled app code. After supervised fine-tuning and 21 rounds of preference training, this checkpoint scored 7 verified CVE true positives across 4 of 7 real-world CVE bundles (Telegram, WhatsApp, VLC, Signal; code-verified, single greedy runs) and reconstructed full vulnerability chains in 3 of 4 real test apps, while every tested base model up to 80B scored zero on the same material.
Benchmark: verified CVE true positives (7 real CVE bundles x 2 decoding modes = 14 cells)
| Model | Size | Verified CVE true positives (/14) |
|---|---|---|
| Qwen2.5-Coder-7B-Instruct (base) | 7B | 0 |
| DeepSeek-R1-Distill-7B (base) | 7B | 0 |
| Qwen3.5-9B (base, 2026 generation) | 9B | 0 |
| Qwen3-Coder-30B (base) | 30B | 0 |
| Qwen3-Coder-Next-80B (base) | 80B | 0 |
| djini-7b-cve-hunter (this model) | 7B | 7 |
All cells code-verified against ground truth; single greedy runs; same prompts and scoring for every model. The 7 CVE bundles were this model's development set (see Limitations), and held-out generalization results are in the blog post.
Important: this is not an agentic model
This model does not use tools, search codebases, or read files by itself. It is a one-shot analyst: you put the decompiled code in the prompt, it returns the analysis. (For the agentic, tool-driving model see djini-ai/djini-4b-security-agent.)
How to use it
- Decompile the app (e.g. with Ghidra) and collect the functions of interest.
- Prompt it with the code and ask for structured findings:
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("djini-ai/djini-7b-cve-hunter")
model = AutoModelForCausalLM.from_pretrained("djini-ai/djini-7b-cve-hunter", dtype="bfloat16")
prompt = """You are an expert iOS security reviewer doing a multi-file vulnerability assessment.
Below are decompiled source files of one app. Identify ALL security vulnerabilities,
including ones that only become exploitable when files interact (vulnerability chains).
For each finding report: file, line/location, CWE, severity, exploitability, and which
other file(s) are needed to complete the chain.
=== FILES ===
--- FILE: ViewController_processInput.c ---
<paste decompiled code here>
...
Respond with JSON:
{"findings": [{"file": ..., "location": ..., "cwe": ..., "severity": ...,
"description": ..., "chain_with": [...]}], "chains": [{"path": [...], "impact": ...}]}
"""
inputs = tok.apply_chat_template([{"role": "user", "content": prompt}],
add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=4096, do_sample=False)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
- Use greedy decoding (do_sample=False) for deployment-realistic behavior; that is how the reported scores were measured.
- Context: up to 32k tokens. For large apps, select the relevant function cluster rather than pasting everything โ measured attention dilution means more files in the prompt is not always better.
- Also runs great locally on Apple Silicon via
mlx-lm.
What it is good at
- Reading decompiled pseudo-C (stripped names, guessed types) and tracing attacker-controlled input
- Reconstructing vulnerability chains across files: entry point to sink to impact
- Structured JSON findings with file/line/CWE citations you can verify
Limitations
- Trained on specific mobile bug classes; unfamiliar vulnerability classes may be missed
- The CVE bundles it scores on were its development set (trained anchors); held-out generalization was measured separately and is honestly reported in the blog post
- Single-run outputs vary; verify every claim against the code before acting on it
- One-shot only: no tool use, no multi-step investigation (that is the 4B agentic model's job)
Training
Base: Qwen2.5-Coder-7B-Instruct. Supervised fine-tuning on verified decompiled-code analyses (LoRA, trained on a single Apple M5 Max), then 21 rounds of DPO preference training against its own verified-wrong answers. Every round gated by code-verified evaluation; regressing candidates were discarded. Training data is not included.
The research behind it
Read the full story on our blog: Small Models, Deep Bugs โ including the measured base-model gap, the full training journey, and how this 7B compares to the 9B and 4B champions.
More about us: Djini.ai ยท Mobile Hacking Lab.
Credits
Built by the Djini / Mobile Hacking Lab research team.
- Mobile Hacking Lab B.V.: www.mobilehackinglab.com
- Djini.ai: www.djini.ai
- Downloads last month
- 396