offensive-keylogger-arch

offensive-keylogger-arch is a skill for Claude Code, Codex from Miosa-osa/OSA. It costs 68 tokens per session (3,108 once invoked), scanned A, original, Apache-2.0.

A technical guide to how keyloggers capture keyboard input on Windows, including user-level and kernel-level approaches. It also discusses event tracing, hiding activity, and sending captured data elsewhere.

In plain words
What is it for?
Studying keyboard input hooks, kernel drivers, event tracing, data collection, exfiltration, and detection-evasion design in authorized malware research.
Why use it?
It helps security researchers understand how input-capture malware is built and how endpoint detection tools may identify or miss it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Studying keyboard input hooks, kernel drivers, event tracing, data collection, exfiltration, and detection-evasion design in authorized malware research.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miosa-osa/osa/offensive-keylogger-arch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Miosa-osa/OSA --skill offensive-keylogger-arch
Clone the repo
git clone --depth 1 https://github.com/Miosa-osa/OSA

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for offensive-keylogger-arch

README.md
[![agentmods](https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-keylogger-arch/github.svg)](https://agentmods.dev/skills/miosa-osa/osa/offensive-keylogger-arch)
Your own site
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-keylogger-arch"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-keylogger-arch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for offensive-keylogger-arch

Your own site · 80×15
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-keylogger-arch"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-keylogger-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.03108
Opus 5.5 $0.00027 $0.01243
Sonnet 5.5 $0.00014 $0.00622
Haiku 4.5 $0.00007 $0.00311

Measured 1mo ago against content hash 19c82fce1a36, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

offensive-keylogger-arch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

priv/skills/offensive-keylogger-arch/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: Novel research

Metadata

Description

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.

Trigger Phrases

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

Full Methodology

Case study of different keylogger implementations, how to implement them and their individual IOCs.


SetWindowHookEx

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:

  1. 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
  2. Decide whether the hook procedure must live in the target process
    • Low-level hooks (WH_KEYBOARD_LL, WH_MOUSE_LL)
      – NO injection.
      – The system leaves the hook DLL in the original caller’s address space and simply delivers the event to that process via an internal WM_* message posted to its hidden “ghost” window .
    • All other global hooks (WH_KEYBOARD, WH_CBT, WH_GETMESSAGE, …)
      – YES injection required.
      – For every process that satisfies the filter (same desktop, matching bitness),
      • In/before Vista: 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.
      • After Vista: The target process is added to a pending-load list inside 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.

Read the full file on GitHub · 230 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 230 lines · 68 tokens per session scan A 19c82fce1a36

Subscribe to this mod's changes

offensive-keylogger-arch is a skill published in the GitHub repository Miosa-osa/OSA (78 stars, last pushed 11d ago), licensed Apache-2.0. It adds 68 tokens to every session and 3,108 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-14.