chmod command sets the setuid or setgid bit on a file
Matches a command-line invocation of chmod (or the install utility) whose arguments request a setuid or setgid mode, which is the first half of AN0307: the moment a binary is marked to run as its owner rather than its caller. Both halves of the analytic are a correlation — chmod, then an execution where EUID differs from UID, inside a TimeWindow — and Sigma can neither join two events nor express a time window, so only the mode change is modelled and the privileged execution that follows must be pivoted to by hand. The mode list is MITRE's ChmodPattern knob, populated here with the symbolic form '+s' and the numeric special-bit modes seen most often; the FilePathScope knob is deliberately not applied, so the rule is not restricted to /tmp or /home and will also see setuid being set on system paths. It sees only chmod as a process: an installer or configuration-management module that calls the chmod(2) syscall directly, or a package manager that applies modes from package metadata, produces no execve and is invisible here. Requires an auditd rule arming the execve syscall (for example `-a always,exit -F arch=b64 -S execve`), which no mainstream distribution ships enabled, so an empty result means the syscall is not being recorded rather than that nothing happened. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0110, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Sentinel · KQL
Run this as a search.
DeviceProcessEvents| where ((FolderPath endswith "/chmod" or FolderPath endswith "/install") and (ProcessCommandLine contains "+s" or ProcessCommandLine contains "4755" or ProcessCommandLine contains "4777" or ProcessCommandLine contains "4711" or ProcessCommandLine contains "4750" or ProcessCommandLine contains "4700" or ProcessCommandLine contains "6755" or ProcessCommandLine contains "6777" or ProcessCommandLine contains "2755" or ProcessCommandLine contains "2775" or ProcessCommandLine contains "2777"))
Splunk · SPL
Run this as a search.
index=* ((Image="*/chmod" OR Image="*/install") AND (CommandLine="*+s*" OR CommandLine="*4755*" OR CommandLine="*4777*" OR CommandLine="*4711*" OR CommandLine="*4750*" OR CommandLine="*4700*" OR CommandLine="*6755*" OR CommandLine="*6777*" OR CommandLine="*2755*" OR CommandLine="*2775*" OR CommandLine="*2777*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*/chmod" OR TO_LOWER(process.executable) LIKE "*/install") AND (TO_LOWER(process.command_line) LIKE "*+s*" OR TO_LOWER(process.command_line) LIKE "*4755*" OR TO_LOWER(process.command_line) LIKE "*4777*" OR TO_LOWER(process.command_line) LIKE "*4711*" OR TO_LOWER(process.command_line) LIKE "*4750*" OR TO_LOWER(process.command_line) LIKE "*4700*" OR TO_LOWER(process.command_line) LIKE "*6755*" OR TO_LOWER(process.command_line) LIKE "*6777*" OR TO_LOWER(process.command_line) LIKE "*2755*" OR TO_LOWER(process.command_line) LIKE "*2775*" OR TO_LOWER(process.command_line) LIKE "*2777*"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,linux,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)(/chmod$|/install$)</field> <field name="CommandLine" type="pcre2">(?i)(\+s|4755|4777|4711|4750|4700|6755|6777|2755|2775|2777)</field> <description>chmod command sets the setuid or setgid bit on a file</description> <mitre> <id>T1548.001</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.