---
title: "AI Pentesting Labs and Their AI Rules (2026)"
description: "Six legal places to practise AI-assisted testing, and what each one’s own rules say about AI agents and tools. Practise only where the rules permit it."
canonical: https://pentestllm.ai/ai-pentesting-labs
generated: 2026-12-03T14:42:58.064Z
source: https://pentestllm.ai/ai-pentesting-labs
base_url: https://api.pentestllm.ai/v1
---

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.

[Prices per token](https://pentestllm.ai/pricing)

[Get a key](https://app.pentestllm.ai/console) [Try it free in the browser](https://pentestllm.ai/playground)

```bash
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](https://pentestllm.ai/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](https://pentestllm.ai/best-llm-for-ctf) 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](https://pentestllm.ai/tools/rules-of-engagement) 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](https://pentestllm.ai/statements/verify).

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [Qwen3.8 27B Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity) qwen3.8-27b-cybersecurity | Security | $0.40 | $2.40 | 262K | openai |
| [Uncensored Qwen3.8 27b Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity-uncensored) qwen3.8-27b-cybersecurity-uncensored | Security | $0.40 | $2.40 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity) gemma-4-26b-a4b-it-cybersecurity | Security | $0.4224 | $1.3376 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity (Uncensored)](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity-uncensored) gemma-4-26b-a4b-it-cybersecurity-uncensored | Security | $0.48 | $1.52 | 262K | openai |
| [GLM-5.3 Flash Cybersecurity](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity) glm-5.3-flash-cybersecurity | Security | $0.525 | $1.75 | 1049K | openai |
| [GLM-5.3 Flash Cybersecurity (Uncensored)](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity-uncensored) glm-5.3-flash-cybersecurity-uncensored | Security | $0.525 | $1.75 | 1049K | openai |
| [Red Team (Flash)](https://pentestllm.ai/models/red-team-flash) red-team-flash | Security | $0.90 | $3.00 | 1000K | openai |
| [Red Team (Pro)](https://pentestllm.ai/models/red-team-pro) red-team-pro | Security | $1.455 | $5.82 | – | openai |
| [OrcaCyber MiniMax M3.1 Flash](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity) minimax-m3.1-flash-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber MiniMax M3.1 Flash (Uncensored)](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity-uncensored) minimax-m3.1-flash-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next (Uncensored)](https://pentestllm.ai/models/orcacyber-qwen3.8-flash-next-uncensored) orcacyber-qwen3.8-flash-next-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity) qwen3.8-flash-next-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [Uncensored Qwen3.8 Flash Next Cybersecurity](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity-uncensored) qwen3.8-flash-next-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [Cyber Frontier](https://pentestllm.ai/models/cyber-frontier) cyber-frontier | Security | $5.25 | $15.75 | 1049K | openai |
| [OrcaCyber Zero 1.5](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity) orca-zero-1.5-cybersecurity | Security | $7.50 | $18.75 | 999K | openai |
| [OrcaCyber Zero 1.5 (Uncensored)](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity-uncensored) orca-zero-1.5-cybersecurity-uncensored | Security | $7.50 | $18.75 | 999K | openai |

[Full price list and tool fees](https://pentestllm.ai/pricing) · [Every model](https://pentestllm.ai/models) · [API docs](https://pentestllm.ai/docs)

## 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.

## Read next

[AI pentesting certifications Which 2026 certifications teach AI-assisted testing or testing AI systems, and which exams allow AI tools.](https://pentestllm.ai/ai-pentesting-certifications) [Best LLM for CTF How to choose a model per CTF category, with live prices for each tier.](https://pentestllm.ai/best-llm-for-ctf) [OSCP study with AI A tutor for the course labs and your notes; the exam guide bars LLM chatbots during the exam.](https://pentestllm.ai/oscp-study-with-ai)

Facts about other products and tools on this page were read from their own pages on 21 November 2026: [Hack The Box legal](https://www.hackthebox.com/legal), [TryHackMe terms](https://tryhackme.com/legal/terms-of-use), [OWASP Juice Shop](https://owasp.org/www-project-juice-shop/), [Lakera Gandalf](https://play.lakera.ai/gandalf). They change; check the source before relying on a figure.

## One key, from $3

For systems you own or may test in writing: [acceptable use](https://pentestllm.ai/acceptable-use).

[Get a key](https://app.pentestllm.ai/console)
