Blog

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.

· 6 min read

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 is built exactly this way

GPL-3.0, local-LLM capable, with a Privacy Gateway for the tokenization above, and coverage across web, API, Active Directory and Kubernetes. Proof it works locally: 57 vulnerabilities on OWASP Juice Shop in 28 minutes on a local model(reproducible benchmark).

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

Run it against your own lab

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