Process Started from Process ID (PID) Fileedit

Identifies a new process starting from a process ID (PID), lock or reboot file within the temporary file storage paradigm (tmpfs) directory /var/run directory. On Linux, the PID files typically hold the process ID to track previous copies running and manage other tasks. Certain Linux malware use the /var/run directory for holding data, executables and other tasks, disguising itself or these files as legitimate PID files.

Rule type: eql

Rule indices:


Severity: high

Risk score: 73

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100



  • Elastic
  • Host
  • Linux
  • Threat Detection
  • Execution
  • BPFDoor

Version: 101 (version history)

Added (Elastic Stack release): 8.3.0

Last modified (Elastic Stack release): 8.6.0

Rule authors: Elastic

Rule license: Elastic License v2

Potential false positivesedit

False-Positives (FP) should be at a minimum with this detection as PID files are meant to hold process IDs, not inherently be executables that spawn processes.

Investigation guideedit

## Triage and analysis

### Investigating Process Started from Process ID (PID) File
Detection alerts from this rule indicate a process spawned from an executable masqueraded as a legitimate PID file which is very unusual and should not occur. Here are some possible avenues of investigation:
- Examine parent and child process relationships of the new process to determine if other processes are running.
- Examine the /var/run directory using Osquery to determine other potential PID files with unsually large file sizes, indicative of it being an executable: "SELECT f.size, f.uid, f.type, f.path from file f WHERE path like '/var/run/%%';"
- Examine the reputation of the SHA256 hash from the PID file in a database like VirusTotal to identify additional pivots and artifacts for investigation.

Rule queryedit

process where event.type == "start" and == "0" and
process.executable regex~ """/var/run/\w+\.(pid|lock|reboot)"""

Threat mappingedit


Rule version historyedit

Version 101 (8.6.0 release)
  • Formatting only
Version 100 (8.5.0 release)
  • Formatting only
Version 2 (8.4.0 release)
  • Formatting only