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.
"""
false_positives=[
"""
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.
""",
]
from="now-9m"
index=["logs-endpoint.events.*"]
language="eql"
license="Elastic License v2"
name="Process Started from Process ID (PID) File"
note="""## 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: "SELECTf.size,f.uid,f.type,f.pathfromfilefWHEREpathlike'/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."""