Skip to main content
Glama

blackarch-AI

一个范围门控的MCP服务器及一组Claude Code Skills,用于BlackArch Linux上的红队和蓝队安全工作流。

这是什么

  • MCP服务器(src/blackarch_ai_mcp/)——将本地安全工具(nmap、gobuster、nikto、hydra,以及本地蓝队审计)封装为MCP工具,使任何MCP兼容客户端均可调用。

  • Claude Code Skills(.claude/skills/)——使用这些工具逐步完成红队和蓝队工作流的Markdown操作手册。

Related MCP server: Pentest MCP

安全模型:范围门控

任何红队工具都不会针对未经明确授权的目标运行。 每个涉及网络目标的工具(nmap_scan、gobuster_dir、nikto_scan、hydra_bruteforce)都会首先检查scope.yaml,如果目标未在列表中列出且具有有效、未过期的授权,则会拒绝并给出明确消息。

cp scope.example.yaml scope.yaml
# edit scope.yaml: add host/cidr, authorized_by, authorization_ref, expires

scope.yaml被git忽略——它是本地的,永远不会发布。完整约定请参见docs/SCOPE.md。

蓝队工具(audit_listening_ports、audit_suid_world_writable、review_auth_log、lint_ssh_config、audit_pacman_packages、crack_hash_offline)仅限本地使用,不受门控——它们从不接触第三方。

本项目不授予任何测试权限。 你有责任在将任何红队工具指向目标之前获得明确、书面的许可。未经授权扫描/利用不属于你或未获得书面许可测试的系统,在大多数司法管辖区是违法的。

安装

sudo pacman -S --needed python-uv
uv sync

独立运行MCP服务器

uv run python -m blackarch_ai_mcp.server

注册到Claude Code

claude mcp add blackarch-ai -- uv --directory /path/to/blackarch-ai run python -m blackarch_ai_mcp.server

然后在Claude Code会话中,调用一个Skill(例如“run a host audit”,或如果启用了斜杠调用则输入/blue-team-host-audit),或直接调用mcp__blackarch-ai__*工具。

布局

各部分如何组合请参见docs/ARCHITECTURE.md,完整工具参考请参见docs/TOOLS.md。

测试

uv run pytest

许可证

MIT——参见LICENSE。

Available Tools

12 tools
audit_listening_portsA

List listening ports (ss -tulnp) cross-referenced with firewall rules on this local host.

Inputs: no named parameters. Returns: result

audit_pacman_packagesA

Report orphan packages, available updates, and package integrity via pacman (read-only) on this local host.

Inputs: no named parameters. Returns: result

audit_suid_world_writableA

Find SUID and world-writable files under paths (default /usr /etc /opt /home) on this local host.

Inputs: paths. Returns: result

check_scopeA

Check whether target is authorized in scope.yaml before running any red-team tool.

Inputs: target (required). Returns: result

crack_hash_offlineB

Run an offline password-strength audit with hashcat/john against a hash file placed in data/hashes/.

Inputs: wordlist (required), hash_file (required), hash_mode (required), tool. Returns: result

gobuster_dirC

Directory-brute-force url with gobuster. Refuses if the host is not in scope.yaml.

Inputs: url (required), wordlist, extensions. Returns: result

hydra_bruteforceA

Credential brute-force target/service with hydra using local userlist/passlist files. Requires confirm=True as an explicit double opt-in, and target must be in scope.yaml.

Inputs: target (required), service (required), passlist (required), userlist (required), +1 more. Returns: result

lint_ssh_configA

Check sshd_config at path against a baseline hardening ruleset on this local host.

Inputs: path. Returns: result

list_installed_toolsA

Inventory installed BlackArch security-tool packages, grouped by category (recon, exploitation, cracking, etc.).

Inputs: no named parameters. Returns: result

nikto_scanB

Run a nikto web vulnerability scan against target:port. Refuses if target not in scope.yaml.

Inputs: target (required), port. Returns: result

nmap_scanC

Run an nmap scan against target (profile: quick|full_tcp|service|udp). Refuses if target not in scope.yaml.

Inputs: target (required), profile. Returns: result

review_auth_logC

Summarize sshd auth log entries on this local host since since.

Inputs: since. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: scanning (nmap, nikto, gobuster), credential attacks (hydra), local auditing (audit_*, lint_*, review_*), and offline cracking (crack_hash_offline). However, check_scope is a utility tool that could be considered overlapping with the scope checks built into other tools, but it serves as a proactive check rather than a reactive refusal.

    Naming Consistency3/5

    The naming pattern mixes styles: verbs like 'check_', 'nmap_scan', 'gobuster_dir', and 'hydra_bruteforce' use a tool_name format, while others like 'audit_listening_ports' and 'review_auth_log' use verb_noun. The category for local auditing tools is consistent, but the overall set lacks a single unified pattern.

    Tool Count4/5

    12 tools is a reasonable count for a security auditing server covering reconnaissance, brute-forcing, local system auditing, and offline cracking. It's slightly high but each tool has a specific role, and no tool feels redundant. The scope is well-defined for a BlackArch-oriented toolset.

    Completeness3/5

    The toolset covers external scanning, web vulnerability scanning, brute-forcing, local host auditing, and password cracking. However, there are gaps: no network sniffing, exploitation, or privilege escalation tools, and no reporting or logging of results. For a comprehensive security assessment suite, these missing capabilities could hinder an agent's workflow.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Exposes 21 tools over stdio that let any MCP-capable AI agent run real Kali-container security tools (nmap, nuclei, sqlmap, Metasploit), search a local 59,000+ CVE vulnerability database, and browse a 5,266-entry GitHub security tool index. Built-in guardrails refuse government, education, and military domains, and only whitelisted in-container executables can be invoked.
      3
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables professional penetration testers to run reconnaissance, exploitation, brute-force, and credential-cracking tooling (nmap, gobuster, nikto, John the Ripper, hashcat, subfinder, httpx, ffuf, nuclei, hydra, sqlmap, tcpdump) through MCP clients over stdio or HTTP. It also captures engagement records and generates client reports with scope-of-work handling and bearer/OIDC authentication.
      157 npm
      GPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables professional penetration testers to run reconnaissance, scanning, brute-force, exploitation, traffic capture, and reporting workflows through a unified MCP interface with STDIO, Streamable HTTP, and deprecated SSE transports plus bearer/OIDC authentication. Supports tools including nmap, gobuster, nikto, JtR, hashcat, subfinder, httpx, ffuf, nuclei, hydra, sqlmap, and wordlist generation.
      157 npm
      GPL 3.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables professional penetration testers to drive recon and exploitation tooling — nmap, gobuster, nikto, John the Ripper, hashcat, subfinder, httpx, ffuf, nuclei, hydra, sqlmap, and tcpdump — plus wordlist building and traffic capture from an MCP client. It also stores structured engagement records and generates client reports with scope-of-work handling, over stdio or authenticated Streamable HTTP (SSE deprecated).
      157 npm
      GPL 3.0