File Creation in /var/log via Suspicious Process

Last updated 2 months ago on 2025-07-02
Created 5 months ago on 2025-03-11

About

This rule detects the creation of files in the /var/log/ directory via process executables located in world-writeable locations or via hidden processes. Attackers may attempt to hide their activities by creating files in the /var/log/ directory, which is commonly used for logging system events.
Tags
Domain: EndpointOS: LinuxUse Case: Threat DetectionTactic: Defense EvasionTactic: ExecutionTactic: PersistenceData Source: Elastic DefendData Source: SentinelOneData Source: Elastic EndgameLanguage: kuery
Severity
low
Risk Score
21
MITRE ATT&CK™

Defense Evasion (TA0005)(opens in a new tab or window)

Execution (TA0002)(opens in a new tab or window)

Persistence (TA0003)(opens in a new tab or window)

License
Elastic License v2(opens in a new tab or window)

Definition

Rule Type
New Terms Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.file*logs-sentinel_one_cloud_funnel.*endgame-*
Related Integrations

endpoint(opens in a new tab or window)

sentinel_one_cloud_funnel(opens in a new tab or window)

Query
event.category:file and host.os.type:linux and event.action:(creation or file_create_event or file_rename_event or rename) and
(process.executable:(/tmp/* or /var/tmp/* or /dev/shm/* or ./* or /boot/*) or process.name:.*) and
file.path:/var/log/* and not file.extension:*

Install detection rules in Elastic Security

Detect File Creation in /var/log via Suspicious Process in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).