LLMs as Hackers: Autonomous Linux Privilege Escalation Attacks

Большие языковые модели как хакеры: автономные атаки на повышение привилегий в Linux
Andreas Happe, Jürgen Cito, Aaron Kaplan
2026-02-10

LLM-driven penetration testingLLM-driven reflectionautonomous Linux privilege escalationhackingBuddyGPTprivilege-escalation benchmark
Abstract Penetration-testing is crucial for identifying and mitigating system vulnerabilities, with privilege-escalation being a critical subtask involving gaining elevated access to protected resources. The emergence of Large Language Models (LLMs) presents new avenues for automating these security practices by emulating human behavior. However, a comprehensive understanding of LLMs’ efficacy and limitations in performing autonomous Linux privilege-escalation attacks remains underexplored. To address this gap, we introduce hackingBuddyGPT , a fully automated LLM-driven prototype designed for evaluating autonomous Linux privilege-escalation. We curated a novel, publicly available Linux privilege-escalation benchmark comprising distinct, single-vulnerability virtual machines, enabling controlled and reproducible evaluation. Our empirical analysis assesses the quantitative success rates and qualitative operational behaviors of various LLMs— GPT-3.5-Turbo , GPT-4-Turbo , and Llama3 —against baselines of human professional penetration-testers and traditional automated tools. We investigate the impact of context management strategies, different context sizes, and various high-level guidance mechanisms on LLM performance. Results show that GPT-4-Turbo demonstrates high efficacy, successfully exploiting 33–83% of vulnerabilities, a performance comparable to human penetration testers (75%). In contrast, local models like Llama3 exhibited limited success (0–33%), and GPT-3.5-Turbo achieved moderate rates (16–50%). High-level guidance significantly boosts LLM success rates , for instance when using GPT-4-Turbo from 33% to 66% (without guidance) or from 66% to 83%, while state management through LLM-driven reflection doubled unaided GPT-4-Turbo success rates (from 33% to 66%). Qualitative analysis reveals both LLMs’ strengths and weaknesses in generating valid commands and highlights challenges in common-sense reasoning, error handling, and multi-step exploitation, particularly with temporal dependencies. Cost analysis indicates that GPT-4-Turbo can achieve human-comparable performance at competitive costs per exploited vulnerability, especially with optimized context management. Our work provides a baseline for evaluating LLM capabilities in autonomous privilege escalation, guiding future research toward more effective and reliable LLM-guided penetration-testing.
1
GPT-4-Turbo successfully exploited 33–83% of vulnerabilities, approaching the 75% success rate reported for human professional penetration testers.
2
High-level guidance and LLM-driven reflection substantially improved GPT-4-Turbo performance, increasing success from 33% to 66% or 83% depending on the strategy.
3
Llama3 achieved limited success of 0–33%, while GPT-3.5-Turbo achieved moderate success rates of 16–50%.
4
Qualitative analysis identified strengths in valid command generation but persistent weaknesses in common-sense reasoning, error handling, and multi-step exploitation.
5
The authors introduce hackingBuddyGPT, a fully automated LLM-driven prototype for evaluating autonomous Linux privilege-escalation attacks.
6
The study provides a publicly available benchmark of distinct single-vulnerability Linux virtual machines for controlled, reproducible evaluation.

autonomous Linux privilege-escalation attacks performed by Large Language Models

LLM efficacy, success rates, operational behavior, and limitations in exploiting Linux vulnerabilities under different context-management and guidance conditions

Publication Details
Publication Date
2026-02-10
Journal
Publisher
ISSN
Cited by
19
Access Type
Author Information
Authors
Andreas Happe
Jürgen Cito
Aaron Kaplan
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat →
Make a presentation
100%