About me: https://xitter.cf/t.co/rMRTHfHkLh Software: https://xitter.cf/t.co/LC4pX87GAC Source code: https://xitter.cf/t.co/3OQbob0YQW

Joined July 2016
Introducing Windhawk, the customization marketplace for Windows programs! Windhawk is a platform for developing and sharing mods (customization modules) for Windows. Each mod is a C++ snippet which is injected into other programs. ramensoftware.com/windhawk windhawk.net/
38
44
4
262
NtDoc features integration with Gabriela Cristei’s Benowin Blanc project! It is now possible to inspect the following directly within the NtDoc tab: • Struct layouts and field offsets • Enum values and constants • #​define macros • Function declarations with ABI breakdowns
1
4
26
3,896
Mystery: The Opera UI process (not sandboxed) is unable to call SendInput, which fails with ERROR_ACCESS_DENIED. The error is returned in win32kfull!xxxInternalKeyEventDirect: RtlAreAllAccessesGranted(thread_info->amdesk, DESKTOP_JOURNALPLAYBACK) Any idea what mitigation is that?
1
8
2,780
Check out the KUSER_SHARED_DATA docs that were submitted to NtDoc by @sixtyvividtails, and are probably the most comprehensive source of information about this struct known to humanity. ntdoc.m417z.com/kuser_shared… Also featured on @pagedout_zine, issue #7, page 33, check it out!
1
23
88
13,543
Quiz: What will happen when this program is run with these gflags?
2
14
3,707
NtDoc has been updated with definitions from the official Windows Driver Kit DDI reference and portions of the Win32 API reference. This update reduces the need to switch between NtDoc and Microsoft Docs, addressing one of the most common suggestions. ntdoc.m417z.com/
2
21
2
88
10,603
NtDoc has been updated with definitions and documentation from the official Windows Driver Kit DDI reference and portions of the Win32 API reference. This update reduces the need to switch between NtDoc and Microsoft Docs, addressing one of the most common suggestions for NtDoc.
It's common knowledge that the best source for Windows native API definitions is the collection of System Informer (formerly Process Hacker) phnt headers. Surprisingly, there were no online docs for them, so I created a simple website: ntdoc.m417z.com/
2
15
2,956
Another gap with waiting for all threads is that by having my extra thread exit last, it determines the process exit code, which would otherwise be determined by the last thread. This may have side effects, and I can't think of a simple way for the extra thread to fake it.
Replying to @m417z
Generally impossible without OS support for "weak threads", because you might be not the only interloper. Two rogue threads would support each other indefinitely. O/w you could enum threads (e.g. NtGetNextThread) and wait on the first 0x40 of them, WaitAll. Done? -> Enum again.
1
4
2,200
Problem: I create a thread in a program and wait for events. Usually, a program exits with ExitProcess. But in rare cases, ExitThread is called, explicitly or by returning from the native entry point. What's the best way to detect that and exit? i.e. I want a "weak thread".
5
11
6,689
Quiz: Paste this command in Win+R and run it, what will happen? gist.github.com/m417z/4ba3bb… I was debugging some batch script which cleans up temp files. I grabbed a line, pasted it in Win+R for testing, and something unexpected happened. Luckily in a VM. WTF Microsoft?
1
1
1
11
8,473
Windhawk was just updated with ARM64 support! ramensoftware.com/windhawk-v… Making it work took more than just compiling it for ARM64, as the image below illustrates, and resulted in the following side projects: • MinHook-Detours. • wow64pp-x64-arm64 (Heaven’s Gate). Info, links: ...
Introducing Windhawk, the customization marketplace for Windows programs! Windhawk is a platform for developing and sharing mods (customization modules) for Windows. Each mod is a C++ snippet which is injected into other programs. ramensoftware.com/windhawk windhawk.net/
2
5
29
5,953
... • MinHook-Detours, a hooking library with a MinHook-like API and ARM64 support, based on SlimDetours. github.com/m417z/minhook-det… • wow64pp-x64-arm64, an implementation of Heaven’s Gate for ARM64, based on the original wow64pp project by @JustasMasiulis. github.com/m417z/wow64pp-x64…
3
1,314
I had to adjust the stack walking code for ARM64. Luckily, I found an implementation in the Chromium codebase. Surely it must be solid and well-tested, right? Well, turns out that the case of a syscall returning back to user mode wasn't supported. The fix: chromium-review.googlesource…
Suppose you injected/loaded a DLL and hooked some functions. At some point you remove the hooks to unload the DLL. How can you be sure it's safe? I didn't see any hooking library or any written material that discusses this. Here's my take on the subject: github.com/m417z/thread-call…
4
1,263
Good to know I'm absolutely right, thanks ChatGPT!
3
1,159
Suppose you injected/loaded a DLL and hooked some functions. At some point you remove the hooks to unload the DLL. How can you be sure it's safe? I didn't see any hooking library or any written material that discusses this. Here's my take on the subject: github.com/m417z/thread-call…
7
42
3
170
17,813
Process initialization question: Why would console creation (specifically, NtDeviceIoControlFile in ConsoleLaunchServerProcess) dispatch pending APCs? I expected my APC to be dispatched in NtTestAlert, not earlier.
2
2
18
2,827
Michael Maltsev retweeted
Replying to @Octoberfest73
Regarding brittleness, winbindex is a godsend to actually know if the gadget is stable accross versions. I usually check a few revisions of each non-EOL version from 14393, and if it's stable at least for each win version then it's acceptable (easy to check in KUSER_SHARED_DATA)
1
1
12
1,223