Blog··6 min read

The local, self hosted AI pentester: autonomous testing without a cloud model

Most autonomous AI pentesters send your code, IPs and traffic to a hosted model. Here is how to run autonomous penetration tests entirely locally, with deterministic tokenization so nothing sensitive ever leaves.

Almost every autonomous AI pentester ships your source code, IPs, hostnames or traffic to a hosted model. For a lot of teams, regulated, sovereign, or testing a client environment, that is a non-starter. Here is how to run autonomous pentests entirely locally.

What "local" has to mean

  • Local inference. The model runs on your hardware (Ollama / llama.cpp), not a vendor API.
  • No leakage even if you use cloud. Sensitive values are tokenized locally with deterministic placeholders before any prompt leaves, so even a cloud model never sees real IPs, hosts or credentials.
  • Self-hosted, auditable. Runs on your infrastructure via docker-compose; source is readable.
DarkMoon Terminal Explorer in the open-source Community edition, Workspace tab, on lab campaigns against intentionally vulnerable training apps: totals (188 findings, 115 exploited, 36 critical, 24 attack paths, 0 evidence-backed), recent campaigns and projects, an executive panel with a rated Cyber Score of E 0/100 and the first treatment actions, and a severity breakdown of the selected campaign.
The open-source Community edition works in the terminal: its Terminal Explorer shows totals, recent campaigns, a rated Cyber Score and the first treatment actions. Lab data from intentionally vulnerable training apps.Captured 20 November 2026 from the Terminal Explorer.

Darkmoon is built exactly this way

AGPL-3.0, local-LLM capable, with a Privacy Gateway for the tokenization above, and coverage across web, API, Active Directory and Kubernetes. One correction on our own numbers: our published OWASP Juice Shop result, 57 findings in 28.5 minutes, was a single run on Claude Opus 4.6, a cloud model, not on a local model, and it has not been independently reproduced (run file and its corrections).

DarkMoon Pro finding detail on synthetic demo data: an exploited, critical SQL injection in the pastes(filter) parameter of the DVGA demo lab (CVSS 9.8), with the asset tree on the left, the description and the evidence the testing agent recorded in the centre, and a details rail with identifier, CVSS vector, endpoint, agent and first and last seen times.
A finding detail in DarkMoon Pro, with the evidence the testing agent recorded and its CVSS vector, endpoint and agent. Synthetic demo data (demo.dark-moon.org), not the Juice Shop benchmark run described in this article.Captured 22 November 2026 from demo.dark-moon.org.

Full disclosure: Darkmoon is our project. github.com/ASCIT31/Dark-Moon.

Next
Run it against your own lab

Darkmoon is open source (AGPL-3.0) and self hosted. Clone it, point it at a target you own, and read every line.