File with High Entropy Created by Web Server

Last updated 5 days ago on 2026-09-07
Created 5 days ago on 2026-09-07

About

This rule detects when a web server process creates a file with high entropy, where the file extension is a web extension. This is a common indicator of an encrypted or encoded payload being uploaded.
Tags
Domain: EndpointOS: LinuxUse Case: Threat DetectionUse Case: VulnerabilityTactic: PersistenceTactic: Initial AccessTactic: Lateral MovementData Source: Elastic DefendRule Type: Event Correlation (EQL)Language: eql
Severity
high
Risk Score
73
MITRE ATT&CK™

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

Initial Access (TA0001)(external, opens in a new tab or window)

Lateral Movement (TA0008)(external, opens in a new tab or window)

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

Definition

Rule Type
Event Correlation Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-endpoint.events.file*
Related Integrations

endpoint(external, opens in a new tab or window)

Query
text code block:
file where host.os.type == "linux" and event.action != "deletion" and /* Entropy threshold chosen to flag likely encoded/encrypted payload uploads while limiting false positives. */ file.Ext.entropy >= 6.0 and ( process.name in ( "nginx", "apache2", "httpd", "caddy", "lighttpd", "httpd.worker", "httpd-worker", "httpd-prefork", "php-cgi", "php-fcgi", "php-cgi.cagefs", "frankenphp", "lshttpd", "litespeed", "openlitespeed", "fcgiwrap", "uwsgi", "daphne", "uvicorn", "hypercorn", "granian", "waitress-serve", "flask", "puma", "unicorn", "unicorn_rails", "thin", "rackup", "mongrel_rails", "starman", "plackup", "twiggy", "hypnotoad", "starlet", "unitd", "unitd-debug" ) or process.name like ("php-fpm*", "lsphp*", "gunicorn*", "*.cgi", "*.fcgi") ) and file.extension in~ ( "php", "phtml", "pht", "php3", "php4", "php5", "php7", "phar", "asp", "aspx", "ashx", "asmx", "ascx", "cshtml", "razor", "jsp", "jspx", "jsx", "jspf", "tag", "tagx", "war", "ear", "js", "mjs", "cjs", "ts", "mts", "cts", "tsx", "py", "wsgi", "cgi", "fcgi", "pyc", "erb", "ru", "psgi", "lua", "luac", "sh", "elf", "bin" )

Install detection rules in Elastic Security

Detect File with High Entropy Created by Web Server 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(external, opens in a new tab or window).