|
1 | 1 | title: Linux Keylogging with Pam.d
|
2 | 2 | id: 49aae26c-450e-448b-911d-b3c13d178dfc
|
3 | 3 | description: Detect attempt to enable auditing of TTY input
|
4 |
| - # -w /etc/pam.d/ -p wa -k pam - this rule will help you detect changes to the pam.d files- https://github.com/Neo23x0/auditd/blob/master/audit.rules |
5 |
| - # - the TTY events detection asumes that you do not expect them in your environment or add filtering on those users that you configured it for |
| 4 | + # -w /etc/pam.d/ -p wa -k pam - This rule will help you detect changes to the pam.d files - https://github.com/Neo23x0/auditd/blob/master/audit.rules |
| 5 | + # The TTY events detection asumes that you do not expect them in your environment or add filtering on those users that you configured it for |
6 | 6 | author: 'Pawel Mazur'
|
7 | 7 | status: experimental
|
8 | 8 | date: 2021/05/24
|
9 | 9 | references:
|
10 |
| - - https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1056.001/T1056.001.md |
11 |
| - - https://attack.mitre.org/techniques/T1003/ |
12 |
| - - https://linux.die.net/man/8/pam_tty_audit |
13 |
| - - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/sec-configuring_pam_for_auditing |
14 |
| - - https://access.redhat.com/articles/4409591#audit-record-types-2 |
| 10 | + - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1056.001/T1056.001.md |
| 11 | + - https://attack.mitre.org/techniques/T1003/ |
| 12 | + - https://linux.die.net/man/8/pam_tty_audit |
| 13 | + - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/sec-configuring_pam_for_auditing |
| 14 | + - https://access.redhat.com/articles/4409591#audit-record-types-2 |
15 | 15 | logsource:
|
16 |
| - product: linux |
17 |
| - service: auditd |
| 16 | + product: linux |
| 17 | + service: auditd |
18 | 18 | detection:
|
19 |
| - path_events: |
20 |
| - type: PATH |
21 |
| - name: |
22 |
| - - '/etc/pam.d/system-auth' |
23 |
| - - '/etc/pam.d/password-auth' |
24 |
| - tty_events: |
| 19 | + path_events: |
| 20 | + type: PATH |
| 21 | + name: |
| 22 | + - '/etc/pam.d/system-auth' |
| 23 | + - '/etc/pam.d/password-auth' |
| 24 | + tty_events: |
25 | 25 | type:
|
26 |
| - - 'TTY' |
27 |
| - - 'USER_TTY' |
28 |
| - condition: path_events or tty_events |
| 26 | + - 'TTY' |
| 27 | + - 'USER_TTY' |
| 28 | + condition: path_events or tty_events |
29 | 29 | tags:
|
30 |
| - - attack.credential_access |
31 |
| - - attack.t1003 |
32 |
| - - attack.t1056.001 |
| 30 | + - attack.credential_access |
| 31 | + - attack.t1003 |
| 32 | + - attack.t1056.001 |
33 | 33 | falsepositives:
|
34 |
| - - Administrative work |
| 34 | + - Administrative work |
35 | 35 | level: high
|
0 commit comments