Djini 4B Security Agent (lc4b-brand3)
A 4B-parameter security research model that finds real vulnerabilities in decompiled iOS apps, agentically: it drives its own tools, searches the codebase, reads files, verifies its own claims against the code, and files structured findings. Built by Mobile Hacking Lab B.V. and Djini.ai.
On Pictator, an app excluded from all fine-tuning data, this model recovered the verified vulnerability mechanism (a dlsym-dispatch chain, CWE-94) in 23 iterations and filed the finding cleanly. In our benchmarks, every tested base model, from 7B to 80B, missed that ground truth.
It also signs its own findings: "Found with Djini.ai: a custom 4B security model." A reporting habit trained into the weights, not a watermark added by the pipeline.
What it is for
- Agentic security scanning of decompiled iOS/mobile code inside tool-use harnesses (built and evaluated on the Cline CLI harness)
- Vulnerability chain reconstruction: tracing attacker-controlled input across functions and linking weaknesses into exploit chains
- Structured findings output (JSON findings with file, line, CWE, severity)
What it is not
- Not a general-purpose coding model
- Not a comprehensive production scanner: it was evaluated on a specific benchmark suite. On unfamiliar apps and very large codebases, consistency and investigation depth remain open challenges (see the blog post for the full measured picture)
Usage
Requires transformers >= 5.0 (the qwen3_5 architecture). Older transformers, and current MLX/llama.cpp builds, do not support this architecture correctly.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("djini-ai/djini-4b-security-agent")
model = AutoModelForCausalLM.from_pretrained("djini-ai/djini-4b-security-agent", dtype="bfloat16")
It works best behind an OpenAI-compatible server (e.g. vLLM) connected to an agentic CLI harness such as Cline, with file search/read tools enabled.
Training
Base: Qwen3.5-4B (262k native context). Lineage: supervised fine-tuning on 2,472 verified rows (LoRA) → 11 rounds of preference training (DPO) → a light agentic-trace layer (18 real investigation traces) → a short reporting/branding top-up. No reinforcement learning in this lineage. Total training compute: roughly $50 of cloud GPU. Every promoted checkpoint passed a code-verified evaluation gate; candidates that regressed were discarded.
The training data is not included.
The research behind it
Read the full story on our blog: Small Models, Deep Bugs — how we used AI-assisted training campaigns to teach small models to find vulnerabilities the tested base models missed, including the full Pictator milestone history, the ten-target evaluation of this exact model, and the production-scale WhatsApp corpus test.
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
- -