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 source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLwrite | PATH=/home/*/.ssh/authorized_keys | Not mapped to Sentinel yet. |
auditd:SYSCALLexecve | Not 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 source | In Microsoft Sentinel |
|---|---|
macos:unifiedlogprocess: exec + filewrite: ~/.ssh/authorized_keys | Not mapped to Sentinel yet. |
macos:auth~/.ssh/authorized_keys | Not 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 source | In Microsoft Sentinel |
|---|---|
gcp:auditcompute.instances.setMetadata | Not 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 source | In Microsoft Sentinel |
|---|---|
esxi:shellfile write or edit | Not 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 source | In Microsoft Sentinel |
|---|---|
networkdevice:cliip ssh pubkey-chain | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (1)
How the Content Hub rules for T1098.004 are built: their tables, filters, joins, schedules and windows.
In Sigma rules
Mitigations
M1018User Account ManagementM1022Restrict File and Directory PermissionsM1042Disable or Remove Feature or Program
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.