Sigma rule: Python WebServer Execution - Linux
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-b747f94f6ba4, updated 2025-10-17T00:00:00.000Z.
Rule
- Title
- Python WebServer Execution - Linux
- Status
- experimental
- Level
- medium
- Author
- Mohamed LAKRI
- Date
- 2025-10-17
- File
- rules/linux/process_creation/proc_creation_lnx_python_http_server_execution.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the execution of Python web servers via command line interface (CLI).
After gaining access to target systems, adversaries may use Python's built-in HTTP server modules to quickly establish a web server without requiring additional software.
This technique is commonly used in post-exploitation scenarios as it provides a simple method for transferring files between the compromised host and attacker-controlled systems.
Log source
- product
- linux
- category
- process_creation
Detection
selection_img:
- Image|endswith:
- '/python'
- '/python2'
- '/python3'
- Image|contains:
- '/python2.' # python image is always of the form ../python3.10; ../python is just a symlink
- '/python3.'
selection_module:
CommandLine|contains:
- 'http.server'
- 'SimpleHTTPServer'
condition: all of selection_*False positives (as the rule lists them)
- Testing or development activity
Tags
- attack.exfiltration
- attack.t1048.003
MITRE ATT&CK ids this rule names
References
- https://www.atomicredteam.io/atomic-red-team/atomics/T1048.003#atomic-test-8---python3-httpserver
- https://docs.python.org/3/library/http.server.html
- https://docs.python.org/2/library/simplehttpserver.html
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/process_creation/proc_creation_lnx_python_http_server_execution.yml
Sources and licences
SigmaHQ
"Python WebServer Execution - Linux" by Mohamed LAKRI (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/linux/process_creation/proc_creation_lnx_python_http_server_execution.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Python WebServer Execution - Linux",
entity page, dataset version ref-b747f94f6ba4, updated 2025-10-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/3f0f5957-04f8-4792-ad89-192b0303bde6 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 3f0f5957-04f8-4792-ad89-192b0303bde6, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.