Skip to content

Commit 799adae

Browse files
committed
Add SSH authorized keys immutable detection
1 parent 3c0d351 commit 799adae

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: SSH Authorized Keys Made Immutable
2+
id: 93e19118-a707-468d-affb-691892eed63c
3+
status: experimental
4+
description: Detects use of the chattr utility to add immutable or append-only attributes to an SSH authorized_keys file. Threat actors may use this after planting a public key to make their persistence harder to remove.
5+
references:
6+
- https://isc.sans.edu/diary/30950
7+
- https://www.akamai.com/blog/security-research/dhpcd-cryptominer-hid-four-years
8+
- https://man7.org/linux/man-pages/man1/chattr.1.html
9+
author: Mark C (Atlas SOC Lab)
10+
date: 2026-08-14
11+
tags:
12+
- attack.defense-impairment
13+
- attack.t1222.002
14+
logsource:
15+
product: linux
16+
category: process_creation
17+
detection:
18+
selection_tool_image:
19+
Image|endswith: '/chattr'
20+
selection_tool_commandline:
21+
CommandLine|contains: 'chattr '
22+
selection_target:
23+
CommandLine|contains: '/.ssh/authorized_keys'
24+
selection_attribute_addition:
25+
CommandLine|contains:
26+
- ' +i'
27+
- ' +a'
28+
condition: 1 of selection_tool_* and selection_target and selection_attribute_addition
29+
falsepositives:
30+
- Administrators intentionally protecting approved SSH authorized_keys files
31+
- Configuration-management or hardening tools applying immutable file attributes
32+
level: medium

0 commit comments

Comments
 (0)