Linux: Potential Data Exfiltration via Wget Utility
Attackers utilize the wget utility with post-upload flags to exfiltrate staged local data to external servers, a technique observable through process creation monitoring.
Triage facts
Revision 1- Applicability
- Linux
- Evidence
- Unknown
- Severity
- Medium
- Action
- Elevated
- Sources
- 2 public sources
- Freshness
- Revision 1Oct 23, 14:39 UTC
- Detection
- 1 rule
- Source quality
- A1Likely
Data exfiltration activity on Linux systems is often conducted by staging files in directories such as /tmp and utilizing the wget utility to push these files to remote servers via HTTP POST requests. This activity frequently originates from non-interactive shell sessions or automated tasks like cron jobs. While wget is a legitimate networking tool, the use of upload-specific flags when interacting with external web resources is highly suspicious and warrants immediate investigation.
Attack Chain
- Collection: The attacker identifies and accesses sensitive data, such as credentials, configuration files, or user archives.
- Staging: Collected files are compressed or moved to a directory, commonly /tmp, /var/tmp, or user home directories, to prepare for exfiltration.
- Execution: The attacker initiates an outbound connection using wget with POST-capable flags (e.g., --post-file, --body-file).
- Exfiltration: Data is transmitted via HTTP/HTTPS to an external command-and-control server.
Impact
Unauthorized exfiltration of sensitive information, including credentials, source code, and customer data, potentially leading to long-term persistence, further network compromise, or data exposure.
Recommendation
- Deploy detection rules to identify suspicious execution of wget with file-upload arguments.
- Audit cron jobs, systemd services, and scheduled tasks to identify unauthorized scripts containing wget upload commands.
- Implement egress filtering to restrict HTTP POST requests to known, approved destinations.
- Restrict the execution of wget to only authorized users and processes via filesystem permissions or application allowlisting.
Immediate actions
Deploy the provided detection rule to monitor process executions for wget upload flags.
Threat Hunt
Search for recent command line activity containing wget and POST-related flags.
Data: Process command line history
Mitigations
Implement Egress proxy filtering for HTTP POST requests.
Exfiltration over HTTP/HTTPS
Detection coverage 1
Detect Potential Data Exfiltration via Wget
mediumDetects the use of wget with post-upload flags or suspicious command-line piping of sensitive files to remote web endpoints.
Detection queries are available on the platform. Get full rules →