Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

Dark-Moon

> 云原生
Open source

Autonomous AI pentesting engine, continuous offensive security across web, cloud, AD & Kubernetes. Agentic reasoning + real exploit execution deliver proof-base

798 stars0 likes4 views
WebsiteGitHub

About

Autonomous AI pentesting engine, continuous offensive security across web, cloud, AD & Kubernetes. Agentic reasoning + real exploit execution deliver proof-base


Three reasons DarkMoon is different

1. Truly open source. GPLv3, self-hosted, every agent's methodology is plain Markdown you can read, diff and fork. Nothing hidden, no closed core for the engine.

2. It doesn't just find, it fixes. Every finding flows finding → sandbox-validated fix → human-reviewed pull request, retested against the original exploit, and is never auto-merged. On our OWASP Juice Shop demonstration, 42 of 57 findings were fixed end-to-end with a clean live exploit-retest (a fix only counts when the original exploit is re-run and confirmed closed). See the remediation benchmark and the 57 open PRs on ASCIT31/juice-shop.

3. Local/private LLM, data never reaches the model. Run DarkMoon on a local model (Ollama, llama.cpp) behind the Privacy Gateway: your infrastructure values (IPs, hosts, emails, credentials) are tokenized locally before the model sees them; it reasons on placeholders like IP_PRIVATE_001 and real values are rehydrated only locally. Defense in depth, not an absolute guarantee.


Quick Start

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

install.sh configures your LLM provider interactively (no need to edit docker-compose.yml) and builds the full stack:

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

Supports cloud providers (Anthropic, OpenAI, OpenRouter…) and local models (Ollama, llama.cpp). Then run your first assessment and watch it live:

bash
./darkmoon.sh "TARGET: example.com"
./darkmoon.sh --log 

Prerequisites: Docker & Docker Compose, and an LLM API key (or a local model). GPU setup, environment variables and the full flags reference live in the Full Documentation.


What is DarkMoon?

DarkMoon is an open-source AI penetration testing platform. Point it at a target you are authorized to test, and it runs the whole assessment on its own: it reasons, plans, and dispatches 50 specialist agents that execute real offensive operations through a controlled MCP layer, then reports every vulnerability with the exact command, the raw output and the proof behind it.

It does not replace the pentester. It clears the repetitive part of an assessment with evidence, so your experts spend their time on judgment, not toil.


Why DarkMoon?

  • Beyond the web — one agentic system across web, APIs, Active Directory, Kubernetes, cloud (AWS, Azure, GCP), CI/CD, databases, IoT firmware and AI/LLM inference endpoints, chained end to end
  • Pentests your AI too — a dedicated LLM agent probes AI/LLM inference endpoints (OpenAI-compatible, Ollama, vLLM, TGI) for the OWASP LLM Top 10: prompt injection, jailbreaks, system-prompt leakage and unsafe output handling, with garak-backed probes and proof for every finding
  • ️ Your data never reaches the LLM — reversible local tokenization turns real IPs, hostnames, URLs, credentials and paths into deterministic placeholders (IP_PRIVATE_001, ...), rehydrated locally only at the moment a tool runs and masked back out of every result. Runs fully on a local model. And it never costs you a command: when a value is headed somewhere it must not go, the command still runs and the far end receives the placeholder instead. This is the part no cloud competitor has.
  • Proof, not scores — every finding ships with the exact command and raw output, reproducible, so there is nothing to trust blindly and almost nothing to triage
  • 50 specialist agents, 50+ offensive tools — Nuclei, NetExec, BloodHound, sqlmap, Impacket, Naabu, httpx, ffuf and more, orchestrated over MCP
  • ️ Security by design — the AI never runs a command directly; every action flows through a controlled, logged MCP interface
  • ♾️ CI/CD native — trigger a pentest in the pipeline and get findings as artifacts
  • Nothing hidden — GPLv3, self-hosted, each agent's methodology is plain Markdown you can read, diff and fork

Built for security teams, DevSecOps engineers, red teamers and ethical hacking professionals.


Benchmark: 57 real vulnerabilities on OWASP Juice Shop

Real, reproducible black-box run against OWASP Juice Shop on a local LLM (nothing leaves your infrastructure):

Metric Result
Vulnerabilities found 57 (8 critical / 24 high / 21 medium / 4 low)
Wall-clock time 28.5 min
Proof-of-exploitation per finding
LLM local (Ollama / llama.cpp)

Reproduce it and compare tools yourself: ASCIT31/Darkmoon-Benchmarks.

How DarkMoon compares

DarkMoon strix shannon PentAGI
Runs on local LLM (data never leaves) ✅ ❌ cloud ❌ cloud partial
Privacy Gateway (local tokenization) ✅ ❌ ❌ ❌
Active Directory + Kubernetes ✅ ❌ ❌ partial
Proof-of-exploitation ✅ ✅ ✅ ✅
Open source ✅ GPL-3.0 ✅ ✅ ✅

Compiled from public repos/docs (2026-08); corrections welcome via PR.


How It Works

DarkMoon operates as a strategic AI security agent orchestrator aligned with ISO 27001, NIST SP 800-115, and MITRE ATT&CK methodologies.

When you provide a target, the platform automatically:

  1. Discovers the target environment (ports, services, protocols)
  2. Fingerprints the technology stack (frameworks, CMS, APIs)
  3. Models the attack surface
  4. Deploys specialized sub-agents based on detected technologies
  5. Executes an intelligent vulnerability scanning loop with reactive adaptation
  6. ✅ Validates findings with evidence (requests, payloads, responses)
  7. Generates a structured audit report

Sub-Agent Orchestration

DarkMoon dynamically selects and dispatches specialized agents depending on the technologies discovered:

Detected Technology Agent Triggered
WordPress, Drupal, Joomla, Magento, PrestaShop, Moodle CMS-specific agent
PHP, Node.js, Flask, ASP.NET, Spring Boot, Ruby on Rails, Go Stack-specific agent
GraphQL GraphQL agent
LLM / AI inference endpoint (OpenAI-compatible, Ollama, vLLM, TGI) LLM agent
Active Directory AD agent
Kubernetes Kubernetes agent
AWS, Azure, GCP Cloud-provider agent
Entra ID (Microsoft identity) Identity agent
GitHub, GitLab, Jenkins SCM & CI/CD agent
Terraform, Ansible Infrastructure-as-Code agent
Docker, container registries Container agent
HashiCorp Vault Secrets agent
PostgreSQL, MySQL, MSSQL, Oracle Database agent
Redis, RabbitMQ, Kafka, MQTT Messaging & cache agent
Firmware / IoT images Firmware agent
Headless browser required Headless browser agent

Multiple agents can execute in parallel across hybrid architectures.

Planes that require credentials to be meaningful (cloud accounts, CI/CD, secret stores, databases, Active Directory, Kubernetes) are never dispatched on inference. They fire only when a concrete artifact is found (a key, a token, a reachable metadata endpoint) or when you authorize them explicitly, and are otherwise flagged in the report.

Note: For the complete list of agents, their structure, lifecycle, and how to create custom agents, see Full Documentation, AI Agents.

Architecture Overview

User ──> DarkmoonCLI ──> OpenCode (AI Brain) ──> MCP (Security Gatekeeper) ──> Docker Toolbox (Real Tools)
mermaid
sequenceDiagram
  participant U as User
  participant O as OpenCode
  participant A as AI Agent
  participant M as MCP Darkmoon
  participant T as Docker Toolbox

  U->>O: User prompt
  O->>A: Delegate task
  A->>M: MCP function call
  M->>T: Execute real tool
  T-->>M: Results
  M-->>A: Structured output
  A-->>O: Next decision
  O-->>U: Summary / result

The AI reasons and plans. The MCP controls what can be executed. The Toolbox runs isolated tools inside Docker. The AI never directly touches the system, this is security by design.

Note: For the full architecture breakdown (deployment diagrams, network flows, security boundaries), see Full Documentation, Architecture.


Scope Definition

DarkMoon supports flexible scope definition directly from the command line.

Quick pentest (zero config):

bash
./darkmoon.sh "TARGET: http://172.19.0.3:3000"

Bug bounty mode (flags activate automatically):

bash
./darkmoon.sh "TARGET: http://172.19.0.3:3000 PROGRAM=\"Juice Shop\" FOCUS=sqli,xss,idor NOISE=moderate FORMAT=h1"

Key flags include FOCUS, EXCLUDE, CREDS, TOKEN, NOISE, SEVERITY, FORMAT, and more, all interpreted naturally by the AI.

Note: For the complete flags reference, asset types, EXCLUDE/FOCUS free-form syntax, and advanced multi-target scoping, see Full Documentation, Scope Definition.


Integrated Toolbox

DarkMoon ships with a purpose-built Docker image containing 50+ security tools compiled and optimized in a multi-stage build:

Category Tools (examples)
Port scanning Naabu (discovery), nmap (targeted service probes)
Web scanning Nuclei, ffuf, dirb, sqlmap, Arjun, wafw00f
Recon & crawling Subfinder, Katana, Waybackurls, httpx
CMS WPScan, CMSeeK, WhatWeb
Active Directory NetExec, BloodHound, Impacket (30+ scripts)
Kubernetes kubectl, Kubescape, Kubeletctl, kube-bench, rbac-police
Cloud CLIs aws, az, gcloud, gsutil, bq
Databases & cache psql, mysql, redis-cli, sqlite3
Firmware / IoT binwalk, unsquashfs, sasquatch, firmwalker
Cracking hashcat, john, 7z2john
Network Hydra, curl, dig, SNMP tools
Browser Lightpanda (headless)

All tools are directly accessible, no path configuration needed.

Note: For the complete tools list with installation details and how to add new tools, see Full Documentation, Toolbox.


Documentation Guide

DarkMoon's Full Documentation covers everything you need to operate the platform. Here is a quick reference to the most important sections:

Topic What You'll Find Link
GPU & Driver Setup NVIDIA troubleshooting for Docker, WSL, and native Linux GPU Guide
Environment Variables LLM provider configuration, API keys, model selection Environment Config
Startup & Build install.sh behavior, docker compose build, stack management Build & Launch
Scope & Flags TARGET syntax, bug bounty mode, FOCUS/EXCLUDE, credentials Scope Definition
Assessment Workflow Step-by-step: discovery, fingerprinting, agents, reporting Assessment Engine
Real-Time Session Logs Monitor commands executed by the MCP server live Session Logs
AI Agents Agent structure, lifecycle, how to create or modify agents AI Agents
Architecture Deployment diagrams, security boundaries, execution flow Architecture
Toolbox Complete tool list, adding tools, Docker image internals Toolbox
MCP Workflows Workflow structure, creating custom workflows, best practices [MCP Workflows](docs/full

Issues· 2 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Pythonactive-directoryai-agentsai-red-teamai-security-tool

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category云原生
PricingOpen source

> Related tools

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,