关于 red-team-tools
面向经授权安全评估和受控教学环境的安全测试工作流指南,涵盖侦察、漏洞发现与报告,并要求在主动操作前确认目标、授权和范围。
主要功能
- 01子域名枚举与主机发现
- 02技术指纹识别和内容发现
- 03XSS、API 与漏洞扫描流程
- 04主动操作前的授权确认门槛
- 05范围过滤与发现结果核验
适用场景
- 01规划获批目标的侦察流程
- 02检查 Web 应用与 API 的攻击面
- 03在受控环境中验证安全问题
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ sickn33/ agentic-awesome-skills --skill red-team-tools安装后在 Claude Code 中输入/red-team-tools确认已加载。
详细介绍
⚠️ 仅限授权使用 此技能仅用于教育目的或经授权的安全评估。 使用此工具前,必须获得系统所有者明确的书面许可。 滥用此工具属于违法行为,且严格禁止。
强制确认关卡 在运行任何会探测、利用、修改目标,在目标上建立持久化、从目标提取数据或尝试获取凭据的命令前:
- 请用户说明确切的目标 URL、IP、账户或资源。
- 请用户确认已获得书面授权及获准范围。
- 展示确切的命令并说明其预期影响。
- 等待用户在当前对话中明确确认。
未获确认时,只能进行只读操作,并仅提供防御性指导。优先使用沙箱、一次性 VM 或受控实验室。
仅限授权使用:仅在经授权的安全评估、防御性验证或受控教育环境中使用此技能。
红队工具与方法论
目的
实施顶尖安全研究人员验证过的方法论和工具工作流,以有效开展侦察、漏洞发现和漏洞赏金狩猎。自动执行常见任务,同时确保全面覆盖攻击面。
输入/先决条件
- 目标范围定义(域名、IP 范围、应用程序)
- 基于 Linux 的攻击机器(Kali、Ubuntu)
- 漏洞赏金计划规则和范围
- 已安装工具依赖项(Go、Python、Ruby)
- 各类服务的 API 密钥(Shodan、Censys 等)
输出/交付成果
- 全面的子域名枚举
- 活跃主机发现和技术指纹识别
- 已识别的漏洞和攻击向量
- 自动化侦察流水线输出
- 用于报告的已记录发现
范围与证据边界
收购的资产、发现的子域名、第三方集成和重定向目标不会自动纳入范围。主动探测前,应根据已批准的目标列表筛选所有发现结果。设置请求数、并发数和时间预算,并在出现不稳定情况或意外的敏感数据时停止。使用扫描器模板前应先检查;仅凭反射标记或扫描器命中,不能确认 XSS/CVE 的影响。此脚本仅供参考,且未实现范围限制:请勿未经修改就对真实目标运行。
核心工作流
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 方法)
热区优先级:
- 文件上传 - 测试注入、XXE、SSRF、Shell 上传
- 内容类型 - 在 Burp 中筛选 multipart 表单
- API - 查找隐藏方法和缺少身份验证的情况
- 个人资料区域 - 存储型 XSS、自定义字段
- 集成 - 通过第三方触发 SSRF
- 错误页面 - 特殊注入点
分析问题:
- 应用如何传递数据?(参数、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
# Review allowed methods non-destructively first; state-changing methods
# require an explicitly approved disposable test resource.
curl -X OPTIONS https://target.com/api/users -v
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 -silent > "$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 | 手动测试 |
| Dalfox | XSS 自动化 |
| 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