mcpField
R
red-team-tools

red-team-tools

github.com/zebbern安全4.7k50 次安装2 天前更新
代码仓库

关于 red-team-tools

面向安全研究人员和漏洞赏金猎人的侦察与漏洞发现方法指南。流程涵盖子域名发现、主机与技术识别、内容及 API 枚举和漏洞扫描,并强调遵守范围与请求速率限制。

主要功能

  1. 01枚举子域名和在线主机
  2. 02识别 Web 技术栈
  3. 03发现内容与历史 URL
  4. 04测试 API 并寻找 XSS
  5. 05运行 Nuclei 漏洞扫描

适用场景

  1. 01搭建自动化侦察流程
  2. 02梳理获准目标的攻击面
  3. 03查找隐藏的 Web 与 API 端点
  4. 04整理并记录漏洞赏金发现

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/zebbern/claude-code-guide --skill red-team-tools

安装后在 Claude Code 中输入/red-team-tools确认已加载。

详细介绍

红队工具与方法论

目的

实现顶尖安全研究人员验证过的方法论和工具工作流,以高效开展侦察、漏洞发现和漏洞赏金狩猎。自动化常见任务,同时全面覆盖攻击面。

输入/前提条件

  • 目标范围定义(域名、IP 范围、应用)
  • 基于 Linux 的攻击机器(Kali、Ubuntu)
  • 漏洞赏金计划规则与范围
  • 已安装工具依赖项(Go、Python、Ruby)
  • 各类服务的 API 密钥(Shodan、Censys 等)

输出/交付物

  • 全面的子域名枚举结果
  • 活跃主机发现与技术指纹识别
  • 已识别的漏洞和攻击向量
  • 自动化侦察流水线输出
  • 用于报告的调查结果文档

核心工作流

1. 项目跟踪与信息收集

设置侦察跟踪:

# Create project structure
mkdir -p target/{recon,vulns,reports}
cd target

# Find acquisitions using Crunchbase
# Search manually for subsidiary companies

# Get ASN for targets
amass intel -org "Target Company" -src

# Alternative ASN lookup
curl -s "https://bgp.he.net/search?search=targetcompany&commit=Search"
2. 子域名枚举

全面发现子域名:

# Create wildcards file
echo "target.com" > wildcards

# Run Amass passively
amass enum -passive -d target.com -src -o amass_passive.txt

# Run Amass actively
amass enum -active -d target.com -src -o amass_active.txt

# Use Subfinder
subfinder -d target.com -silent -o subfinder.txt

# Asset discovery
cat wildcards | assetfinder --subs-only | anew domains.txt

# Alternative subdomain tools
findomain -t target.com -o

# Generate permutations with dnsgen
cat domains.txt | dnsgen - | httprobe > permuted.txt

# Combine all sources
cat amass_*.txt subfinder.txt | sort -u > all_subs.txt
3. 活跃主机发现

识别有响应的主机:

# Check which hosts are live with httprobe
cat domains.txt | httprobe -c 80 --prefer-https | anew hosts.txt

# Use httpx for more details
cat domains.txt | httpx -title -tech-detect -status-code -o live_hosts.txt

# Alternative with massdns
massdns -r resolvers.txt -t A -o S domains.txt > resolved.txt
4. 技术指纹识别

识别技术,以便实施有针对性的攻击:

# Whatweb scanning
whatweb -i hosts.txt -a 3 -v > tech_stack.txt

# Nuclei technology detection
nuclei -l hosts.txt -t technologies/ -o tech_nuclei.txt

# Wappalyzer (if available)
# Browser extension for manual review
5. 内容发现

查找隐藏的端点和文件:

# Directory bruteforce with ffuf
ffuf -ac -v -u https://target.com/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt

# Historical URLs from Wayback
waybackurls target.com | tee wayback.txt

# Find all URLs with gau
gau target.com | tee all_urls.txt

# Parameter discovery
cat all_urls.txt | grep "=" | sort -u > params.txt

# Generate custom wordlist from historical data
cat all_urls.txt | unfurl paths | sort -u > custom_wordlist.txt
6. 应用分析(Jason Haddix 方法)

热区优先级:

  1. 文件上传 - 测试注入、XXE、SSRF、Shell 上传
  2. 内容类型 - 在 Burp 中筛选 multipart 表单
  3. API - 查找隐藏方法和缺少身份验证的情况
  4. 个人资料部分 - 存储型 XSS、自定义字段
  5. 集成 - 通过第三方服务实现 SSRF
  6. 错误页面 - 非常规注入点

分析问题:

  • 应用如何传递数据?(参数、API、混合)
  • 应用在哪些地方涉及用户?(UID、UUID 端点)
  • 网站是否支持多租户或用户等级?
  • 是否有独特的威胁模型?
  • 网站如何处理 XSS/CSRF?
  • 网站过去是否有公开的漏洞分析文章/漏洞利用?
7. 自动化 XSS 狩猎
# ParamSpider for parameter extraction
python3 paramspider.py --domain target.com -o params.txt

# Filter with Gxss
cat params.txt | Gxss -p test

# Dalfox for XSS testing
cat params.txt | dalfox pipe --mining-dict params.txt -o xss_results.txt

# Alternative workflow
waybackurls target.com | grep "=" | qsreplace '"><script>alert(1)</script>' | while read url; do
    curl -s "$url" | grep -q 'alert(1)' && echo "$url"
done > potential_xss.txt
8. 漏洞扫描
# Nuclei comprehensive scan
nuclei -l hosts.txt -t ~/nuclei-templates/ -o nuclei_results.txt

# Check for common CVEs
nuclei -l hosts.txt -t cves/ -o cve_results.txt

# Web vulnerabilities
nuclei -l hosts.txt -t vulnerabilities/ -o vuln_results.txt
9. API 枚举

用于 API 模糊测试的词表:

# Enumerate API endpoints
ffuf -u https://target.com/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt

# Test API versions
ffuf -u https://target.com/api/v1/FUZZ -w api_wordlist.txt
ffuf -u https://target.com/api/v2/FUZZ -w api_wordlist.txt

# Check for hidden methods
for method in GET POST PUT DELETE PATCH; do
    curl -X $method https://target.com/api/users -v
done
10. 自动化侦察脚本
#!/bin/bash
domain=$1

if [[ -z $domain ]]; then
    echo "Usage: ./recon.sh <domain>"
    exit 1
fi

mkdir -p "$domain"

# Subdomain enumeration
echo "[*] Enumerating subdomains..."
subfinder -d "$domain" -silent > "$domain/subs.txt"

# Live host discovery
echo "[*] Finding live hosts..."
cat "$domain/subs.txt" | httpx -title -tech-detect -status-code > "$domain/live.txt"

# URL collection
echo "[*] Collecting URLs..."
cat "$domain/live.txt" | waybackurls > "$domain/urls.txt"

# Nuclei scanning
echo "[*] Running Nuclei..."
nuclei -l "$domain/live.txt" -o "$domain/nuclei.txt"

echo "[+] Recon complete!"

快速参考

必备工具
工具用途
Amass子域名枚举
Subfinder快速发现子域名
httpx/httprobe活跃主机检测
ffuf内容发现
Nuclei漏洞扫描
Burp Suite手动测试
DalfoxXSS 自动化
waybackurls历史 URL 挖掘
要检查的关键 API 端点
/api/v1/users
/api/v1/admin
/api/v1/profile
/api/users/me
/api/config
/api/debug
/api/swagger
/api/graphql
XSS 过滤器测试

<h1><img><table>
<script>
%3Cscript%3E
%253Cscript%253E
%26lt;script%26gt;

限制

  • 遵守计划的范围边界
  • 未经许可,不要在生产环境中进行 DoS 或模糊测试
  • 对请求进行速率限制,以避免被封锁
  • 某些工具可能产生误报
  • 某些工具需要 API 密钥才能充分发挥功能

示例

示例 1:快速子域名侦察
subfinder -d target.com | httpx -title | tee results.txt
示例 2:XSS 狩猎流水线
waybackurls target.com | grep "=" | qsreplace "test" | httpx -silent | dalfox pipe
示例 3:全面扫描
# Full recon chain
amass enum -d target.com | httpx | nuclei -t ~/nuclei-templates/

故障排除

问题解决方案
受到速率限制使用代理轮换,降低并发数
结果过多聚焦于特定技术栈
误报报告前手动验证调查结果
缺少子域名结合多个枚举来源
API 密钥错误检查配置文件中的密钥
找不到工具使用 go install 安装 Go 工具

评论

支持 Markdown