Chained shell command downloads, chmods and runs a /tmp payload
Matches a single shell invocation combining a curl/wget fetch into /tmp or /var/tmp with a chmod on the same command line — the compressed, single-event form of AN0993's "curl/wget commands saving executable/script payloads to /tmp... followed by execution," and the closest thing to an injected-content delivery observable this brief supports on Linux. The Windows leg (AN0992: browser drops a file or spawns a script host) is not authored here, because it is mechanically the same lineage already published for T1189 (browser writes executable content outside its download folder), T1203 and T1204 (client application spawns a scripting host), and repeating it would add no new coverage. This rule cannot see the network leg either — nothing in the command line distinguishes a payload that arrived because traffic was injected from one fetched from ordinary adversary infrastructure — and it needs an auditd rule arming the execve syscall (for example `-a always,exit -F arch=b64 -S execve`), absent from a default install on every mainstream distribution, or the rule returns nothing and the silence means the syscall is not being recorded. It is also blind to the same sequence run as separate commands: fetch, chmod and execution have to share one command line, so a script or automation that issues them as three process creations — the ordinary shape outside an interactive one-liner — matches nothing here, and Sigma has no construct to join those events. UNVERIFIED — derived from MITRE ATT&CK DET0349 and never executed against logs.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 "/sh" or FolderPath endswith "/bash" or FolderPath endswith "/dash") and (ProcessCommandLine contains "curl " or ProcessCommandLine contains "wget ")) and (ProcessCommandLine contains "/tmp/" or ProcessCommandLine contains "/var/tmp/")) and (ProcessCommandLine contains "chmod +x" or ProcessCommandLine contains "chmod 755" or ProcessCommandLine contains "chmod 777"))
Splunk · SPL
Run this as a search.
index=* ((((Image="*/sh" OR Image="*/bash" OR Image="*/dash") AND (CommandLine="*curl *" OR CommandLine="*wget *")) AND (CommandLine="*/tmp/*" OR CommandLine="*/var/tmp/*")) AND (CommandLine="*chmod +x*" OR CommandLine="*chmod 755*" OR CommandLine="*chmod 777*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((((TO_LOWER(process.executable) LIKE "*/sh" OR TO_LOWER(process.executable) LIKE "*/bash" OR TO_LOWER(process.executable) LIKE "*/dash") AND (TO_LOWER(process.command_line) LIKE "*curl *" OR TO_LOWER(process.command_line) LIKE "*wget *")) AND (TO_LOWER(process.command_line) LIKE "*/tmp/*" OR TO_LOWER(process.command_line) LIKE "*/var/tmp/*")) AND (TO_LOWER(process.command_line) LIKE "*chmod +x*" OR TO_LOWER(process.command_line) LIKE "*chmod 755*" OR TO_LOWER(process.command_line) LIKE "*chmod 777*"))
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)(/sh$|/bash$|/dash$)</field> <field name="CommandLine" type="pcre2">(?i)(curl |wget )</field> <field name="CommandLine" type="pcre2">(?i)(/tmp/|/var/tmp/)</field> <field name="CommandLine" type="pcre2">(?i)(chmod \+x|chmod 755|chmod 777)</field> <description>Chained shell command downloads, chmods and runs a /tmp payload</description> <mitre> <id>T1659</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.