Agent skill / SnailSploit
### offensive-keylogger-arch
Core file
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionoffensive-keylogger-archExecute the skills CLI command in your project's root directory to begin installation:
Package manager
npx skills add https://github.com/SnailSploit/Claude-Red --skill offensive-keylogger-archFetches offensive-keylogger-arch from SnailSploit/Claude-Red and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate offensive-keylogger-arch. Access via /offensive-keylogger-archin your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Copy the command for your terminal
Package manager
npx skills add https://github.com/SnailSploit/Claude-Red --skill offensive-keylogger-archWorks with
Low-level keylogger architecture design: kernel driver hooks (WH_KEYBOARD_LL, SetWindowsHookEx), ETW-based input capture, user-mode vs kernel-mode approaches, stealth techniques, and data exfiltration. Use for understanding input capture mechanisms, EDR evasion research, or malware architecture analysis.
Use this skill when the conversation involves any of:
keylogger, keyboard hook, WH_KEYBOARD_LL, SetWindowsHookEx, ETW, kernel driver, input capture, low-level keylogger, malware architecture, stealth, exfiltration
When this skill is active:
Case study of different keylogger implementations, how to implement them and their individual IOCs.
Majority of malware uses user32.dll!SetWindowHookEx to create a global hook event. this modifies an internal structure in win32k.sys.
Internally, SetWindowsHookEx is just a user-mode wrapper around NtUserSetWindowsHookEx (which itself wraps around zzzzNtUserSetWindowsHookEx) in win32k.sys. What happens after you call it depends on the hook type you request but the sequence is always the same four steps:
Validate and allocate a hook record
win32k.sys creates an internal HOOK structure, fills in the filter type, module handle, thread/desktop IDs, and inserts the structure at the head of the global hook chain for that type
Decide whether the hook procedure must live in the target process
WH_KEYBOARD_LL, WH_MOUSE_LL)WM_* message posted to its hidden “ghost” window .WH_KEYBOARD, WH_CBT, WH_GETMESSAGE, …)win32k queues an asynchronous load request to csrss.exe, which in turn calls LoadLibraryEx inside the target process, mapping the hook DLL and fixing up its entry point.win32k; the first user-mode exit from kernel to that process takes the APC and calls LdrLoadDll directly.
– The first time the target thread is about to return to user mode, the kernel APCs the loader, so the DLL’s DllMain runs in the context of the victim process.Event routing at runtime
When the monitored event occurs (key press, window activation, etc.), win32k walks the hook chain inside the thread that owns the input queue.
KBDLLHOOKSTRUCT / MSLLHOOKSTRUCT) into an internal message and posts it to the installing thread’s message queue.Mandatory CallNextHookEx
Each hook handler must call CallNextHookEx to pass control down the chain.
Internally, CallNextHookEx is just a call back into win32k, which continues the chain walk; if any handler fails to call it, the chain is broken and subsequent handlers never run. This might break input for the whole session.
WriteProcessMemory or CreateRemoteThread, but they leave a mapped DLL behind in every hooked process. Easy VAD artefact for EDRs.
Same as above but you're directly calling the lower-level function. Same IOCs, really. You're only bypassing potential hooks in user32.dll. The full logic of these functions could be reimplemented fully without a jump to external modules but it has too much IOCs and is too complex to implement to really be interesting.
Session boundary: raw-input registration is per-session, not per-desktop.
A service in session-0 cannot register for keyboard raw-input and expect to see session-1 keystrokes – the HID packets are routed to the session that owns the target HWND.
(You can open the physical keyboard device object directly and parse HID, but that is a completely different attack surface – needs admin, bypasses win32k.)
tells the window manager to deliver raw HID packets to one specific HWND (or to the thread whose queue the window is attached to)
Practical abuse scenario
PeekMessage / GetMessage loop.HWND_MESSAGE).RIDEV_INPUTSINK – > this routes all keyboard traffic to our window even when it is not in the foreground .WM_INPUT handler call GetRawInputData and log the RAWKEYBOARD payload.Because no hook is installed, this technique:
WinDbg’s !hook listthis still requires your process to stay alive and message-aware, and it cannot key-log from sessions it is not running in.
Kernel-mode implementation:
Win32AllocPoolWithQuotaZInitRegisterRawInputDevices(v9, a2, 0)
Calls the INTERNAL worker (see below).EtwTraceAuditApiRegisterRawInputDevicesThe internal worker modifies our process's EPROCESS structure. This makes it so that we can't re-implement this from user-mode.
ERROR_INVALID_WINDOW_HANDLE) if the thread is not connected to a desktop. Services running in session-0 with no desktop therefore cannot use this path; they must either:To filter for interesting keystrokes you may only monitor keystrokes from Chrome.exe \ firefox.exe, etc.
Different methods of doing that:
NtUserInternalGetWindowText.Win32kFull.sys.
win32u.dllReverse-engineering this was very tedious because the only references of this online seem to be:
BOOL InternalGetWindowText(HWND hwnd, LPWSTR pString, int cchMaxCount) {
DWORD retval = (DWORD)NtUserInternalGetWindowText(hwnd, pString, cchMaxCount);
if (!retval) {
*pString = (WCHAR)0;
}
return retval
}
its a syscall so you can use your favorite *gate technique on it
Now... that's all stuff that can be figured out by anyone determined for the unique research... contact me @ lovestrangekz on tg, everything has a price :]
Ideas that were abandonned:
Use NtUserBuildHwndList/EnumWindows and re-implement the z-order heuristic to generate the list of all handles to all windows and call IsWindowVisible on them and do some other stuff to figure out if they're foreground or not?
Walk _K_USER_SHARED_DATA to query its ConsoleSessionForegroundProcessId member then query the system to know that PID's windows and hope it only has one
lovestrange @ TeamKavkaz join our channel for more hackerz 4 lyfe
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
SnailSploit/Claude-Red
SnailSploit/Claude-Red
SnailSploit/Claude-Red
SnailSploit/Claude-Red
SnailSploit/Claude-Red
SnailSploit/Claude-Red
offensive-keylogger-arch is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
offensive-keylogger-arch is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in offensive-keylogger-arch — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Keeps context tight: offensive-keylogger-arch is the kind of skill you can hand to a new teammate without a long onboarding doc.
Keeps context tight: offensive-keylogger-arch is the kind of skill you can hand to a new teammate without a long onboarding doc.
Keeps context tight: offensive-keylogger-arch is the kind of skill you can hand to a new teammate without a long onboarding doc.
offensive-keylogger-arch has been reliable in day-to-day use. Documentation quality is above average for community skills.
offensive-keylogger-arch is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in offensive-keylogger-arch — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Useful defaults in offensive-keylogger-arch — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 62