Skip to content

Back to the catalog

Dark-Moon
github.comrepo

Dark-Moon

DarkMoon is a self-hosted, GPLv3 AI penetration testing platform that orchestrates 50 specialist agents over an MCP-gated toolbox (Nuclei, BloodHound, sqlmap, Impacket, Naabu, httpx, ffuf, etc.) to autonomously run recon-to-exploitation across web, API, Active Directory, Kubernetes, multi-cloud, CI/CD, databases, IoT firmware, and AI/LLM inference endpoints. It uses a Privacy Gateway that tokenizes real IPs/hosts/credentials into placeholders so raw infrastructure data never reaches the (optionally local, e.g. Ollama/llama.cpp) LLM, and can generate sandbox-validated, exploit-retested pull requests for findings. It also ships a dedicated LLM agent that probes OpenAI-compatible/Ollama/vLLM/TGI inference endpoints for the OWASP LLM Top 10 (prompt injection, jailbreaks, system-prompt leakage) using garak-backed probes.

TL;DR Open-source, self-hosted AI agent orchestrator (GPLv3) that autonomously pentests web/AD/cloud/K8s/CI-CD/AI-LLM targets via MCP-gated tools, with local-model data tokenization and auto-generated, exploit-retested fix PRs.
Document

What it is

DarkMoon (repo ASCIT31/Dark-Moon) as installed and run in practice. The existing summary covers the architecture; this adds the setup path, the run commands, and one operational rule the summary omits — how credential-dependent attack planes are gated.

How it works

The pipeline is User → DarkmoonCLI → OpenCode (AI brain) → MCP (gatekeeper) → Docker Toolbox (real tools). The AI plans; the MCP decides what may execute and logs every call; the toolbox runs the actual binaries. On a target it discovers ports/services, fingerprints the stack, models the attack surface, dispatches tech-specific sub-agents (in parallel across hybrid architectures), runs an adaptive scan loop, validates with evidence, and emits a structured report.

Key gating rule not in the summary: planes that only matter with credentials — cloud accounts, CI/CD, secret stores, databases, Active Directory, Kubernetes — are never dispatched on inference alone. They fire only when a concrete artifact turns up (a key, token, or reachable metadata endpoint) or when you explicitly authorize them; otherwise they are flagged in the report.

Preconditions

  • Docker & Docker Compose.
  • An LLM API key (OpenRouter, Anthropic, OpenAI) or a local model (Ollama, llama.cpp). Runs fully offline on a local model.
  • GPU/NVIDIA setup is only covered in external docs, not the README.

What to do

Install and run:

git clone https://github.com/ASCIT31/Dark-Moon.git
cd Dark-Moon

Configure the provider (interactive; edits .opencode.env, not docker-compose.yml):

./install.sh           # skip form if .opencode.env already configured
./install.sh --init    # force reconfiguration (cloud or local model)
./install.sh --help    # show usage

Build/launch is also ./install.sh (clean install, full stack reset). Then:

./darkmoon.sh "TARGET: example.com"
./darkmoon.sh --log <session_id>

The --log view streams every command the MCP server executes in real time. To sanity-check claims, the authors point to a black-box run against OWASP Juice Shop and a separate benchmarks repo (ASCIT31/Darkmoon-Benchmarks) to reproduce and compare tools yourself.

Caveats

  • Only test targets you are authorized to test — the tool runs real offensive operations end to end.
  • Marketing claim "the part no cloud competitor has" (the tokenization-still-runs-the-command behavior) is the vendor's own, unverified here.
  • The page is largely a README/landing pitch; benchmark and Juice Shop results are self-reported and should be reproduced before relying on them.

Organisations named here

  • NIST SP 800-115

Technologies named here

  • DarkMoon
  • OWASP Juice Shop
  • DVGA
  • Darkmoon Pro
  • OpenCode
  • Active Directory
  • MCP
  • Docker Toolbox
  • Privacy Gateway
  • Ollama
  • llama.cpp
  • Darkmoon-Benchmarks
  • Model Context Protocol
  • MITRE ATT&CK
  • nuclei
  • BloodHound
  • sqlmap
  • Impacket
  • ISO 27001
  • OWASP Top 10 for LLM Applications

Techniques named here

  • Automated reconnaissance
  • Technology fingerprinting
  • Attack surface modeling
  • Automated vulnerability scanning
  • Evidence-based finding validation
  • SQL injection
  • Cross-site scripting
  • IDOR
  • Remote code execution
  • SSRF
  • Black-box testing