AI pentesting labs
Where to practise AI-assisted testing
An AI pentesting lab is a target you are allowed to attack while a model helps you: a self-hosted vulnerable app, a training platform, or an LLM challenge. The rules differ a lot, so point a model such as minimax-m3.1-flash-cybersecurity at https://api.pentestllm.ai/v1 only where a platform’s own rules permit AI.
curl https://api.pentestllm.ai/v1/chat/completions \ -H "Authorization: Bearer sk-ptl-live-…" \ -H "Content-Type: application/json" \ -d '{ "model": "auto/security", "messages": [{"role": "user", "content": "Rank these scanner findings by severity and say what to verify first."}] }'Two kinds of lab, two kinds of rule
Practice targets fall into two groups. Self-hosted apps such as OWASP Juice Shop and DVWA run on your own machine: you own the box, so the only rules are the ones the project asks you to follow for learning, plus the obvious one of keeping it off the internet. Hosted platforms run on someone else’s infrastructure under their terms, and those terms decide whether an AI agent may touch the lab at all.
We read each platform’s own rules on 21 November 2026. Where a platform says nothing about AI, we say so and flag it for a recheck, because these pages change. Practise only on platforms whose rules permit AI, or where you have written permission.
Self-hosted: the safest place for an agent
OWASP Juice Shop is an intentionally insecure web shop for training, demos and CTFs. Its companion guide allows professional pentesting tools of your choice, and lists reading the source or the solutions appendix as cheating, because the app is meant to be attacked as a black box; the guide does not mention AI. DVWA is a PHP app with deliberate flaws that warns, in capitals, never to put it on an internet-facing server and recommends a VM on NAT networking, and says nothing about AI tools.
For both, the setup that works is a local VM or container on an isolated network, with your agent’s scope set to that one address. This is where to learn how an agent behaves before you let it near a client, and a mistake by the agent stays inside your own machine.
Hosted training platforms
Hack The Box has the most explicit rule we found. Its Acceptable Use Policy, effective 1 April 2026, bars deploying an AI agent, large language model or bot to directly access, interact with or extract data from any part of its services, unless a service agreement with Hack The Box expressly authorizes it; it also bars training or evaluating AI on its content, and treats work produced by an automated system in assessments as cheating. So do not drive an agent at Hack The Box machines on a standard account; use it only where a written service agreement permits. TryHackMe’s Terms of Use ban automated use, robots and scripts against the website and competing models from its content, and do not mention AI assistants against room machines, so ask TryHackMe support first. PortSwigger’s Web Security Academy offers free labs including a Web LLM attacks topic, and the pages we read say nothing about using AI tools on them.
Practising against AI itself
Lakera’s Gandalf is a game in which you try to make a model reveal a secret password, with defences that get stronger each level. The old address gandalf.lakera.ai now redirects to Lakera’s Agent Breaker game, and Gandalf itself is at play.lakera.ai/gandalf. The game page sets the goal but we found no rule about AI use; using one model to attack another here is the whole point, so check Lakera’s terms before automating it. PortSwigger’s Web LLM attacks labs and Gandalf pair well: one teaches the web side of LLM integration, the other the prompt side. For client work on AI systems, see AI red teaming.
Using a model without fooling yourself
The goal of a lab is to learn, and a model that solves the box for you teaches you very little. Enumerate first, alone, for a fixed time, then paste your own output and ask what stands out. Ask for the next area to look at, not the answer; the CTF model guide covers that hint ladder. When you let an agent drive on your own VM, read its whole log afterwards and redo the key step by hand, and write the report yourself before asking a model to review it. Start with auto/security on a fresh key, and when you move to real targets, the rules of engagement builder helps you put the scope in writing first.
Rules read on 21 November 2026
- OWASP Juice Shop
- Self-hosted web app; guide allows any pentesting tools, reading source or solutions is cheating, nothing on AI; agent fine on your own instance, black-box.
- DVWA
- Self-hosted web app; keep off internet-facing servers, nothing on AI; agent fine on an isolated VM.
- Hack The Box
- Hosted platform; AUP bars AI agents and LLMs from directly accessing its services without a service agreement, bars AI training on content; agent only where HTB authorizes it in writing.
- TryHackMe
- Hosted platform; terms ban automated use, robots and scripts and competing models, nothing on AI assistants; ask support first.
- PortSwigger Academy
- Hosted labs; pages read state nothing about AI tools; not stated, ask PortSwigger.
- Lakera Gandalf
- Hosted LLM game; goal stated, no AI-use rule found; manual play is the intended use, check terms before automating.
16 security builds, priced per token
USD per million tokens, live on 2026-12-03; auto/security bills at the build that answers.
Detected refusals and invalid non-streamed JSON qualify for automatic refunds within the daily cap. Verify your receipt.
| Wire formats | |||||
|---|---|---|---|---|---|
| Qwen3.8 27B Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Uncensored Qwen3.8 27b Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Gemma 4 26B A4B Cybersecurity | Security | $0.4224 | $1.3376 | 262K | |
| Gemma 4 26B A4B Cybersecurity (Uncensored) | Security | $0.48 | $1.52 | 262K | |
| GLM-5.3 Flash Cybersecurity | Security | $0.525 | $1.75 | 1049K | |
| GLM-5.3 Flash Cybersecurity (Uncensored) | Security | $0.525 | $1.75 | 1049K | |
| Red Team (Flash) | Security | $0.90 | $3.00 | 1000K | |
| Red Team (Pro) | Security | $1.455 | $5.82 | – | |
| OrcaCyber MiniMax M3.1 Flash | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber MiniMax M3.1 Flash (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next | Security | $2.00 | $4.00 | 262K | |
| Uncensored Qwen3.8 Flash Next Cybersecurity | Security | $2.00 | $4.00 | 262K | |
| Cyber Frontier | Security | $5.25 | $15.75 | 1049K | |
| OrcaCyber Zero 1.5 | Security | $7.50 | $18.75 | 999K | |
| OrcaCyber Zero 1.5 (Uncensored) | Security | $7.50 | $18.75 | 999K |
Questions
Can I use an AI agent on Hack The Box?
Not on a standard account, as we read it. Hack The Box’s Acceptable Use Policy bars AI agents and large language models from directly accessing or interacting with any part of its services unless a service agreement expressly allows it. Check with Hack The Box if you have an enterprise agreement that might authorize it.
What is the safest lab for testing an AI pentest agent?
A vulnerable app you run yourself, such as OWASP Juice Shop or DVWA, on an isolated VM. You own the system, so there is no third party to ask, and a mistake by the agent stays inside your machine. Keep the agent’s scope set to that one address.
Is there a lab for practising attacks on LLMs?
Yes. Lakera’s Gandalf is a password-extraction game against a defended model, now at play.lakera.ai/gandalf, and PortSwigger’s Web Security Academy has a Web LLM attacks topic with labs. Both are built for that purpose, so testing them stays inside their intended use.
Which model should I practise with?
Start with auto/security on a fresh key, which answers each request with one of the security builds. Keep the model to hints and explanations rather than full solutions, so you still build the skill a client pays for.