Persistence Via Sudoers Files
Detects the creation or modification of the main "/etc/sudoers" file or files within the "/etc/sudoers.d/" directory on Linux systems. Adversaries may alter sudoers configuration to execute commands with elevated privileges without supplying a password.
Sigma rule (View on GitHub)
1title: Persistence Via Sudoers Files
2id: ddb26b76-4447-4807-871f-1b035b2bfa5d
3status: test
4description: |
5 Detects the creation or modification of the main "/etc/sudoers" file or files within the "/etc/sudoers.d/" directory on Linux systems.
6 Adversaries may alter sudoers configuration to execute commands with elevated privileges without supplying a password.
7references:
8 - https://www.sudo.ws/docs/man/sudoers.man/
9 - https://github.com/h3xduck/TripleCross/blob/1f1c3e0958af8ad9f6ebe10ab442e75de33e91de/apps/deployer.sh
10author: Nasreddine Bencherchali (Nextron Systems)
11date: 2022-07-05
12modified: 2026-08-15
13tags:
14 - attack.privilege-escalation
15 - attack.persistence
16 - attack.t1548.003
17logsource:
18 product: linux
19 category: file_event
20detection:
21 selection:
22 - TargetFilename: '/etc/sudoers'
23 - TargetFilename|startswith: '/etc/sudoers.d/'
24 filter_main_dpkg:
25 Image|endswith: '/usr/bin/dpkg'
26 TargetFilename: '/etc/sudoers.d/README.dpkg-new'
27 condition: selection and not 1 of filter_main_*
28falsepositives:
29 - Legitimate sudoers changes by administrators or configuration-management tools
30level: medium
References
Related rules
- AWS IAM Backdoor Users Keys
- Unsigned .node File Loaded
- Added Credentials to Existing Application
- Office Autorun Keys Modification
- Powershell Create Scheduled Task