Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

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 description

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

title: chmod command sets the setuid or setgid bit on a fileid: 18414288-dabb-4d7a-96fe-a1bc7e2ea65bstatus: experimentaldescription: |  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.references:  - https://attack.mitre.org/techniques/T1548/001  - https://attack.mitre.org/detectionstrategies/DET0110author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.privilege-escalation  - attack.t1548.001logsource:  category: process_creation  product: linuxdetection:  selection_tool:    Image|endswith:      - '/chmod'      - '/install'  selection_mode:    CommandLine|contains:      - '+s'      - '4755'      - '4777'      - '4711'      - '4750'      - '4700'      - '6755'      - '6777'      - '2755'      - '2775'      - '2777'  condition: selection_tool and selection_modefalsepositives:  - "Building software from source. Makefile install targets and container image builds run `install -m 4755` or `chmod 4755` on helpers that legitimately need setuid — ping, fusermount, mount helpers, pkexec-style wrappers — so any build server or CI runner compiling packages matches repeatedly, and this is the largest benign source in most estates."  - "Administrators reasserting permissions on system binaries. Restoring the setuid bit on /usr/bin/sudo, /usr/bin/passwd, /bin/ping or /usr/bin/chsh after a permission audit, a botched recursive chmod or a restore is done with exactly this command and is indistinguishable from an adversary marking a payload."  - "Setgid on shared directories. `chmod g+s /srv/projects` is the standard way to make a group-shared folder inherit its group, and it is routine on file servers and developer machines; it matches the same '+s' argument as a setuid binary."  - "Security training, CTF exercises and pentest tooling installation, which set setuid bits on purpose and will fire this rule on every run."level: medium

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.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No 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.