AI pentesting guides / Free, open-source and AI pentesting

Isolated networks

Air-gapped pentesting: running an AI pentester with no internet

Air-gapped pentesting is testing systems inside a network with no route to the internet, which means everything the tester needs, including tool binaries, vulnerability templates, container images and the AI model itself, has to be brought in beforehand. Local models make AI-driven testing possible in these environments for the first time.

Classified networks, operational technology, regulated research and some financial back offices are tested this way. The practical challenge is not the testing; it is planning the transfer in, knowing which features silently depend on connectivity, and getting findings back out through an approved path.

What to pre-stage before you go in

  • The pentest tool binary itself, at a pinned version you have checked.
  • Every external tool it drives (scanners, fuzzers, exploitation helpers), installed on a connected staging machine and copied across.
  • Template and signature libraries, such as nuclei templates, as a dated snapshot.
  • Model weights and the local model server, plus enough GPU or memory to run them.
  • Container images, if you need Docker-based practice labs or dependencies.
  • Hashes of everything, so the receiving side can verify the transfer.

Features that quietly need connectivity

Audit your tool for anything that phones out. Typical examples are update checks, remote template or exploit-chain registries, cloud model APIs, and out-of-band verification. Out-of-band testing works by making the target call back to a server you control; inside an isolated network, the target cannot reach a public callback service, so either host a callback server inside the enclave or rely on in-band verification such as differential and timing checks.

Running the test

Treat the session like any other engagement: written authorisation, a defined scope, a testing window and a contact on the system owner's side. Because you cannot fetch anything mid-test, rehearse the full run on a connected replica first. Expect older template snapshots to miss very recent CVEs, and note the snapshot date in your report so readers know the coverage horizon.

Getting findings out

Reports from an isolated network often have to pass through a cross-domain review or data diode. Keep reports structured and free of unnecessary payload detail, export in a format the review process accepts, and keep the full evidence inside the enclave where it can be reviewed later.

With Pentest-Swarm

Pentest-Swarm in an air-gapped network

Pentest-Swarm can run with a fully local model through Ollama or LM Studio, so no model traffic leaves the machine and there is no API dependency. The rest is a matter of staging.

  • Stage the binary, then use pentestswarm install-tools and pentestswarm doctor on a connected replica to fetch and check the toolchain before copying it in.
  • Bundled playbooks are embedded in the binary, so pentestswarm playbook run <name> works without a repository checkout.
  • Scope enforcement is fail-closed and the egress guard restricts outbound traffic, which suits environments where unexpected connections are themselves an incident.
  • Differential and timing verification oracles (--verify, beta) do not depend on a public callback server.
  • Every run leaves a full audit trail for the system owner.

Where it falls short

Pentest-Swarm has no dedicated offline packaging; you assemble the bundle yourself. Remote features, such as pentestswarm chain update for the exploit-chain registry, will not work without connectivity, and out-of-band verification needs a callback path the target can reach. Local models are less capable than frontier cloud models. The project targets web applications and APIs; for industrial control systems or other specialist protocols in an isolated network, use specialist tools and testers.

Questions

Can AI pentesting work without internet access?

Yes, if the model runs locally and all tools and templates are pre-staged. Pentest-Swarm with Ollama or LM Studio sends no model traffic anywhere.

How do I keep vulnerability checks current in an air gap?

Transfer dated snapshots of template libraries on a regular schedule, and record the snapshot date in each report.

Does out-of-band testing work in an isolated network?

Only if the target can reach a callback server, which means hosting one inside the enclave. Otherwise rely on differential and timing checks.

Sources

  1. ProjectDiscovery interactsh (out-of-band server)
  2. NIST SP 800-115, Technical Guide to Information Security Testing