{"id":"ddb26b76-4447-4807-871f-1b035b2bfa5d","title":"Persistence Via Sudoers.d Files","description":"Detects the creation or modification of files within the \"sudoers.d\" directory on Linux systems.\nSuch activity may indicate an attempt to establish or maintain privilege escalation by granting specific users elevated permissions.\nUnauthorized changes to sudoers files are a common technique used by attackers to persist administrative access.\n","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2022-07-05","modified":"2026-03-18","tags":["attack.privilege-escalation","attack.persistence","attack.t1548.003"],"technique_ids":["T1548.003"],"logsource":{"product":"linux","category":"file_event"},"falsepositives":["Creation of legitimate files in sudoers.d folder as part of administrator work"],"references":["https://github.com/h3xduck/TripleCross/blob/1f1c3e0958af8ad9f6ebe10ab442e75de33e91de/apps/deployer.sh"],"source_path":"rules/linux/file_event/file_event_lnx_persistence_sudoers_files.yml","source_sha256":"cdc8c75b4adbc72dcc8e1e5bb5d123fea472c4b811901aacce12e81e8bea7bc2","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/linux/file_event/file_event_lnx_persistence_sudoers_files.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Persistence Via Sudoers.d Files\nid: ddb26b76-4447-4807-871f-1b035b2bfa5d\nstatus: test\ndescription: |\n    Detects the creation or modification of files within the \"sudoers.d\" directory on Linux systems.\n    Such activity may indicate an attempt to establish or maintain privilege escalation by granting specific users elevated permissions.\n    Unauthorized changes to sudoers files are a common technique used by attackers to persist administrative access.\nreferences:\n    - https://github.com/h3xduck/TripleCross/blob/1f1c3e0958af8ad9f6ebe10ab442e75de33e91de/apps/deployer.sh\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2022-07-05\nmodified: 2026-03-18\ntags:\n    - attack.privilege-escalation\n    - attack.persistence\n    - attack.t1548.003\nlogsource:\n    product: linux\n    category: file_event\ndetection:\n    selection:\n        TargetFilename|startswith: '/etc/sudoers.d/'\n    filter_main_dpkg:\n        Image|endswith: '/usr/bin/dpkg'\n        TargetFilename: '/etc/sudoers.d/README.dpkg-new'\n    condition: selection and not 1 of filter_main_*\nfalsepositives:\n    - Creation of legitimate files in sudoers.d folder as part of administrator work\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1548.003","id":"T1548.003","name":"Sudo and Sudo Caching","page":"techniques/enterprise/T1548.003/"}],"data_path":"data/detection-rules/ddb26b76-4447-4807-871f-1b035b2bfa5d.json","kind":"sigma"}
