Skip to content

Siemphony is in beta and still being built. What ships today, and what does not.

Siemphony’s repertoire

Predictable lock file created under tmp or run as an execution guardrail

Siemphony@siemphonylowT1480.002unverified
AN0373 describes malware acquiring a lock on a predictable path such as /tmp/.lock123 and diverging behaviour on success or failure. This rule takes the file-access leg: an auditd PATH record naming a hidden or lock-suffixed path under /tmp, or a lock-suffixed path under /var/run, which is MITRE's `lockfile_path_regex` knob populated with the two examples the analytic itself gives. A fourth selection matches on the audit `key` field so that a watch loaded with an explicit `-k` tag (for example `mutex_lock`) still catches paths the two path patterns miss, the same defense-in-depth pattern used elsewhere in this corpus for unpredictable path spellings. AN0373's other half — correlating the lock attempt with a rapid `exit_group` or specific exit code within a short window — is not implemented. lib/sigma has no join across two auditd records and no timeframe, so this rule matches the lock-file touch alone, without knowing whether the process that touched it then exited early or ran on normally. AN0372, the Windows leg of this analytic, is not attempted. It asks for `CreateMutexW` and equivalent named-object creation, but the brief's own log sources for it are Sysmon EventID 1 (process creation) and EventID 11 (file creation) — neither of which is the shape of a mutex-creation event, and Sysmon emits no event for named kernel object creation at all. Inventing a mutex field on either source would produce a rule that renders and matches nothing. AN0374, the macOS leg, is not attempted either: its unifiedlog source has no standardised Sigma field names, and inventing them the way AN0372 would have to is the same failure mode. Prerequisite: neither /tmp nor /var/run/lock is audited by default. This needs explicit watch rules — `-w /tmp -p wa -k mutex_lock` and `-w /var/lock -p wa -k mutex_lock` (the conventional destination of the /var/run/lock symlink) — loaded before this returns any rows; without them, zero rows means the sensor is blind, not that the host is clean. `-p wa` matters for noise: adding read permission makes every process that merely checks whether a lock exists match as well. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0132, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 2 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

Splunk · SPL

Run this as a search.

index=* | where ((match(type, "(?i)^PATH$") AND match(name, "/tmp/\\.[^/]*lock[^/]*$")) OR (match(type, "(?i)^PATH$") AND match(name, "/var/(run|lock)/[^/]*lock[^/]*$")) OR match(key, "(?i)^mutex_lock$"))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,linux,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <!-- 3 rules: the Sigma condition ORs across different fields,       which one rule cannot express. Any one matching is a hit. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="type" type="pcre2">(?i)^PATH$</field>    <field name="name" type="pcre2">(?i)/tmp/\.[^/]*lock[^/]*$</field>    <description>Predictable lock file created under tmp or run as an execution guardrail (1/3)</description>    <mitre>      <id>T1480.002</id>    </mitre>  </rule>   <rule id="100001" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="type" type="pcre2">(?i)^PATH$</field>    <field name="name" type="pcre2">(?i)/var/(run|lock)/[^/]*lock[^/]*$</field>    <description>Predictable lock file created under tmp or run as an execution guardrail (2/3)</description>    <mitre>      <id>T1480.002</id>    </mitre>  </rule>   <rule id="100002" level="5">    <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. -->    <field name="key" type="pcre2">(?i)^mutex_lock$</field>    <description>Predictable lock file created under tmp or run as an execution guardrail (3/3)</description>    <mitre>      <id>T1480.002</id>    </mitre>  </rule></group>

Sentinel · KQL

Run this as a search.

Sentinel cannot express this construct. No Sentinel table is modelled for this logsource ({"product":"linux","service":"auditd"}), so there is nothing honest to query. Pick a logsource this translator maps, or write the KQL by hand. The Sigma source is on the first tab, unchanged.

Elastic · ES|QL

Run this as a search.

Elastic cannot express this construct. ES|QL RLIKE uses Lucene regexp syntax, which has no case-insensitive flag, and Sigma regexes are case-insensitive. Use |contains/|startswith/|endswith, or write the ES|QL by hand. The Sigma source is on the first tab, unchanged.

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.