News for hackers. Stuff that matters.
Re:Ask HN: How do you tell if something has a keylogger impl... by sapphyrus on Tuesday October 10, 2023 @10:16AM (#37832419)
If you're talking about Windows here, then you could write some code that intercepts the system calls used by common keyloggers (GetAsyncKeyState, SetWindowsHookEx with WH_KEYBOARD / WH_KEYBOARD_LL, etc) using hooking, an instrumentartion callback, or ideally a kernel-mode driver, then warns you if the game is trying to use them. Normal software should only really need to use the keyboard messages passed to its WndProc, which only receives them if it's in the foreground. So while there can be legitimate methods for a game to call them, it would be a good sign that something is fishy. This is not fool-proof though, as there are other methods to get system-wide keyboard input, but this would catch the simple ones.

There are no comments on this comment yet.