ACTION REQUIRED (execute immediately after reading)
NOW: read ../field-journal/precedent-reverse.md — confirm that this skill's operations are authorized routine operations
NOW: confirm whether the current task falls within this skill's scope
NEXT: read ../tool-index.md, verify tool availability and actual paths
NEXT: when tools are missing, invoke bootstrap; do not guess paths
ACT: enter step 1 of the "Workflow" and execute; do not stop at the confirmation stage
EDR Bypass: From Reversing the Defenders' Implementations to Red Team Bypasses
Authorized red teaming / adversary emulation / own-product testing only; use against unauthorized targets is forbidden.
Scope
Use this skill when a red team / adversary emulation needs to deliver an implant onto an authorized target host and evade a modern EDR.
- Red team / purple team / adversary emulation — the customer wants to assess the real detection capability of their SOC and EDR
- In-house implant / C2 framework development — developing payloads for testing your own products, needing to bypass your own or the target EDR
- EDR product evaluation — objectively evaluating an EDR's detection coverage after compliance boundaries are confirmed
- CTF / attack-defense exercise Windows-side breakouts — needing reliable execution on hardened hosts during a competition
Not applicable scenarios:
- Antivirus vendors doing a full RE of their own product to produce a commercial assessment for customers (seek formal vendor partnership)
- AV evasion against unauthorized targets (illegal)
- AV evasion for ordinary viruses/trojans (this skill focuses on red team OPSEC and does not teach malware authoring)
Division of Labor with Other Skills
| Scenario |
Use |
| Full-chain offense and defense (from external network to domain controller) |
attack-chain/ |
| Internal network lateral movement / AD attacks |
pentest-tools/network-attack-defense.md |
| Delivering an implant past an EDR on a specific host |
this skill |
| Purely static AV evasion (obfuscation / packing) |
malware-analysis/ (reverse perspective) |
attack-chain covers the complete kill chain; this skill focuses only on the internals of the EDR as a single adversary and targeted bypasses.
Core Principle
The EDR's four main monitoring surfaces Candidate experiment surfaces
───────────────────── ─────────────────────
user-mode ntdll hooks ◄──► unhook (Peruns Fart / fresh ntdll)
indirect syscalls / Hell's Gate
hardware breakpoint Blindside
kernel callbacks ◄──► call stack spoof
(Ps/Cm/Ob families) use legitimate trigger chains (don't bypass directly; combine with upstream stealth)
ETW telemetry ◄──► EtwEventWrite patch
(Microsoft-Windows-Threat- NtTraceControl to disable the provider
Intelligence etc.) AmsiContext handled in sync
AMSI scanning ◄──► AmsiScanBuffer patch (mov eax,0x80070057; ret)
(amsi.dll) hardware breakpoint bypass
reflectively load a copy of amsi.dll
Every arrow above is a hypothesis to measure on one pinned product/build, not a recipe or a claim that the named change suppresses the corresponding sensor.
Key insights:
- An EDR is not a black box — the key hooks / callbacks / providers can all be reversed with IDA + windbg
- Telemetry layers must be correlated — a local unhook or AMSI result says nothing by itself about ETW, callbacks, memory scanning, or cloud/XDR outcomes
- There is no cross-product fixed order — state expected telemetry and a disproof condition for each change; derive ordering from the measured dependency graph for this build/vendor instead of assuming ETW → AMSI → unhook
- Modern EDRs have made ETW + kernel callbacks the main battleground; purely user-mode unhooking has long been insufficient
Workflow
Step 1: Identify the Target Host's EDR
# List common EDR / AV services
Get-Service | Where-Object {$_.Name -match 'CSAgent|SentinelAgent|elasticendpoint|esets|ekrn|MsMpEng|wdsvc|cyserver|sysmon|aswbidsagent'}
# List loaded minifilters
fltmc filters
# List registered kernel callbacks (needs windbg + kernel debugging / or use PChunter / DRVHV)
# !object \Callback
# !pnpcallback / Process / Thread / Image
See the top of references/hook-survey.md for the EDR fingerprint table.
Step 2: Extract the Hook Table from the EDR DLL
- Attach to a process injected with the EDR's user-mode component (any landed process)
- In windbg, dump the current
ntdll.dll .text section
- Diff it against a clean
C:\Windows\System32\ntdll.dll on disk
- The mismatches are the hook points
Or use pe-sieve directly:
pe-sieve64.exe /pid 1234 /shellc 3 /modules 3 /dir hooks_dump
Detailed methods are in references/hook-survey.md.
Step 3: Build a Bypass-Hypothesis Matrix
The table creates experiments, not portable recommendations. Every row requires a healthy sensor, a positive control, one changed variable, and a post-rollback positive control.
| Defense point |
Candidate hypothesis to prove or disprove |
| ntdll inline hook |
Does indirect syscall + dynamic SSN change this sensor's call-chain evidence? |
| ETW-TI provider |
Does an EtwEventWrite change affect the target event while provider/session health remains intact? |
| AMSI (PowerShell / .NET) |
How do an AmsiScanBuffer patch or HWBP affect AMSI and memory scanning separately? |
| kernel callback |
Is a spoofed stack/legitimate trigger still correlated by callbacks, minifilters, or WFP? |
| Sysmon ProcessCreate |
Does PPID metadata change Event ID 1 while other process-lineage evidence remains? |
Step 4: Implement One Hypothesis in the Lab Implant
Change one measured edge only, keep a byte-for-byte rollback artifact, and define the expected local and cloud observations before execution. See references/unhook-techniques.md and references/telemetry-blinding.md for candidate code skeletons; they are not build/vendor guarantees.
Step 5: Validate in a Local Sandbox
# Deploy the target EDR trial in an isolated environment (Defender is fine to start with)
# Enable Sysmon + olaf-config
sysmon64.exe -i sysmonconfig.xml
# Run the implant and check whether it trips these alert sources:
# - Defender AMSI
# - ETW-TI
# - Sysmon Event ID 1/7/8/10
# - EDR console
Build- and vendor-pinned telemetry experiments
1. Create the identity manifest
Pin OS build/KB, VBS/HVCI, target process plus ntdll/amsi hashes, EDR agent/service/driver/minifilter versions and signatures, policy ID/update time, cloud tenant/connectivity, capture-tool versions, and UTC clock source.
Get-ComputerInfo | Select WindowsVersion,OsBuildNumber,OsArchitecture
Get-CimInstance Win32_DeviceGuard | Format-List *
Get-CimInstance Win32_SystemDriver | Select Name,State,PathName,StartMode
fltmc.exe filters
netsh.exe wfp show state file=C:\lab\wfp-state.xml
logman.exe query providers > C:\lab\providers.txt
Get-MpComputerStatus | Format-List *
Get-FileHash $env:SystemRoot\System32\ntdll.dll,$env:SystemRoot\System32\amsi.dll
Export or capture the vendor console's policy revision, sensor ID, last-seen, and content/model version. A running local service does not prove healthy cloud ingestion.
2. Map every telemetry layer
| Layer |
Concrete API/structure |
Evidence required |
| User-mode hooks |
PE .text/IAT/EAT, Nt* stubs, loader notifications, stack capture |
byte diff against the same-hash disk image, hook owner, before/after stack and return semantics |
| Kernel callbacks |
PsSetCreateProcessNotifyRoutineEx, PsSetLoadImageNotifyRoutine, OB_CALLBACK_REGISTRATION, CmRegisterCallbackEx |
owner, altitude/order, observed object, pre/post data, effective token |
| Minifilter/WFP |
FLT_REGISTRATION, operation callbacks/altitude; FWPM_* state, FwpsCalloutRegister* |
file/network operation, layer/callout/filter ID, process/token, permit/block result |
| ETW/ETW-TI/AMSI |
provider GUID, EVENT_TRACE_PROPERTIES, EnableTraceEx2, keyword/level, AmsiScanBuffer |
enable state, schema, activity/process/thread correlation, loss counters, AMSI result |
| Memory scanner |
VAD/type/protection/backing, working set, thread start/stack, scan cadence |
allocate→write→protect/map→execute→sleep/wake timeline and actual scan result |
| Cloud/XDR |
sensor queue, event/alert/case ID, policy revision, ingest/detection timestamps |
local-to-cloud correlation ID and latency; “not visible yet” is not no detection |
Route callback/minifilter/WFP internals to kernel-callbacks/kernel-dev; route provider, WPP, TraceLogging, and buffer-loss engineering to windows-telemetry-etw.
3. Prove sensor health with controls
- Clean baseline: with no sensor/implant modification, execute the same harmless uniquely marked action and preserve local ETL, agent logs, network, and cloud events.
- Positive control: use a vendor-supported test alert. EICAR proves only the file-AV path, not behavior, ETW-TI, memory, or XDR. Record alert/event ID and end-to-end latency.
- Technique run: change one variable; keep input, process tree, modules, network action, and capture boundaries equal to baseline.
- Delayed verdict: follow event/correlation state until an explicit verdict or the predeclared bounded vendor SLA; record ingestion and detection latency separately.
- Rollback: restore bytes/hooks/policy/module lifecycle, verify process/driver/filter/session state, then repeat the positive control.
“Alert not observed” is usable only when positive controls before and after succeed, loss is zero or quantified, policy is unchanged, and cloud last-seen is healthy. It remains scoped to this build/vendor/policy.
4. Technique survival matrix
Each row records technique + component hash + build/vendor/policy + hypothesis + expected local event + expected cloud result + baseline + positive control + modified result + delayed verdict + rollback + residual artifacts.
Classify local block, payload failure, local-telemetry-only, cloud-telemetry-only, real-time alert, delayed alert, cross-layer correlation, unhealthy sensor, event loss, inconclusive, and no observed delta on this build/policy separately. Never flatten these states into one bypass/pass column.
5. Correlate implant lifecycle
Build a timeline for bootstrap/config -> allocate -> write -> protect/map -> thread/APC/callback -> task/module/BOF -> sleep -> wake -> reconnect -> unload/update. At each phase retain API/NT transition, memory type/protection/backing, thread start/stack, module ownership, ETW/callback/minifilter/WFP events, and cloud correlation ID.
- Route runtime/job/module ownership to
c2-implant-engineering.
- Route COFF relocations, Beacon API shims, and section cleanup to
bof-coff-development.
- Route generic loader/shellcode mechanics to
offensive-shellcode.
- Route Linux kernel, eBPF, and host work to
linux-kernel-exploitation, ebpf-offensive, and linux-host-post-exploitation.
Evidence output: identity.md, policy.json, telemetry-map.csv, controls.md, survival-matrix.csv, timeline.csv, ETL/agent/cloud exports, module hashes, and rollback verification.
Step 6: Delivery Gate
Do not leave the sandbox until controls and rollback pass. Select path, process tree/PPID, memory lifecycle, and transport from this vendor/build's survival matrix rather than assuming a “legitimate” directory or explorer.exe parent suppresses telemetry. Route the approved delivery chain to attack-chain.
Typical Scenarios
Scenario 1: Delivering a cobalt-strike-alike beacon past Defender + Sysmon
Target: Windows 11 Enterprise + Defender (cloud protection on) + Sysmon (olaf config)
Requirement: classify local and cloud observations while preserving beacon function, sensor health, and rollback
Hypotheses to test one at a time (not a portable recipe):
1. Does encrypted-at-rest shellcode alter file, memory, or cloud results?
2. For PowerShell delivery, how does an AMSI change affect AMSI versus later memory scans?
3. Does an EtwEventWrite change alter the intended provider event without event loss or sensor failure?
4. Does indirect syscall + Halo's Gate change hook/stack evidence while kernel telemetry remains?
5. Does PPID metadata change process-lineage correlation or only one displayed field?
6. Does Ekko/Foliage change sleep-memory observations across the scanner cadence?
Scenario 2: EDR Sleep Mask on an Already-Landed Low-Privilege Shell
Precondition: a medium IL shell was obtained via phishing; the EDR is watching
Risk: long dwell times make beacon signatures easy to find via memory scanning
Hypothesis set:
1. Compare the existing allocation/protection lifecycle with an explicit no-new-RWX variant
2. Instrument an Ekko candidate around WaitForSingleObjectEx/CreateTimerQueueTimer and preserve scanner events
3. Prove wake restoration and exception/unwind behavior before measuring the telemetry delta
4. Compare captured stacks before/after a stack-shaping candidate; do not assume the sensor uses RtlCaptureStackBackTrace
On-Demand Bootstrap
Tool Dependencies
| Tool |
Purpose |
Auto-installable |
| pe-sieve |
Detect hooks / injections in a process |
✓ |
| API Monitor v2 |
Dynamically observe API calls and hooks |
Semi-auto (manual download) |
| SysWhispers3 |
Generate direct / indirect syscall stubs |
✓ (git clone + python) |
| Hell's Gate POC |
Reference implementation for dynamic SSN resolution |
✓ (git clone) |
| windbg + IDA |
Statically reverse EDR DLLs / kernel callbacks |
✗ (install yourself) |
| Sysmon + olaf config |
Local validation environment |
✓ |
Bootstrap Command
powershell -NoProfile -ExecutionPolicy Bypass -File "<SKILL_ROOT>\skills\scripts\bootstrap-reverse.ps1" -Capability @('pe-sieve','syswhispers3','sysmon') -StartServices
Routing Context
New sibling routes:
- Batch A:
bof-coff-development, windows-rpc-com-attack, windows-telemetry-etw, hyper-v-offensive
- Batch B:
linux-kernel-exploitation, c2-implant-engineering, ebpf-offensive, linux-host-post-exploitation
- Windows callbacks/minifilters/WFP:
kernel-callbacks, kernel-dev; implant/BOF lifecycle: c2-implant-engineering, bof-coff-development
Upstream entry points:
reverse-engineering/ — first understand the EDR DLL / driver implementation
attack-chain/ — decide at which kill-chain stage to bring in this skill
Related siblings:
pentest-tools/network-attack-defense.md — how to coordinate this skill during intranet lateral movement
malware-analysis/ — the reverse perspective, seeing how detection teams write rules
field-journal/ — write experience back after each engagement
Downstream deliverables:
- When generating reports, cite MITRE ATT&CK T1562 (Impair Defenses), T1562.001 (Disable or Modify Tools), T1562.006 (Indicator Blocking), T1055 (Process Injection), T1027 (Obfuscated Files or Information)
Legal Boundary Statement
- Authorized red teaming / adversary emulation / own-product testing only
- Written authorization (SoW / test contract / SRC scope statement) must be obtained before operating
- Must not be used against unauthorized targets or beyond the authorized scope
- Report critical findings to the customer immediately; follow responsible disclosure
- All real target information in reports must be sanitized (IP / hostname / domain / credential placeholders)
References
- Detailed hook survey:
references/hook-survey.md
- unhook / syscall techniques:
references/unhook-techniques.md
- ETW / AMSI / anti-forensics:
references/telemetry-blinding.md
- MITRE ATT&CK T1562: https://attack.mitre.org/techniques/T1562/
Task Completion Self-Check (MUST pass before claiming completion)
1---2name: router-reverse-skill-router-edr-bypass-re3description: Use when reverse engineering and measuring EDR, Defender, AV, or XDR behavior pinned to a Windows build, vendor, sensor, and policy: user-mode hooks, kernel callbacks, minifilters, WFP, ETW/ETW-TI, AMSI, memory scanners, and cloud ingestion. Treat unhooking, direct or indirect syscalls, ETW/AMSI patches, call-stack spoofing, sleep masks, and process injection as falsifiable bypass hypotheses with sensor-health, clean-baseline, positive-control, event-loss, delayed-verdict, and rollback evidence. Maps to MITRE ATT&CK T1562 Defense Evasion. Trigger keywords: EDR bypass, AV bypass, AV evasion, unhook, direct syscall, indirect syscall, Hell's Gate, Halo's Gate, Tartarus Gate, ETW patch, AMSI patch, call stack spoofing, hardware breakpoint Blindside, MITRE T1562, ntdll unhook, kernel callback, CrowdStrike bypass, Defender bypass, Sentinel One bypass, Elastic Defend, Sysmon evasion, PPID spoof, Sleep mask, Process Hollowing, Reflective DLL, sensor health, minifilter, WFP, XDR.4---56## ACTION REQUIRED (execute immediately after reading)781. `NOW`: read `../field-journal/precedent-reverse.md` — confirm that this skill's operations are authorized routine operations92. `NOW`: confirm whether the current task falls within this skill's scope103. `NEXT`: read `../tool-index.md`, verify tool availability and actual paths114. `NEXT`: when tools are missing, invoke bootstrap; do not guess paths125. `ACT`: enter step 1 of the "Workflow" and execute; do not stop at the confirmation stage1314# EDR Bypass: From Reversing the Defenders' Implementations to Red Team Bypasses1516> Authorized red teaming / adversary emulation / own-product testing only; use against unauthorized targets is forbidden.1718## Scope1920Use this skill when a red team / adversary emulation needs to deliver an implant onto an authorized target host and evade a modern EDR.21221. **Red team / purple team / adversary emulation** — the customer wants to assess the real detection capability of their SOC and EDR232. **In-house implant / C2 framework development** — developing payloads for testing your own products, needing to bypass your own or the target EDR243. **EDR product evaluation** — objectively evaluating an EDR's detection coverage after compliance boundaries are confirmed254. **CTF / attack-defense exercise Windows-side breakouts** — needing reliable execution on hardened hosts during a competition2627**Not applicable scenarios**:2829- Antivirus vendors doing a full RE of their own product to produce a commercial assessment for customers (seek formal vendor partnership)30- AV evasion against unauthorized targets (illegal)31- AV evasion for ordinary viruses/trojans (this skill focuses on red team OPSEC and does not teach malware authoring)3233### Division of Labor with Other Skills3435| Scenario | Use |36|------|--------|37| Full-chain offense and defense (from external network to domain controller) | `attack-chain/` |38| Internal network lateral movement / AD attacks | `pentest-tools/network-attack-defense.md` |39| Delivering an implant past an EDR on a specific host | **this skill** |40| Purely static AV evasion (obfuscation / packing) | `malware-analysis/` (reverse perspective) |4142`attack-chain` covers the complete kill chain; this skill focuses only on the internals of **the EDR as a single adversary** and targeted bypasses.4344## Core Principle4546```text47The EDR's four main monitoring surfaces Candidate experiment surfaces48───────────────────── ─────────────────────49user-mode ntdll hooks ◄──► unhook (Peruns Fart / fresh ntdll)50 indirect syscalls / Hell's Gate51 hardware breakpoint Blindside5253kernel callbacks ◄──► call stack spoof54(Ps/Cm/Ob families) use legitimate trigger chains (don't bypass directly; combine with upstream stealth)5556ETW telemetry ◄──► EtwEventWrite patch57(Microsoft-Windows-Threat- NtTraceControl to disable the provider58 Intelligence etc.) AmsiContext handled in sync5960AMSI scanning ◄──► AmsiScanBuffer patch (mov eax,0x80070057; ret)61(amsi.dll) hardware breakpoint bypass62 reflectively load a copy of amsi.dll63```6465Every arrow above is a hypothesis to measure on one pinned product/build, not a recipe or a claim that the named change suppresses the corresponding sensor.6667Key insights:6869- **An EDR is not a black box** — the key hooks / callbacks / providers can all be reversed with IDA + windbg70- **Telemetry layers must be correlated** — a local unhook or AMSI result says nothing by itself about ETW, callbacks, memory scanning, or cloud/XDR outcomes71- **There is no cross-product fixed order** — state expected telemetry and a disproof condition for each change; derive ordering from the measured dependency graph for this build/vendor instead of assuming ETW → AMSI → unhook72- **Modern EDRs have made ETW + kernel callbacks the main battleground**; purely user-mode unhooking has long been insufficient7374## Workflow7576### Step 1: Identify the Target Host's EDR7778```powershell79# List common EDR / AV services80Get-Service | Where-Object {$_.Name -match 'CSAgent|SentinelAgent|elasticendpoint|esets|ekrn|MsMpEng|wdsvc|cyserver|sysmon|aswbidsagent'}8182# List loaded minifilters83fltmc filters8485# List registered kernel callbacks (needs windbg + kernel debugging / or use PChunter / DRVHV)86# !object \Callback87# !pnpcallback / Process / Thread / Image88```8990See the top of `references/hook-survey.md` for the EDR fingerprint table.9192### Step 2: Extract the Hook Table from the EDR DLL93941. Attach to a process injected with the EDR's user-mode component (any landed process)952. In windbg, dump the current `ntdll.dll` `.text` section963. Diff it against a clean `C:\Windows\System32\ntdll.dll` on disk974. The mismatches are the hook points9899Or use `pe-sieve` directly:100101```powershell102pe-sieve64.exe /pid 1234 /shellc 3 /modules 3 /dir hooks_dump103```104105Detailed methods are in `references/hook-survey.md`.106107### Step 3: Build a Bypass-Hypothesis Matrix108109The table creates experiments, not portable recommendations. Every row requires a healthy sensor, a positive control, one changed variable, and a post-rollback positive control.110111| Defense point | Candidate hypothesis to prove or disprove |112|--------|---------|113| ntdll inline hook | Does indirect syscall + dynamic SSN change this sensor's call-chain evidence? |114| ETW-TI provider | Does an `EtwEventWrite` change affect the target event while provider/session health remains intact? |115| AMSI (PowerShell / .NET) | How do an `AmsiScanBuffer` patch or HWBP affect AMSI and memory scanning separately? |116| kernel callback | Is a spoofed stack/legitimate trigger still correlated by callbacks, minifilters, or WFP? |117| Sysmon ProcessCreate | Does PPID metadata change Event ID 1 while other process-lineage evidence remains? |118119### Step 4: Implement One Hypothesis in the Lab Implant120121Change one measured edge only, keep a byte-for-byte rollback artifact, and define the expected local and cloud observations before execution. See `references/unhook-techniques.md` and `references/telemetry-blinding.md` for candidate code skeletons; they are not build/vendor guarantees.122123### Step 5: Validate in a Local Sandbox124125```powershell126# Deploy the target EDR trial in an isolated environment (Defender is fine to start with)127# Enable Sysmon + olaf-config128sysmon64.exe -i sysmonconfig.xml129130# Run the implant and check whether it trips these alert sources:131# - Defender AMSI132# - ETW-TI133# - Sysmon Event ID 1/7/8/10134# - EDR console135```136137## Build- and vendor-pinned telemetry experiments138139### 1. Create the identity manifest140141Pin OS build/KB, VBS/HVCI, target process plus `ntdll`/`amsi` hashes, EDR agent/service/driver/minifilter versions and signatures, policy ID/update time, cloud tenant/connectivity, capture-tool versions, and UTC clock source.142143```powershell144Get-ComputerInfo | Select WindowsVersion,OsBuildNumber,OsArchitecture145Get-CimInstance Win32_DeviceGuard | Format-List *146Get-CimInstance Win32_SystemDriver | Select Name,State,PathName,StartMode147fltmc.exe filters148netsh.exe wfp show state file=C:\lab\wfp-state.xml149logman.exe query providers > C:\lab\providers.txt150Get-MpComputerStatus | Format-List *151Get-FileHash $env:SystemRoot\System32\ntdll.dll,$env:SystemRoot\System32\amsi.dll152```153154Export or capture the vendor console's policy revision, sensor ID, last-seen, and content/model version. A running local service does not prove healthy cloud ingestion.155156### 2. Map every telemetry layer157158| Layer | Concrete API/structure | Evidence required |159|---|---|---|160| User-mode hooks | PE `.text`/IAT/EAT, `Nt*` stubs, loader notifications, stack capture | byte diff against the same-hash disk image, hook owner, before/after stack and return semantics |161| Kernel callbacks | `PsSetCreateProcessNotifyRoutineEx`, `PsSetLoadImageNotifyRoutine`, `OB_CALLBACK_REGISTRATION`, `CmRegisterCallbackEx` | owner, altitude/order, observed object, pre/post data, effective token |162| Minifilter/WFP | `FLT_REGISTRATION`, operation callbacks/altitude; `FWPM_*` state, `FwpsCalloutRegister*` | file/network operation, layer/callout/filter ID, process/token, permit/block result |163| ETW/ETW-TI/AMSI | provider GUID, `EVENT_TRACE_PROPERTIES`, `EnableTraceEx2`, keyword/level, `AmsiScanBuffer` | enable state, schema, activity/process/thread correlation, loss counters, AMSI result |164| Memory scanner | VAD/type/protection/backing, working set, thread start/stack, scan cadence | allocate→write→protect/map→execute→sleep/wake timeline and actual scan result |165| Cloud/XDR | sensor queue, event/alert/case ID, policy revision, ingest/detection timestamps | local-to-cloud correlation ID and latency; “not visible yet” is not no detection |166167Route callback/minifilter/WFP internals to `kernel-callbacks`/`kernel-dev`; route provider, WPP, TraceLogging, and buffer-loss engineering to `windows-telemetry-etw`.168169### 3. Prove sensor health with controls1701711. **Clean baseline:** with no sensor/implant modification, execute the same harmless uniquely marked action and preserve local ETL, agent logs, network, and cloud events.1722. **Positive control:** use a vendor-supported test alert. EICAR proves only the file-AV path, not behavior, ETW-TI, memory, or XDR. Record alert/event ID and end-to-end latency.1733. **Technique run:** change one variable; keep input, process tree, modules, network action, and capture boundaries equal to baseline.1744. **Delayed verdict:** follow event/correlation state until an explicit verdict or the predeclared bounded vendor SLA; record ingestion and detection latency separately.1755. **Rollback:** restore bytes/hooks/policy/module lifecycle, verify process/driver/filter/session state, then repeat the positive control.176177“Alert not observed” is usable only when positive controls before and after succeed, loss is zero or quantified, policy is unchanged, and cloud last-seen is healthy. It remains scoped to this build/vendor/policy.178179### 4. Technique survival matrix180181Each row records `technique + component hash + build/vendor/policy + hypothesis + expected local event + expected cloud result + baseline + positive control + modified result + delayed verdict + rollback + residual artifacts`.182183Classify local block, payload failure, local-telemetry-only, cloud-telemetry-only, real-time alert, delayed alert, cross-layer correlation, unhealthy sensor, event loss, inconclusive, and no observed delta on this build/policy separately. Never flatten these states into one bypass/pass column.184185### 5. Correlate implant lifecycle186187Build a timeline for `bootstrap/config -> allocate -> write -> protect/map -> thread/APC/callback -> task/module/BOF -> sleep -> wake -> reconnect -> unload/update`. At each phase retain API/NT transition, memory type/protection/backing, thread start/stack, module ownership, ETW/callback/minifilter/WFP events, and cloud correlation ID.188189- Route runtime/job/module ownership to `c2-implant-engineering`.190- Route COFF relocations, Beacon API shims, and section cleanup to `bof-coff-development`.191- Route generic loader/shellcode mechanics to `offensive-shellcode`.192- Route Linux kernel, eBPF, and host work to `linux-kernel-exploitation`, `ebpf-offensive`, and `linux-host-post-exploitation`.193194Evidence output: `identity.md`, `policy.json`, `telemetry-map.csv`, `controls.md`, `survival-matrix.csv`, `timeline.csv`, ETL/agent/cloud exports, module hashes, and rollback verification.195196### Step 6: Delivery Gate197198Do not leave the sandbox until controls and rollback pass. Select path, process tree/PPID, memory lifecycle, and transport from this vendor/build's survival matrix rather than assuming a “legitimate” directory or `explorer.exe` parent suppresses telemetry. Route the approved delivery chain to `attack-chain`.199200## Typical Scenarios201202### Scenario 1: Delivering a cobalt-strike-alike beacon past Defender + Sysmon203204```text205Target: Windows 11 Enterprise + Defender (cloud protection on) + Sysmon (olaf config)206Requirement: classify local and cloud observations while preserving beacon function, sensor health, and rollback207208Hypotheses to test one at a time (not a portable recipe):209 1. Does encrypted-at-rest shellcode alter file, memory, or cloud results?210 2. For PowerShell delivery, how does an AMSI change affect AMSI versus later memory scans?211 3. Does an EtwEventWrite change alter the intended provider event without event loss or sensor failure?212 4. Does indirect syscall + Halo's Gate change hook/stack evidence while kernel telemetry remains?213 5. Does PPID metadata change process-lineage correlation or only one displayed field?214 6. Does Ekko/Foliage change sleep-memory observations across the scanner cadence?215```216217### Scenario 2: EDR Sleep Mask on an Already-Landed Low-Privilege Shell218219```text220Precondition: a medium IL shell was obtained via phishing; the EDR is watching221Risk: long dwell times make beacon signatures easy to find via memory scanning222223Hypothesis set:224 1. Compare the existing allocation/protection lifecycle with an explicit no-new-RWX variant225 2. Instrument an Ekko candidate around WaitForSingleObjectEx/CreateTimerQueueTimer and preserve scanner events226 3. Prove wake restoration and exception/unwind behavior before measuring the telemetry delta227 4. Compare captured stacks before/after a stack-shaping candidate; do not assume the sensor uses RtlCaptureStackBackTrace228```229230## On-Demand Bootstrap231232### Tool Dependencies233234| Tool | Purpose | Auto-installable |235|------|------|-----------|236| pe-sieve | Detect hooks / injections in a process | ✓ |237| API Monitor v2 | Dynamically observe API calls and hooks | Semi-auto (manual download) |238| SysWhispers3 | Generate direct / indirect syscall stubs | ✓ (git clone + python) |239| Hell's Gate POC | Reference implementation for dynamic SSN resolution | ✓ (git clone) |240| windbg + IDA | Statically reverse EDR DLLs / kernel callbacks | ✗ (install yourself) |241| Sysmon + olaf config | Local validation environment | ✓ |242243### Bootstrap Command244245```powershell246powershell -NoProfile -ExecutionPolicy Bypass -File "<SKILL_ROOT>\skills\scripts\bootstrap-reverse.ps1" -Capability @('pe-sieve','syswhispers3','sysmon') -StartServices247```248249## Routing Context250251**New sibling routes**:252253- Batch A: `bof-coff-development`, `windows-rpc-com-attack`, `windows-telemetry-etw`, `hyper-v-offensive`254- Batch B: `linux-kernel-exploitation`, `c2-implant-engineering`, `ebpf-offensive`, `linux-host-post-exploitation`255- Windows callbacks/minifilters/WFP: `kernel-callbacks`, `kernel-dev`; implant/BOF lifecycle: `c2-implant-engineering`, `bof-coff-development`256257**Upstream entry points**:258259- `reverse-engineering/` — first understand the EDR DLL / driver implementation260- `attack-chain/` — decide at which kill-chain stage to bring in this skill261262**Related siblings**:263264- `pentest-tools/network-attack-defense.md` — how to coordinate this skill during intranet lateral movement265- `malware-analysis/` — the reverse perspective, seeing how detection teams write rules266- `field-journal/` — write experience back after each engagement267268**Downstream deliverables**:269270- When generating reports, cite MITRE ATT&CK **T1562 (Impair Defenses)**, T1562.001 (Disable or Modify Tools), T1562.006 (Indicator Blocking), T1055 (Process Injection), T1027 (Obfuscated Files or Information)271272## Legal Boundary Statement273274- Authorized red teaming / adversary emulation / own-product testing only275- Written authorization (SoW / test contract / SRC scope statement) must be obtained before operating276- Must not be used against unauthorized targets or beyond the authorized scope277- Report critical findings to the customer immediately; follow responsible disclosure278- All real target information in reports must be sanitized (IP / hostname / domain / credential placeholders)279280## References281282- Detailed hook survey: `references/hook-survey.md`283- unhook / syscall techniques: `references/unhook-techniques.md`284- ETW / AMSI / anti-forensics: `references/telemetry-blinding.md`285- MITRE ATT&CK T1562: <https://attack.mitre.org/techniques/T1562/>286287288## Task Completion Self-Check (MUST pass before claiming completion)289290- [ ] Did I execute every step of the workflow (rather than just reading it)?291- [ ] Did I use real tool paths based on `tool-index`?292- [ ] Did I produce reproducible evidence (commands/scripts/screenshots/reports)?293- [ ] Did I complete and write back the Checklist items required by RULES?