VeriKQL by Kaushik Saha

T1098.004 SSH Authorized Keys

PersistencePrivilege Escalationon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0126 Detection Strategy for SSH Key Injection in Authorized Keys

AN0350 Linux

Adversary attempts to gain persistence by modifying ~/.ssh/authorized_keys via shell, text editor, echo or redirected output.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLwrite | PATH=/home/*/.ssh/authorized_keysNot mapped to Sentinel yet.
auditd:SYSCALLexecveNot mapped to Sentinel yet.

AN0351 macOS

Insertion of public keys into authorized_keys using bash/zsh or editor tools, correlated with suspicious process ancestry.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogprocess: exec + filewrite: ~/.ssh/authorized_keysNot mapped to Sentinel yet.
macos:auth~/.ssh/authorized_keysNot mapped to Sentinel yet.

AN0352 IaaS

Abuse of cloud metadata APIs or CLI to push SSH public keys to authorized_keys of virtual machines.

MITRE log sourceIn Microsoft Sentinel
gcp:auditcompute.instances.setMetadataNot mapped to Sentinel yet.

AN0353 ESXi

Direct modification of /etc/ssh/keys-<user>/authorized_keys or enabling SSH in sshd_config to support public key auth.

MITRE log sourceIn Microsoft Sentinel
esxi:shellfile write or editNot mapped to Sentinel yet.

AN0354 Network Devices

Use of command-line like `ip ssh pubkey-chain` to bind SSH keys to privileged accounts on routers or switches.

MITRE log sourceIn Microsoft Sentinel
networkdevice:cliip ssh pubkey-chainNot mapped to Sentinel yet.

Content Hub rules tagged with it (1)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1098.004 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

No SigmaHQ rule names it in their tags outright.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.