Execution · Windows
curl.exe
curl (Windows)
The built-in HTTP client on modern Windows. Used to download payloads and to upload collected data to a remote server, so downloads to writable paths and uploads are worth checking.
Legitimate use
Used in scripts and by admins to fetch and post data over HTTP and other protocols.
Switches
Writes the download to a named file (-o or --output). -O lowercases to the same token and saves under the remote file name.
MediumSaves the download under its remote file name (--remote-name, the long form of -O).
MediumUploads a local file to the server, which can move data out.
HighSends data in the request body, which can carry collected data to a server.
MediumRoutes the request through a proxy.
LowSkips TLS certificate checks, which hides the destination from inspection.
MediumSilent mode, with no progress output.
InfoCommand lines to worry about
- High
Download to a user-writable path
curl downloads a file into a temp or profile folder. A common way to bring in a second stage. Check the URL and what runs next.
Detection regex
curl(\.exe)?\s+.*https?:\/\/\S+.*(-o|--output|-O)\s+\S*\\(temp|appdata|programdata|public|downloads)\\
Where it is recorded
- Security4688Process creation with the full command line, when command-line auditing is enabled.
- Sysmon1Process creation with command line, hashes and parent process.
- Sysmon3Network connection to the remote server.
- Sysmon11File created when a download is written to disk.
Community detections
21 SigmaHQ rules for curl.exe. The explainer checks every pasted command line against all of them.
- HighCurl File Upload To File Sharing Websites
Detects usage of curl to upload files to known file sharing domains, which may indicate data exfiltration.
T1567.002by Swachchhanda Shrawan Poudel (Nextron Systems)
- HighNTLM Hash Leak Via Curl NTLM Authentication
Detects the use of curl with NTLM authentication and empty credentials (-u :), which can be abused to leak the currently logged-in user's NTLMv2 challenge-response to an attacker-controlled server, enabling offline cracking or relay attacks.
T1187by Swachchhanda Shrawan Poudel (Nextron Systems)
- HighPotential Data Exfiltration Activity Via CommandLine Tools
Detects the use of various CLI utilities exfiltrating data via web requests
T1059.001by Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious Child Process Of Manage Engine ServiceDesk
Detects suspicious child processes of the "Manage Engine ServiceDesk Plus" Java web service
T1102by Florian Roth (Nextron Systems)
- HighSuspicious Curl.EXE Download
Detects a suspicious curl process start on Windows and outputs the requested document to a local file
T1105by Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious Download from Office Domain
Detects suspicious ways to download files from Microsoft domains that are used to store attachments in Emails or OneNote documents
T1105T1608by Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious File Download From File Sharing Domain Via Curl.EXE
Detects potentially suspicious file download from file sharing domains using curl.exe
by Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious File Download From IP Via Curl.EXE
Detects potentially suspicious file downloads directly from IP addresses using curl.exe
by Nasreddine Bencherchali (Nextron Systems)
- HighSuspicious Microsoft Office Child Process
Detects a suspicious process spawning from one of the Microsoft Office suite products (Word, Excel, PowerPoint, Publisher, Visio, etc.)
T1047T1204.002T1218.010by Florian Roth (Nextron Systems), Markus Neis, FPT.EagleEye Team, Vadim Khrykov, Cyb3rEng, Michael Haag, Christopher Peacock @securepeacock, @scythe_io
- HighSuspicious Microsoft OneNote Child Process
Detects suspicious child processes of the Microsoft OneNote application. This may indicate an attempt to execute malicious embedded objects from a .one file.
T1566T1566.001by Tim Rauch (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Elastic (idea)
- HighSuspicious Processes Spawned by Java.EXE
Detects suspicious processes spawned from a Java host process which could indicate a sign of exploitation (e.g. log4j)
by Andreas Hunkeler (@Karneades), Florian Roth
- HighSuspicious ShellExec_RunDLL Call Via Ordinal
Detects suspicious call to the "ShellExec_RunDLL" exported function of SHELL32.DLL through the ordinal number to launch other commands. Adversary might only use the ordinal number in order to bypass existing detection that alert on usage of ShellExec_RunDLL on CommandLine.
T1218.011by Swachchhanda Shrawan Poudel
- HighSuspicious Spool Service Child Process
Detects suspicious print spool service (spoolsv.exe) child processes.
T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)
- MediumCurl Web Request With Potential Custom User-Agent
Detects execution of "curl.exe" with a potential custom "User-Agent". Attackers can leverage this to download or exfiltrate data via "curl" to a domain that only accept specific "User-Agent" strings
by Nasreddine Bencherchali (Nextron Systems)
- MediumFile Download From IP URL Via Curl.EXE
Detects file downloads directly from IP address URL using curl.exe
by Nasreddine Bencherchali (Nextron Systems)
- MediumInsecure Proxy/DOH Transfer Via Curl.EXE
Detects execution of "curl.exe" with the "insecure" flag over proxy or DOH.
by Nasreddine Bencherchali (Nextron Systems)
- MediumInsecure Transfer Via Curl.EXE
Detects execution of "curl.exe" with the "--insecure" flag.
by X__Junior (Nextron Systems)
- MediumLocal File Read Using Curl.EXE
Detects execution of "curl.exe" with the "file://" protocol handler in order to read local files.
by Nasreddine Bencherchali (Nextron Systems)
- MediumPotential Cookies Session Hijacking
Detects execution of "curl.exe" with the "-c" flag in order to save cookie data.
by Nasreddine Bencherchali (Nextron Systems)
- MediumRemote Access Tool - ScreenConnect Potential Suspicious Remote Command Execution
Detects potentially suspicious child processes launched via the ScreenConnect client service.
T1219.002by Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), @Kostastsale
- MediumRenamed CURL.EXE Execution
Detects the execution of a renamed "CURL.exe" binary based on the PE metadata fields
T1059T1202by X__Junior (Nextron Systems)
Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.