This covers the architecture of Windows keyloggers from userland hooks to kernel drivers, walking through six methods with actual code and their detection profiles. You get SetWindowsHookEx mechanics (both low-level and regular), RegisterRawInputDevices, GetAsyncKeyState polling, direct HID access, and ETW-based capture. The real value is in the IOC analysis for each approach, especially the RegisterRawInputDevices ETW telemetry that most red teamers miss. It includes window title capture for context filtering and practical stealth techniques like DNS exfiltration and sleep masking. Use this when designing implant persistence modules or analyzing malware samples to understand their capture mechanism and detection surface. The comparison table at the end is genuinely useful for threat modeling.

GitHub stars
280
last updated
May 28, 2026

Install

$ npx -y skills add hypnguyen1209/offensive-claude --skill keylogger-arch --agent claude-code

Installs into .claude/skills of the current project.

Files


name: keylogger-architecture description: Use when designing or analyzing keystroke/input capture — SetWindowsHookEx, raw input devices, ETW-based capture, kernel drivers, stealth techniques and their IOCs metadata: type: offensive phase: research kill_chain: phase: [install, actions] step: [5, 7] attck_tactics: [TA0003, TA0009] depends_on: [privesc-windows, edr-evasion] feeds_into: [red-team-ops] inputs: [target_os, edr_product] outputs: [keylogger_binary, captured_input]

Keylogger Architecture

When to Activate

  • Understanding input capture mechanisms for red team implants
  • Analyzing malware keylogging capabilities
  • EDR evasion research for input monitoring
  • Designing stealthy credential capture

Method 1: SetWindowsHookEx (WH_KEYBOARD_LL)

How It Works

// Install global low-level keyboard hook
HHOOK hHook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, hInstance, 0);

Sponsors

Details

Repository
github.com/hypnguyen1209/offensive-claude
Categories
Security, Mobile Development
License
MIT
First seen
Jun 11, 2026

More from hypnguyen1209/offensive-claude

All 25

Recommended

More Security
1hypnguyen1209 avatarwindows-boundarieshypnguyen1209/offensive-claudeOffensive security toolkit for Claude Code covering red team, exploit dev, AD attacks, EDR bypass, mobile pentest0skills.sh installs
2hypnguyen1209 avatarwindows-mitigationshypnguyen1209/offensive-claudeOffensive security toolkit for Claude Code covering red team, exploit dev, AD attacks, EDR bypass, mobile pentest0skills.sh installs
3microsoft avatarentra-agent-idmicrosoft/github-copilot-for-azureProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token e0skills.sh installs
4open-gitagent avatarcode-reviewopen-gitagent/opengapReviews code diffs and files for security vulnerabilities (OWASP Top 10), error handling, complexity, naming conventions, and performance issues. Use when the u0skills.sh installs
5telagod avatarbuilding-agent-systemstelagod/code-abyssAI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition0skills.sh installs
6telagod avatardefending-applicationstelagod/code-abyssApplication security defense knowledge for builders, not pentesters. Covers Web/API/GraphQL hardening (XSS/SQLi/SSRF/IDOR/BOLA/Mass Assignment/deserialization/u0skills.sh installs