Linux Script Execution from /tmp via Shell -c

Alerts when a Linux shell runs a command with -c that references a script under /tmp/.

FreeReviewedSigma · Medium · v2
Product
linux
Category
process_creation
Author
Joseliyo Sanchez, @Joseliyo_Jstnk (SigmaHQ), DRL 1.1
Published
2023-06-02
Updated
2026-07-31

What it detects

This rule flags Linux process creation where a shell binary (e.g., /bin/bash, /bin/sh, /bin/dash) is invoked with the -c option and the command line contains /tmp/. Executing scripts from writable temporary directories is commonly abused to stage and run payloads. The detection relies on process creation telemetry, matching the executed image path suffix and the command-line content for both the shell -c usage and /tmp/ path.

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. 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.