Linux Shell Script Creation in /etc/profile.d/ for Persistence

Alerts on creation of .sh/.csh scripts in /etc/profile.d, a common place for persistence via shell startup.

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

What it detects

This rule flags file creation events where the target path includes /etc/profile.d/ and the created filename ends with .sh or .csh. Writing scripts into profile.d can enable persistent execution when shells initialize, which attackers may use to maintain footholds across sessions. The detection relies on Linux file event telemetry that records the created target filename/path.

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.