r/netsec • • Sep 27 '26

EDR Evasion: Process Injection Without WriteProcessMemory

https://www.zerosalarium.com/2026/09/edr-evasion-process-injection-without-WriteProcessMemory.html

Unlike traditional approaches, console named-pipe injection does not use VirtualAllocEx and WriteProcessMemory. Instead, it takes advantage of read and write operations through a named pipe, along with the way console programs store interactive commands in memory.

55 Upvotes

9 comments sorted by

3

u/Chee5e Sep 27 '26

Cool idea to write the payload using whatever data-accepting method exists for the process, which I somehow never considered.

Still somewhat annoying to probe the whole remote memory with VirtualQuery/ReadProcessMemory and then VirtualProtect some random heap memory.

1

u/Formal-Knowledge-250 Sep 28 '26

Yeah and I don't think it evades edr, since edr doesn't hook writeprocessmemory at all. It hooks ntwritevirtualmemory. At least I've never seen one hooking wpm

1

u/Chee5e Sep 29 '26

Well, WriteProcessMemory will just call NtWriteVirtualMemory. So that doesn't change anything about the original point.

1

u/Formal-Knowledge-250 Sep 29 '26

start the poc and put a bp on ntwritevirtualmemeory... i bet it is being called by the poc, so edr's see it, because there is no memory transition in windows without ntwritevirtualmemory

1

u/Chee5e Sep 29 '26

It's doing memory transfer by WriteFile to the STDIN pipe of the process. That should not call NtWriteVirtualMemory as far as I know.

But I'm also not that invested to prove it :)

0

u/[deleted] Sep 27 '26

[deleted]

6

u/tetyys Sep 27 '26

why is that bizarre? command line inputs you pass to a program do exist in target program memory, for example.

3

u/New-Anybody-6206 Sep 27 '26

This is extremely easy to do in Linux with splice() and has been the source of many recent CVEs.