Linux Wget Writing Files Under /tmp or /var/tmp
Alerts when wget creates files under /tmp or /var/tmp on Linux.
FreeReviewedSigma · Medium · v3
- Product
- linux
- Category
- file_event
- Author
- Joseliyo Sanchez, @Joseliyo_Jstnk (SigmaHQ), DRL 1.1
- Published
- 2023-06-02
- Updated
- 2026-07-31
ATT&CK techniques
C2Recon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
Exfiltration
Impact
What it detects
This rule matches process activity where wget is the executable and it writes/creates files with target paths starting in /tmp/ or /var/tmp/. Downloading into temporary directories is a common attacker technique for staging payloads before execution or exfiltration. It relies on Linux file event telemetry that includes the process image path/name and the destination TargetFilename.
Reporting behind it
- blogs.jpcert.or.jphttps://blogs.jpcert.or.jp/en/2023/05/gobrat.html
- jstnk9.github.iohttps://jstnk9.github.io/jstnk9/research/GobRAT-Malware/
- virustotal.comhttps://www.virustotal.com/gui/file/60bcd645450e4c846238cf0e7226dc40c84c96eba99f6b2cffcd0ab4a391c8b3/detection
- virustotal.comhttps://www.virustotal.com/gui/file/3e44c807a25a56f4068b5b8186eee5002eed6f26d665a8b791c472ad154585d1/detection
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/linux/file_event/file_event_lnx_wget_download_file_in_tmp_dir.yml
Changelog
v3- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
linux-wget-writes-files-to-tmp-or-var-tmp-35a05c60
title: Linux Wget Writing Files Under /tmp or /var/tmp
id: 62bdd924-57ad-4c80-808d-ec7c60981208
status: test
description: This rule matches process activity where wget is the executable and it writes/creates files with target paths starting in /tmp/ or /var/tmp/. Downloading into temporary directories is a common attacker technique for staging payloads before execution or exfiltration. It relies on Linux file event telemetry that includes the process image path/name and the destination TargetFilename.
references:
- https://blogs.jpcert.or.jp/en/2023/05/gobrat.html
- https://jstnk9.github.io/jstnk9/research/GobRAT-Malware/
- https://www.virustotal.com/gui/file/60bcd645450e4c846238cf0e7226dc40c84c96eba99f6b2cffcd0ab4a391c8b3/detection
- https://www.virustotal.com/gui/file/3e44c807a25a56f4068b5b8186eee5002eed6f26d665a8b791c472ad154585d1/detection
- https://github.com/SigmaHQ/sigma/blob/master/rules/linux/file_event/file_event_lnx_wget_download_file_in_tmp_dir.yml
author: Joseliyo Sanchez, @Joseliyo_Jstnk, Huntrule Team
date: 2023-06-02
tags:
- attack.command-and-control
- attack.t1105
logsource:
product: linux
category: file_event
detection:
selection:
Image|endswith: /wget
TargetFilename|startswith:
- /tmp/
- /var/tmp/
condition: selection
falsepositives:
- Legitimate downloads of files in the tmp folder.
level: medium
license: DRL-1.1
related:
- id: 35a05c60-9012-49b6-a11f-6bab741c9f74
type: derived