Skip to content
WETNav

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.

Worst caseHigh

Switches

-o<value>also output

Writes the download to a named file (-o or --output). -O lowercases to the same token and saves under the remote file name.

Medium
--remote-name

Saves the download under its remote file name (--remote-name, the long form of -O).

Medium
-t<value>also upload-file

Uploads a local file to the server, which can move data out.

High
-d<value>also data

Sends data in the request body, which can carry collected data to a server.

Medium
-x<value>also proxy

Routes the request through a proxy.

Low
-kalso insecure

Skips TLS certificate checks, which hides the destination from inspection.

Medium
-salso silent

Silent mode, with no progress output.

Info

Command 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 regexcurl(\.exe)?\s+.*https?:\/\/\S+.*(-o|--output|-O)\s+\S*\\(temp|appdata|programdata|public|downloads)\\

    T1105

  • High

    File uploaded with curl

    curl posts or uploads a local file to a remote server. Check the destination and what was sent, as this can be data exfiltration.

    Detection regexcurl(\.exe)?\s+.*(-T|--upload-file)\s+\S+.*https?:\/\/|curl(\.exe)?\s+.*--data(-binary)?\s+@\S+.*https?:\/\/

    T1048.003T1567

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.

  • High
    Curl 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)

  • High
    NTLM 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)

  • High
    Potential Data Exfiltration Activity Via CommandLine Tools

    Detects the use of various CLI utilities exfiltrating data via web requests

    T1059.001by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Child Process Of Manage Engine ServiceDesk

    Detects suspicious child processes of the "Manage Engine ServiceDesk Plus" Java web service

    T1102by Florian Roth (Nextron Systems)

  • High
    Suspicious 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)

  • High
    Suspicious 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)

  • High
    Suspicious 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)

  • High
    Suspicious File Download From IP Via Curl.EXE

    Detects potentially suspicious file downloads directly from IP addresses using curl.exe

    by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious 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

  • High
    Suspicious 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)

  • High
    Suspicious 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

  • High
    Suspicious 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

  • High
    Suspicious Spool Service Child Process

    Detects suspicious print spool service (spoolsv.exe) child processes.

    T1203T1068by Justin C. (@endisphotic), @dreadphones (detection), Thomas Patzke (Sigma rule)

  • Medium
    Curl 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)

  • Medium
    File Download From IP URL Via Curl.EXE

    Detects file downloads directly from IP address URL using curl.exe

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Insecure Proxy/DOH Transfer Via Curl.EXE

    Detects execution of "curl.exe" with the "insecure" flag over proxy or DOH.

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Insecure Transfer Via Curl.EXE

    Detects execution of "curl.exe" with the "--insecure" flag.

    by X__Junior (Nextron Systems)

  • Medium
    Local 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)

  • Medium
    Potential Cookies Session Hijacking

    Detects execution of "curl.exe" with the "-c" flag in order to save cookie data.

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Remote 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

  • Medium
    Renamed 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.