etw.go
Imports Go's unsafe packageSource names ntdll virtual-memory syscall stubs
SHA-25657808cc1c8fa45479b577c257ee70a9cda22d10c9cc7e014d394484633496d51
MaleculeH₂(DbOs)
Evidence
⋯5 lines
6 "fmt"
7 "syscall"
8 "unsafe"
9
10 "github.com/VoidSecSoftwares/voidsyscall/syscallwin"
11)
12
13func PatchETW() error {
14 handle, err := syscall.LoadLibrary("ntdll.dll")
15 if err != nil {
16 return fmt.Errorf("load ntdll: %w", err)
⋯4 lines
26:5… oldProtect uint32
27 regionSize := uintptr(64)
28 err = syscallwin.NtProtectVirtualMemory(
29 uintptr(0xffffffffffffffff),
30 (*uintptr)(unsafe.Pointer(&baseAddr)),
31 ®ionSize,
32 syscallwin.PAGE_EXECUTE_READWRITE,
⋯4 lines