AutoRedTeam-Orchestrator 标志

AutoRedTeam-Orchestrator

社区
Coff0xc

MCP-native security automation workbench (SDK + CLI + MCP) — authorized testing + static AI/MCP attack-surface self-audit to SARIF / GitHub Code Scanning

发布者Coff0xc
代码仓库AutoRedTeam-Orchestrator
语言Python
复刻数
52
星标数
263
可用工具
0
传输类型stdio
分类
链接
  • 将工具接入 AI 工作流

    AutoRedTeam-Orchestrator 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 263 个星标和 52 个复刻。

AutoRedTeam-Orchestrator

面向授权测试与 AI/MCP 攻击面审计的 local-first、MCP-native 安全自动化工作台。

Python License Version Status

中文 · English · Русский

能力成熟度 · 安全模型 · 安全审计

Beta / Research Preview — 优先支持静态分析、dry-run 与本地靶场。exploit、横向移动、持久化、C2、数据外传等高风险能力属于受限实验特性;policy 与 sandbox 元数据不等同于操作系统或容器级隔离。

目录

概述

AutoRedTeam-Orchestrator 在单一代码库中提供可组合的安全能力,并通过三个入口暴露:MCP Server、Python SDK 与 Typer CLI。产品主线是 AI 辅助的安全自动化——让 AI 编辑器与 Agent 通过 MCP 使用受控的安全能力,并对 AI/MCP 系统自身的攻击面做静态审计。

适用于授权实验、安全自动化研发、AI/MCP 安全审计、CTF 与教学。不是开箱即用的企业平台、自主攻击 Agent 或生产级 C2。

能力

能力域状态边界
侦察与漏洞检测(JSON/SARIF)Beta仅限授权目标;暂无公开准确率基准
AI/MCP 攻击面静态自审Preview只读 AST → SARIF;覆盖 FastMCP 与 low-level SDK
CVE 情报与 PoCPreviewNVD 同步、Nuclei 兼容执行
报告(JSON/SARIF/HTML)BetaHTML 转义加固进行中
编排 / 利用 / 后渗透 / C2 / 横向 / 持久化Restricted Experimental仅限一次性隔离靶场

完整定义见能力成熟度。

快速开始

单行安装(安装 autort 与 autoredteam-mcp 两个命令):

bash
pip install autoredteam-orchestrator                # PyPI
pipx install autoredteam-orchestrator               # 隔离环境
uvx --from autoredteam-orchestrator autort --help    # 免安装直接运行

等不及 PyPI 发布,从 Git 直装:

bash
pip install "git+https://github.com/Coff0xc/AutoRedTeam-Orchestrator.git"
uvx --from git+https://github.com/Coff0xc/AutoRedTeam-Orchestrator autort --help

从源码运行(开发):

bash
git clone https://github.com/Coff0xc/AutoRedTeam-Orchestrator.git
cd AutoRedTeam-Orchestrator
pip install -r requirements.txt
python -m cli.main --help

只读、无网络的起步命令:

bash
python -m cli.main ai-surface scan --path handlers --format sarif -o surface.sarif
python -m cli.main capabilities manifest --profile safe

MCP Server 接入

MCP Server 把安全能力暴露为 MCP 工具,供 AI 编辑器或 Agent 调用。它是 local-first 的:无云端、无遥测,仅限受信本地 stdio。

启动服务

两种等价方式:

bash
autoredteam-mcp --stdio                # 安装后的命令(PyPI / Git)
python -m mcp_stdio_server --stdio     # 源码 checkout 运行

--stdio 选择 stdio 传输,这正是 MCP 客户端(Claude Code、Cursor、Windsurf、Kiro 等)所用的方式。

接入 AI 编辑器

Claude Code、Cursor 等 MCP 客户端读取 mcpServers 键下的 JSON 配置。本项目最小 .mcp.json:

json
{
  "mcpServers": {
    "autoredteam": {
      "command": "autoredteam-mcp",
      "args": ["--stdio"],
      "env": {
        "AUTORT_CAPABILITY_PROFILE": "safe",
        "AUTOREDTEAM_AUTH_MODE": "strict",
        "AUTOREDTEAM_API_KEY": "replace-with-a-real-key"
      }
    }
  }
}

AUTORT_CAPABILITY_PROFILE 决定注册哪些工具(见能力档案)。省略则回退到 fail-closed 的 safe 默认值。

档案选择

档案按以下顺序解析:显式参数 → AUTORT_CAPABILITY_PROFILE 环境变量 → safe 默认值。任何 minimum_profile 高于所选档案的工具都不会注册,任何未在 manifest 中分类的 surface 会在注册阶段 fail-closed(CapabilityManifestError)。

环境变量

变量取值默认含义
AUTORT_CAPABILITY_PROFILEsafe | scan | active-lab | fullsafe注册为 MCP 工具的能力层级
AUTOREDTEAM_AUTH_MODEstrict | permissive | disabledstrict受保护工具的授权门禁
AUTOREDTEAM_API_KEY任意字符串(未设置)strict 模式校验的 API Key;MCP_API_KEY 为等价别名

Python SDK

SDK 是 core/ 引擎之上的薄异步封装,从源码 checkout 导入:

python
from autort import Scanner, Exploiter, AutoPentest, RedTeam, Reporter
from autort import __version__        # 单源版本号,如 "3.1.0"

所有调用均为 async,返回 dict(少数扫描方法返回列表)。成功以 "success": True 标记;失败携带真实的 "error" 字符串,不吞异常。

Scanner — 侦察与检测

python
from autort import Scanner

scanner = Scanner("http://127.0.0.1:8000")

ports = await scanner.port_scan(ports="1-1000")          # 或 top=100
recon = await scanner.full_recon()                        # 完整 10 阶段侦察
vulns = await scanner.detect_vulns(categories=["sqli", "xss", "ssrf"])
nuclei = await scanner.nuclei_scan(tags=["cve"], severity=["high", "critical"])

关键方法:full_recon()、port_scan(ports="1-1000", top=None)、detect_vulns(categories=None, config=None)、fingerprint()、waf_detect()、subdomain_enum(domain=None)、passive_recon(domain=None)、nuclei_scan(tags=None, severity=None, template_dir=None, concurrency=10, limit=None)。

Exploiter — 利用与 CVE 情报

python
from autort import Exploiter

exploiter = Exploiter("http://127.0.0.1:8000")

cves = await exploiter.cve_search("Apache Log4j", severity="critical", has_poc=True)

cve_search(keyword, severity=None, has_poc=None, limit=20) 仅做情报查询,在 safe 档案即可用。cve_exploit(cve)、auto_exploit(top_n=5)、exploit(vuln, **kwargs) 需要 active-lab(及以上)、授权的一次性目标、隔离执行器与 API Key。

AutoPentest — 一键编排

python
from autort import AutoPentest

pentest = AutoPentest("http://127.0.0.1:8000", config={"timeout": 3600})
result = await pentest.run(phases=["recon", "vuln_scan"])   # 省略 phases 则跑完整流程

run(phases=None) 驱动 RECON → VULN_SCAN → POC_EXEC → EXPLOIT → PRIV_ESC → LATERAL → EXFIL → REPORT 流水线。resume(session_id) 续跑中断的会话;status(session_id) 读取实时状态。这是 full 档案能力,仅在隔离、授权的靶场运行。

RedTeam — 后渗透(受限)

RedTeam(config=None) 聚合横向移动、C2、持久化、提权与凭据发现:lateral_move(target, method="ssh", ...)、c2_start(host, port=443, protocol="https")、persist(target="", method="crontab", ...)、privesc(target, ...)、credential_find(...)。所有方法返回 {"success": bool, ...}。它们属于 full 档案、需审批、隔离执行器的 surface,此处仅作目录列出,不写调用示例。

Reporter — 报告

python
from autort import Reporter

reporter = Reporter("session_id_here")
html_path = await reporter.generate(format="html")     # html | json | markdown | executive
findings = await reporter.export_findings(format="json")

CLI 命令清单

Typer CLI 是本地分析的主入口,也是安装后的 autort 命令;源码下用 python -m cli.main。

顶层命令

命令用途示例(仅限授权目标)
scan端口扫描 / 完整侦察autort scan http://127.0.0.1:8000 --full
detect漏洞检测autort detect http://127.0.0.1:8000 -c sqli,xss,ssrf --format sarif
exploitCVE / 自动利用autort exploit http://127.0.0.1:8000 --cve CVE-2021-44228
cve-searchCVE 情报autort cve-search "Log4j" --severity critical --has-poc -n 20
pentest一键编排autort pentest http://127.0.0.1:8000 --phases recon,vuln_scan
report生成报告autort report <session-id> -f html
nuclei纯 Python Nuclei 扫描autort nuclei http://127.0.0.1:8000 -t cve,rce -s high,critical
tools外部工具状态autort tools
version显示版本autort version

detect(以及 ai-* 扫描器)的 CI 友好参数:--ci 输出精简摘要,并在发现达到 --severity-threshold(info/low/medium/high/critical)的项时返回非零退出码。

子命令组

分组命令用途
ai-redteamrun、catalog、convert、eval-run声明式 AI 红队场景(默认 dry-run)
ai-surfacescan、scan-mcp-config、scan-skills静态 AI/MCP 攻击面盘点(只读)
code-agentexpand调用链上下文扩展(不执行代码)
runtime-apiserve只读本地 runtime API(/api/runs)
sandboxdocker-smoke本地 Docker 沙箱 smoke
capabilitiesmatrix、readiness、manifest、profiles能力 manifest 与覆盖
toolslintMCP 工具契约检查(静态)

只读、无网络的起步命令:

bash
autort ai-surface scan --path handlers --format sarif -o surface.sarif
autort ai-surface scan-mcp-config --path .mcp.json
autort ai-surface scan-skills --path ./skills
autort capabilities profiles
autort capabilities manifest --profile safe
autort tools lint --path handlers

配置与授权

能力档案

档案是有序的暴露层级,每个继承上一个:

档案包含运行边界
safe本地分析、dry-run、元数据、受控本地状态受信本地进程;无目标网络访问或主机命令执行
scansafe + 授权侦察与漏洞扫描需明确目标范围与外部网络控制
active-labscan + 利用验证与攻击规划需一次性靶场、独立审批、隔离执行器
full全部 surface,含后渗透与受限研究特性仅显式 opt-in 的隔离、授权、一次性环境

查看实时定义:

bash
autort capabilities profiles              # 有序档案、继承关系、surface 数量
autort capabilities manifest -p scan      # 按档案过滤的完整 manifest

授权模式

授权通过装饰器按工具施加。由 AUTOREDTEAM_AUTH_MODE 选择,共三档:

模式行为
strict(默认)受保护工具要求有效 API Key(AUTOREDTEAM_API_KEY 或 MCP_API_KEY)
permissive记录警告但放行
disabled不校验——仅在 AUTOREDTEAM_ENV=test 或设置 PYTEST_CURRENT_TEST 时生效

能力 manifest

manifest(core/capability_manifest.py)是每个暴露 MCP surface 的机器可读、单一事实来源。每条声明 kind、name、handler、category、minimum_profile、risk、maturity,以及必需控制——auth_required、approval_required 与 executor(in-process / external-process / isolated-required)。任何未分类的 surface 注册即 fail-closed。

required_controls 字段是声明式的:它们只控制 MCP schema 暴露,不负责强制。它们不替代认证、目标范围、独立审批或隔离执行器。

AI/MCP 安全自审

对你自己的仓库做纯静态审计:盘点 MCP server 与 AI agent 工具的攻击面,结果以 file:line 精度进入 GitHub Code Scanning。无需 target、网络、secret 或授权。

作为 GitHub Action 在每个 PR 上运行(完整示例见 self-audit.example.yml):

yaml
- uses: Coff0xc/AutoRedTeam-Orchestrator@v3.1
  with:
    mode: self-audit
    path: '.'
    severity-threshold: high

或本地运行:

bash
python -m cli.main ai-surface scan --path . --format sarif        # MCP handler 工具面
python -m cli.main ai-surface scan-mcp-config --path .mcp.json    # 危险命令与明文 secret
python -m cli.main ai-surface scan-skills --path ./skills         # 高危指令标记

审计外部仓库时,以 --auth-mode lenient 抑制项目特化的授权判定。

设计思路与方案

  • 一套引擎,三个入口。 侦察、检测、利用、编排、CVE、AI 红队与 AI 攻击面逻辑都落在 core/;MCP Server、SDK(autort/)与 CLI(cli/main.py)都是同一引擎之上的薄适配层。能力只实现一次,而非三遍。
  • fail-closed 的 MCP 暴露。 每个注册的 surface 必须在 capability manifest 中分类。未分类或超出所选档案的 surface 不会被静默暴露——注册即抛错。默认是最窄的 safe 档案,而非最宽的。
  • 声明式暴露与强制授权分层。 档案过滤「哪些工具对客户端存在」;授权决定「受保护工具能否运行」。二者刻意独立,避免改档案时意外放宽「谁能行动」。
  • 本地优先、默认 dry-run。 服务仅 stdio,信任本地进程。高风险能力默认 dry-run,仅在显式 opt-in 的隔离一次性靶场中离开 dry-run。
  • 自审是一等公民。 同一仓库自带对 MCP handler、MCP 客户端配置、skill/prompt 文件的只读扫描器,无需目标或网络即可审 AI/MCP 攻击面本身。

安全与边界

  • MCP capability profile(safe/scan/active-lab/full)在注册阶段过滤工具,但不替代认证、目标范围、独立审批或隔离执行器。
  • 高风险能力默认 dry-run,仅应在一次性隔离环境中启用。
  • 认证由单个工具装饰器接入,尚未构成覆盖全部注册面的统一边界。

详见安全模型与能力成熟度。

许可与免责

MIT License,见 LICENSE。

仅供明确授权的安全测试、内部验证、教育研究与本地实验使用。使用者须遵守适用法律并取得目标所有者的书面授权;禁止用于未授权的扫描、利用、持久化、数据外传或规避安全控制。

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "coff0xc-autoredteam-orchestrator": {
      "command": "",
      "args": []
    }
  }
}

将 AutoRedTeam-Orchestrator MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 AutoRedTeam-Orchestrator 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 AutoRedTeam-Orchestrator 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 AutoRedTeam-Orchestrator MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "coff0xc-autoredteam-orchestrator": {
      "command": "npx",
      "args": [
        "-y",
        "autoredteam-orchestrator"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 AutoRedTeam-Orchestrator MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 AutoRedTeam-Orchestrator MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 AutoRedTeam-Orchestrator 帮我完成这项任务吗?
AutoRedTeam-Orchestrator
当然,我看过了。
以下是我使用 AutoRedTeam-Orchestrator 得到的结果。

常见问题

AutoRedTeam-Orchestrator MCP 服务器有什么用途?

AutoRedTeam-Orchestrator 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 AutoRedTeam-Orchestrator MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 AutoRedTeam-Orchestrator。

为什么在 TypingMind 中使用 AutoRedTeam-Orchestrator MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 AutoRedTeam-Orchestrator 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 AutoRedTeam-Orchestrator MCP 连接到 TypingMind?

AutoRedTeam-Orchestrator 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

AutoRedTeam-Orchestrator MCP 在 TypingMind 中提供哪些工具?

AutoRedTeam-Orchestrator 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 AutoRedTeam-Orchestrator MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 AutoRedTeam-Orchestrator 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇