Linux: Suspicious curl/wget Download to /tmp or /dev/shm Followed by sh -c Execution

Flags curl/wget retrieving content into /tmp or /dev/shm followed by immediate sh -c execution on Linux.

FreeReviewedSigma · High · v3
Product
linux
Category
process_creation
Author
Aayush Gupta (SigmaHQ), DRL 1.1
Published
2025-06-17
Updated
2026-07-31

ATT&CK techniques

Execution
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Persistence

  5. Priv Esc

  6. Defense Evasion

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule identifies Linux process creation where command lines include curl or wget, download content to temporary locations (/tmp or /dev/shm), and immediately invoke shell execution via "sh -c". This download-and-immediate-execute pattern is a common staging technique used to run remote payloads with minimal user interaction. It relies on process creation telemetry that provides the full CommandLine for matching curl/wget, temporary directory paths, and the subsequent shell command invocation.

Related detections9 linkedT1059.004 — drag to rearrange
Malicious Shell Execution via Foomatic-rip Print Filter through CUPS Exploit
Possible ExifTool CVE-2026-3102 Command Injection via Child Process Spawn (via process_creation)
Suspicious Bad Apples Reverse Shell via socat pty
Suspicious Axios NPM macOS Persistence Masquerading as Apple Service
Malicious Shell Payload Piped from curl to zsh
Possible Bitbucket Pre-Auth RCE via git archive exec Null-Byte Injection (CVE-2022-36804) (via webserver)
Malicious TeamTNT Docker Gatling Gun Initialization Script (via process_creation)
Suspicious Shell Spawned by PostgreSQL Server Process (via process_creation)
Malicious Remote Script Piped Directly to a Shell (via process_creation)
Linux: Suspicious curl/wget Download to /tmp or /dev/shm Followed by sh -c Execution
Pivot detection · T1059.004 · 9 related

Changelog

v3
  1. v3
    Candidate ingested via manual entry.2026-07-31
  2. v2
    Candidate ingested via manual entry.2026-07-31
  3. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.