DarkMoon Autonomous Pentesting
Automates authorized penetration tests through controlled tool execution and a local privacy gateway.
Per-dimension scores and reasoning
Evidence shows: architecture isolates AI from tool execution via MCP gateway, tests prove sensitive values are tokenized, commands rehydrated locally, output sanitized, exfiltration blocked. But user confirmation mechanism only mentioned authorization, not detailed; dependency security not mentioned; rollback not mentioned; publisher identity unverified. Thus, least privilege, data flow transparency, sensitive data handling score 2; user confirmation, external effects, source attribution score 1; dependency security, rollback score 0.
Evidence shows: README and test files consistent, architecture description clear, tests cover privacy gateway. But dependency availability not verified, failure messages not detailed. Thus, self-consistency scores 2; dependency availability, failure messages score 1.
Evidence shows: targets security teams, DevSecOps, bug bounty hunters, supports multiple scenarios, capability boundaries clear (e.g., credential-related agents require authorization), triggers based on technology detection, environment fit supports Docker and local LLM. Thus, each scores 2.
Evidence shows: README structure clear, install notes detailed, examples abundant, license GPL-3.0. But naming stability not mentioned, known limitations not explicit, versioning changelog missing, maintenance responsibility only via contributing guide. Thus, information architecture, install notes, examples/FAQ score 2; naming stability, known limitations, maintenance responsibility score 1; license scores 3; versioning changelog scores 0.
Evidence shows: output is structured report with evidence, marginal value high (automated pentesting), but cost-benefit not quantified. Thus, output usability, marginal value score 2; cost-benefit scores 1.
Evidence shows: benchmark claims 57 vulns but no reproduction details; external media mentions exist but no independent verification; facts and inferences not clearly separated. Thus, each scores 1.
- Publisher identity unverified; assess supply chain risk carefully.
- Dependency security not mentioned; check for vulnerable dependencies.
- Rollback mechanism absent; consider failure recovery.
- Benchmark claims 57 vulns but no reproduction details; verify independently.
What does this agent do, and when should you use it?
DarkMoon is an open-source automated penetration-testing platform that orchestrates security assessments with AI security agents. A target enters through DarkmoonCLI; OpenCode performs reasoning and delegation, MCP Darkmoon controls execution, and Docker Toolbox runs security tools in isolated containers. The platform can dispatch specialized sub-agents for web stacks, Active Directory, Kubernetes, CMS targets, and headless-browser work based on discovered technologies, then produces structured audit reports with evidence. Its privacy gateway replaces IP addresses, hostnames, credentials, and internal paths with deterministic placeholders, rehydrates them locally immediately before tool execution, and masks them again in results. It fits authorized security teams seeking automated assessments within a self-hosted boundary, provided they can operate Docker and configure a cloud or local LLM path.
When you run ./darkmoon.sh "TARGET: example.com", DarkmoonCLI passes the target to OpenCode, which selects and delegates work to an AI Agent. The agent makes MCP Darkmoon function calls; MCP governs the action and sends the command to Docker Toolbox, then returns structured tool output for the next decision. The documented flow discovers ports, services, and protocols; fingerprints technologies; models the attack surface; dispatches sub-agents; scans and adaptively validates findings; and generates a structured audit report with request, payload, and response evidence. Example toolbox components include Naabu, Masscan, Nuclei, ffuf, sqlmap, NetExec, BloodHound, kubectl, Kubescape, and Lightpanda.
- An authorized internal security team wants recurring infrastructure assessments with reviewable vulnerability evidence.
- A DevSecOps team wants to run automated security testing after a build and identify critical issues before production.
- An authorized Active Directory assessor needs a workflow that can use NetExec, BloodHound, and Impacket tooling.
- A Kubernetes security practitioner needs to include kubectl, Kubescape, and Kubeletctl in an assessment workflow.
- A permitted bug-bounty researcher wants to narrow an assessment with scope instructions such as
FOCUS=sqli,xss,idor. - A training team needs reproducible web, network, or directory-service assessment exercises.
What are this agent's strengths and limitations?
- Uses a separated OpenCode → MCP Darkmoon → Docker Toolbox execution path, so the model does not directly execute system tools.
- Its privacy gateway applies reversible local deterministic placeholders to sensitive values and masks them again in tool results.
- Dynamically dispatches CMS, application-stack, GraphQL, Active Directory, Kubernetes, and headless-browser sub-agents based on discovered technology.
- Bundles more than 50 security tools in Docker Toolbox and documents evidence-based structured reporting.
- Deployment requires Docker and Docker Compose, and the installation flow builds and launches a full container stack.
- It requires either an LLM API key or a local model runtime; cloud configuration introduces a provider dependency.
- Because it executes real offensive-security operations, adopters must ensure target authorization and correct scope themselves.
- The supplied material does not document report export formats, CI/CD integration mechanics, access controls, or recovery behavior after failures.
How do you install or deploy this agent?
Prerequisites: Docker, Docker Compose, and either an LLM API key (OpenRouter, Anthropic, OpenAI, and others) or a local model. Run:
git clone https://github.com/ASCIT31/Dark-Moon.git
cd Dark-Moon
./install.sh --initConfigure a cloud or local model interactively, then run ./install.sh to build and launch the full stack.
How do you use this agent?
For a first assessment, run:
./darkmoon.sh "TARGET: example.com"Monitor it with:
./darkmoon.sh --log <session_id>The documented scoped example is:
./darkmoon.sh "TARGET: http://172.19.0.3:3000 PROGRAM=\"Juice Shop\" FOCUS=sqli,xss,idor NOISE=moderate FORMAT=h1"The README also documents EXCLUDE, CREDS, TOKEN, SEVERITY, and FORMAT as scope-related flags.
How does this agent compare with similar options?
Against traditional manual penetration testing, DarkMoon is positioned to automate discovery, agent dispatch, validation, and reporting; the README also states that it is not intended to replace the pentester.
FAQ
Does the model receive my real IPs, hostnames, or credentials?
Is a cloud model mandatory?
How can I inspect what an assessment actually ran?
./darkmoon.sh --log <session_id>; the README says real-time session logs show commands executed by the MCP server.Can I constrain the test scope?
TARGET, FOCUS, EXCLUDE, CREDS, TOKEN, NOISE, SEVERITY, and FORMAT.