Re evasion

From dslsdzc/rev-skills · View interactive version

Re evasion is an AI agent skill from the GitHub repository dslsdzc/rev-skills. 检测规避/EDR 对抗分析:AMSI/ETW 绕过、无文件、lolbin 链。 触发词:规避、evasion、AMSI、ETW、无文件、lolbin、EDR绕过

How to use this skill

Skill file

检测规避与 EDR 对抗分析

何时使用 / 何时不用

工具准备

规避分析必须动态执行 + 内存取证:全程在沙箱内([[re-sandbox]] 强制前置,[[re-analyze/platform-tips]] 最高原则)。所有工具先验证再使用。

amsi.dll 内存对照 —— AMSI patch 定位主力(无独立安装包)

AMSITrigger —— 定位触发 AMSI 扫描的字符串(Outflank 出品)

ETW 监控 —— logman / SilkETW / WPR / ETWConsumer 类工具

Sysmon / procmon —— 进程链与执行行为(lolbin 链追踪)

操作步骤

按顺序执行,每步产物(内存转储/ETL/日志/命令行走访记录)存档 sha256 + 路径([[re-ioc]] 证据链要求)。

  1. 规避手段识别(先分类再深入):
  1. AMSI 绕过分析(内存 patch 定位):

```sh

procdump -accepteula -ma <pid> mem.dmp # 运行后取进程内存(或 gcore,见 [[re-memdump]])

# 对照: 磁盘 amsi.dll 与内存中 amsi.dll 的函数头字节

# 常见 patch: AmsiScanBuffer 入口改为直接返回 0x80070057("AMSI 已初始化"假成功)

# 或 EtwEventWrite 系列前几字节 patch 成 ret

```

  1. ETW 禁用分析:

```sh

logman query -ets # 活动会话;与样本运行前后对比

# SilkETW 捕获: 运行样本前后各抓一段,对比事件数量/内容

# 定位: 内存中 ntdll 的 EtwEventWrite / EtwEventWriteEx 前几字节 vs 磁盘(同步骤 2 对照法)

```

  1. lolbin 链追踪(rundll32/mshta 等):

```sh

# 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}}

```

  1. 与检测侧对齐(为什么被检测 → 规避点):

跨域联合

常见坑与陷阱

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.