executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
re-evasion检测规避/EDR 对抗分析:AMSI/ETW 绕过、无文件、lolbin 链。 触发词:规避、evasion、AMSI、ETW、无文件、lolbin、EDR绕过
Independent GitHub snapshot · Automated classification · Original documentation governs
规避分析必须动态执行 + 内存取证:全程在沙箱内([[re-sandbox]] 强制前置,[[re-analyze/platform-tips]] 最高原则)。所有工具先验证再使用。
C:\Windows\System32\amsi.dll 与内存中的 amsi.dll 逐字节对照,函数头差异即 patch 点winget install Microsoft.Sysinternals.Procdump)procdump -accepteula -ma <pid> mem.dmp;或 [[re-memdump]](gcore/WSL)全量转储AMSITrigger(原 outflanknl 仓库已不可用,社区镜像常见,如 RythmStick/AMSITrigger);.NET 工具,解压即用AMSITrigger.exe -i test.ps1 输出逐行触发状态(Detected / Not Detected)logman query providers | findstr /i sysmon;logman query -ets 看活动会话SilkETW.exe -t user -pn Microsoft-Windows-Sysmon -ot file -p out.etl 能生成 .etlwpr -start 后 wpr -stop out.etltracerpt 解析 .etlGet-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational';Id=1} | select -First 1procmon.exe /AcceptEula /Quiet 能启动按顺序执行,每步产物(内存转储/ETL/日志/命令行走访记录)存档 sha256 + 路径([[re-ioc]] 证据链要求)。
规避手段识别(先分类再深入):
AMSI 绕过分析(内存 patch 定位):
procdump -accepteula -ma <pid> mem.dmp # 运行后取进程内存(或 gcore,见 [[re-memdump]])
# 对照: 磁盘 amsi.dll 与内存中 amsi.dll 的函数头字节
# 常见 patch: AmsiScanBuffer 入口改为直接返回 0x80070057("AMSI 已初始化"假成功)
# 或 EtwEventWrite 系列前几字节 patch 成 ret
dumpbin /exports)→ 内存 dump 同偏移字节对照;有差异即 patch 点ETW 禁用分析:
logman query -ets # 活动会话;与样本运行前后对比
# SilkETW 捕获: 运行样本前后各抓一段,对比事件数量/内容
# 定位: 内存中 ntdll 的 EtwEventWrite / EtwEventWriteEx 前几字节 vs 磁盘(同步骤 2 对照法)
EtwEventWrite*lolbin 链追踪(rundll32/mshta 等):
# Sysmon 事件 1(ProcessCreate)按进程树关联,重点看父进程 + 命令行
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational';Id=1} |
Select TimeCreated, @{n='Parent';e={$_.Properties[1].Value}}, @{n='Image';e={$_.Properties[3].Value}}, @{n='Cmd';e={$_.Properties[4].Value}}
cmd → rundll32.exe javascript:"..."、regsvr32.exe /s /n /u /i:http://... scrobj.dll、mshta.exe javascript:...、powershell -enc ... → 内存载荷与检测侧对齐(为什么被检测 → 规避点):