Input Capture: Keylogging T1056.001

Tactics: Collection, Credential Access

Adversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to acquire credentials for new access opportunities when OS Credential Dumping efforts are not effective, and may require an adversary to intercept keystrokes on a system for a substantial period of time before credentials can be successfully captured. In order to increase the likelihood of capturing credentials quickly, an adversary may also perform actions such as clearing browser cookies to force users to reauthenticate to systems.

Events covered

3 catalog events are tagged with this technique by at least one rule.

Authoring guide

Patterns shared across the 5 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (8 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
ScriptBlockText3contains 1, in 1, match 1get-keystrokes, [windows.input.keyboard]::iskeydown([system.windows.input.key]::, callnexthookex, get-procaddress user32.dll getasynckeystate, get-procaddress user32.dll getforegroundwindow
CommandLine1contains 1-encodedcommand
EfectiveCommand1regex_match 1regexEmpire
EventData1contains 1-encodedcommand, powershell.exe, powershell_ise.exe
EventID1eq 14688
event.category1eq 1process
name1eq 1/etc/pam.d/password-auth, /etc/pam.d/system-auth
type1eq 1PATH, TTY, USER_TTY

Top indicator values (33 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
CommandLinecontains
-encodedcommand
13
EfectiveCommandregex_match
regexEmpire
1
EventDatacontains
-encodedcommand
1
EventDatacontains
powershell.exe
1
EventDatacontains
powershell_ise.exe
1
EventDatacontains
pwsh.exe
1
EventIDeq
4688
1313
ScriptBlockTextcontains
get-keystrokes
12
ScriptBlockTextcontains
get-procaddress user32.dll getasynckeystate
1
ScriptBlockTextcontains
get-procaddress user32.dll getforegroundwindow
1
ScriptBlockTextin
callnexthookex
1
ScriptBlockTextin
get-keystrokes
12
ScriptBlockTextin
getasynckeystate
1
ScriptBlockTextin
getforegroundwindow
1
ScriptBlockTextin
getkeyboardstate
1
ScriptBlockTextin
getwindowtexta
1
ScriptBlockTextin
getwindowtextw
1
ScriptBlockTextin
lowlevelkeyboardproc
1
ScriptBlockTextin
ntusergetasynckeystate
1
ScriptBlockTextin
ntusersetwindowshookex
1
ScriptBlockTextin
setwindowshookex
1
ScriptBlockTextin
setwindowshookexa
1
ScriptBlockTextin
setwindowshookexw
1
ScriptBlockTextin
wh_keyboard_ll
1
ScriptBlockTextin
wh_mouse_ll
1
ScriptBlockTextin
wm_keyboard_ll
1
ScriptBlockTextmatch
[windows.input.keyboard]::iskeydown([system.windows.input.key]::
1
event.categoryeq
process
1128
nameeq
/etc/pam.d/password-auth
1
nameeq
/etc/pam.d/system-auth
12

Exclusions (7 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
EventDatacontains
gc_service.exe
1
EventDatacontains
gc_worker.exe
1
ParentImagecontains
gc_service.exe
1
ParentImagecontains
gc_worker.exe
1
ScriptBlockTexteq
sentinelbreakpoints
1
ScriptBlockTexteq
set-psbreakpoint
1
user.ideq
S-1-5-18
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Sigma 3 rules

Elastic 1 rule

Kusto 1 rule