ktol1/RedTeam-Agent

GitHub: ktol1/RedTeam-Agent

RedTeam-Agent 是一个基于 MCP 协议的 AI 驱动自主红队框架,通过集成 15+ 渗透工具实现从资产发现到横向移动的全自动化内网安全审计。

Stars: 6 | Forks: 1

# RedTeam-Agent
RedTeam-Agent ### AI 驱动的自主红队框架 **让 AI 成为您的安全审计黑客** [![License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](https://opensource.org/licenses/MIT) [![Python](https://img.shields.io/badge/Python-3.8+-blue?style=for-the-badge)](https://www.python.org/) [![Skill](https://img.shields.io/badge/Workflow-Skill--First-brightgreen?style=for-the-badge)](./.github/skills/redteam/SKILL.md) [![Stars](https://img.shields.io/github/stars/ktol1/RedTeam-Agent?style=for-the-badge)](https://github.com/ktol1/RedTeam-Agent/stargazers) [English](./README.md) | [Chinese](./README_zh.md) | [文档](./.github/skills/redteam/SKILL.md) | [快速开始](#quick-start)
## 概述 RedTeam-Agent 是一个采用“技能优先”终端工作流的 AI 驱动红队框架。AI 读取项目技能,发现工具,在终端中执行命令,并总结高价值发现。 核心理念:无需手动逐个操作工具。让 AI 端到端编排工作流。 ## 主要特性 - 即插即用:15+ 工具,支持自动化配置 - AI 驱动工作流:Skill + 终端执行 - Token 优化:输出过滤和文件优先策略 - AD 覆盖:BloodHound + impacket + Responder 链式攻击 - 多客户端支持:Cursor、Claude Desktop、VS Code/Cline ## 工具矩阵 ### 网络 - gogo:快速资产发现 - fscan:全面的主机/服务扫描 ### Web - httpx:HTTP 探测和指纹识别 - nuclei:基于模板的漏洞验证 - ffuf:目录和参数模糊测试 ### Active Directory - SharpHound / bloodhound-python - impacket (GetNPUsers, GetUserSPNs, secretsdump, ntlmrelayx 等) - pywerview, ldapdomaindump ### 横向移动 - nxc (NetExec) - impacket-wmiexec - impacket-psexec ## 快速开始 ### 1. 环境要求 ``` Python 3.8+ Windows 10/11 or Linux/macOS 8GB+ RAM recommended ``` ### 2. 安装 ``` git clone https://github.com/ktol1/RedTeam-Agent.git cd RedTeam-Agent python -m venv venv # Windows PowerShell .\venv\Scripts\Activate.ps1 # Linux/macOS source venv/bin/activate python scripts/install_tools.py ``` ### 3. 启用 Skills 终端模式 无需额外的服务器设置。 ``` cd RedTeam-Agent dir .\redteam-tools ``` AI 将读取仓库 skill 和 `.github/copilot-instructions.md`,然后直接执行终端命令。 ### 4. 示例提示词 ``` First load the redteam skill, then scan 192.168.1.0/24 in terminal, write output to scan.txt, and summarize high-value findings. Use SharpHound to collect corp.local data and summarize attack paths. Set up a chisel proxy and provide upload/run commands. ``` ## AD 攻击流程 1. Recon: gogo / fscan / kerbrute / pywerview 2. Collection: SharpHound 或 bloodhound-python 3. Analysis: BloodHound GUI 或 scripts/bloodhound_analysis.py 4. Attack: Kerberoast / AS-REP Roast / secretsdump / relay 5. Lateral: nxc / wmiexec / psexec / getST ## 终端命令(技能驱动) | # | 工具 | 功能 | 命令 | |---|------|----------|---------| | 1 | gogo | 快速资产探测 | `gogo -t 100 -l hosts.txt -q -f gogo.txt` | | 2 | fscan | 网络扫描器 | `fscan -h 192.168.1.0/24 -np -silent -nocolor -o fscan.txt` | | 3 | httpx | Web 指纹识别 | `httpx -l urls.txt -sc -title -server -td -silent -o httpx.txt` | | 4 | nuclei | POC 扫描器 | `nuclei -l urls.txt -tags cve,rce -s high,critical -nc -o nuclei.txt` | | 5 | ffuf | 目录模糊测试 | `ffuf -u http://target/FUZZ -w wordlist.txt -mc 200,301,302 -s -o ffuf.txt` | | 6 | nxc | 横向移动 | `nxc smb 192.168.1.0/24 -u user -p pass --shares` | | 7 | kerbrute | Kerberos 枚举 | `kerbrute userenum -d corp.local --dc 192.168.1.10 users.txt -o valid_users.txt` | | 8 | SharpHound | 数据收集 | `SharpHound.exe -c Default -d corp.local` | | 9 | pywerview | 域枚举 | `pywerview.py get-domain-user -d corp.local --dc-ip 192.168.1.10 -u user -p pass` | | 10 | ldapdomaindump | LDAP 转储 | `ldapdomaindump ldap://192.168.1.10 -u 'corp\\user' -p 'password' -o .\\ldapdump` | | 11 | responder | LLMNR 欺骗 | `responder -I eth0 -v` | | 12 | wmiexec | WMI 执行 | `impacket-wmiexec domain/user:pass@target 'whoami'` | | 13 | psexec | 服务执行 | `impacket-psexec domain/user:pass@target cmd.exe` | | 14 | secretsdump | 凭据转储 | `impacket-secretsdump corp.local/user:pass@dc -just-dc` | | 15 | ntlmrelayx | NTLM 中继 | `impacket-ntlmrelayx -t ldap://dc --smb2support` | ## 输出优化 - 移除 ANSI 颜色 - 压缩空行 - 截断过多输出 - 大规模扫描优先采用文件输出 - 仅总结高价值发现 ## 文档 - [SKILL.md](./.github/skills/redteam/SKILL.md) - [.github/copilot-instructions.md](./.github/copilot-instructions.md) ## 贡献 欢迎提出 Issue 和 Pull Request。
MIT License - Copyright (c) 2024-2026 ktol1
标签:Active Directory, BloodHound, C2, CISA项目, Claude Desktop, CTF学习, Cursor, fscan, gogo, httpx, impacket, LLM, MCP, Model Context Protocol, NetExec, nuclei, PE 加载器, Plaso, Python, TIP, Unmanaged PE, VS Code, XXE攻击, 人工智能, 内网渗透, 域渗透, 大模型, 客户端加密, 密码管理, 工业互联网, 应用安全, 数据展示, 无后门, 模拟器, 横向移动, 用户模式Hook绕过, 电子数据取证, 红队, 编程规范, 网络安全, 自动化框架, 逆向工具, 隐私保护