Abuse of Curl for Linux Ingress Tool Transfer
Detection of malicious actors using the curl utility on Linux systems to download remote scripts or binaries via common command-line flags.
This threat brief focuses on the common TTP of utilizing the legitimate curl utility on Linux environments to facilitate Ingress Tool Transfer. Attackers frequently abuse curl to bypass simple security controls by fetching malicious payloads, stagers, or secondary toolsets from remote adversary-controlled infrastructure. This activity is a hallmark of initial access, post-compromise staging, and automated malware delivery, such as XorDDos or supply chain compromises. Defenders should monitor for curl executions that utilize output-writing flags, as these are atypical for standard administrative tasks when occurring in transient or non-standard directories. Monitoring these events allows for the identification of potential stage-two payloads before they are executed.
Attack Chain
- Attacker gains limited access to a Linux endpoint.
- Attacker identifies a need to deploy additional malware or lateral movement tools.
- Attacker uses the curl command-line utility to connect to an external server.
- Attacker includes specific flags such as -O or --output to write the remote file to the local disk.
- The file is saved into a writable directory, such as /tmp or /var/tmp.
- Attacker grants execution permissions to the downloaded file using chmod.
- Attacker executes the binary or script to further compromise the environment or establish C2.
Impact
Successful abuse of curl for tool transfer enables attackers to drop payloads, establish persistent access, and expand their foothold within a Linux environment. This technique has been observed in various campaigns, including XorDDos infections and supply chain compromises. Unauthorized file transfers to local systems often serve as the bridge between initial access and full system control.
Recommendation
- Deploy the Sigma rule provided in this brief to detect suspicious curl command-line arguments.
- Baseline legitimate automated scripts that use curl to identify and suppress high-volume false positives.
- Ensure Sysmon for Linux (Event ID 1) is deployed across all Linux assets to capture process name and command-line arguments.
- Hunt for processes spawning from /tmp, /var/tmp, or /dev/shm that correlate with prior curl file-transfer activity.
Immediate actions
Deploy Sigma detection rule to SIEM.
Threat Hunt
Search for curl processes with -O, -sO, or --output flags in historical logs.
Data: Process creation logs
Detection coverage 1
Detect Linux Ingress Tool Transfer via Curl
mediumDetects the use of the curl command with specific flags (-O, -sO, -ksO, --output) to download remote files, a common technique for ingress tool transfer.
Detection queries are available on the platform. Get full rules →