TU Wien's PrivEsc-LLM 4B Matches Claude at Hacking Linux for 82x Less
A 4B open-weight model post-trained with SFT and verifiable-reward RL hits 93.3% on Linux privilege escalation at 82x lower cost than Claude Opus.
ProTakeaways
- PrivEsc-LLM 4B, a post-trained Qwen3 4B, reaches 93.3% on Linux privilege escalation, near Claude Opus 4.7's 100%.
- Two-stage recipe: SFT on 2,000 procedural teacher traces, then RLVR with verified root as reward signal.
- Costs $0.00213 per successful root versus $0.1759 for Claude Opus, an 82x reduction.
- Post-training a $120.80 one-time GPU spend amortizes after roughly 700 successful escalations.
- Full artifacts, code, and models released at github.com/sailab-vienna/privesc-llm.
- Long unguided reasoning traces and latency-based (not round-based) reward shaping proved critical.
A team from TU Wien has shown that a 4-billion parameter open-weight model, post-trained with a careful two-stage recipe, can nearly match Claude Opus 4.7 on autonomous Linux privilege escalation while running on a single consumer GPU. The resulting agent, PrivEsc-LLM 4B, reaches 93.3% success within 20 rounds on a held-out benchmark of 12 privilege-escalation scenarios, versus 100% for Claude Opus 4.7, at roughly 82 times lower cost per successful escalation.
Why local matters for offensive security
Automated vulnerability discovery is one of the fastest-moving application areas for LLM agents. Mozilla reports an order-of-magnitude rise in monthly Firefox security fixes, from 20 to 30 per month in 2025 to 423 in April 2026, most of them surfaced by agentic LLM pipelines. The strongest systems, however, are cloud-only and closed source, which is a non-starter when the code or system state being analyzed can't leave a company's network.
The obvious response is to fine-tune a small open-weight model on the task, but nobody had systematically isolated which post-training choices actually make a small security agent reliable. That's the gap this paper fills, using Linux privilege escalation as a clean testbed because success is binary and automatically verifiable, and the task still requires a real tool-use loop where interleaving reasoning with actions and deciding when to call tools are part of the policy itself.
The two-stage recipe
The starting point is Qwen3 4B Instruct. On its own, it solves only 40.8% of the benchmark scenarios. The pipeline lifts that in two stages:
- Supervised fine-tuning on 2,000 successful multi-step attack traces collected from a stronger teacher model (DeepSeek V4 Flash) operating inside procedurally generated privilege-escalation environments.