Skip to content
WETNav

Execution · Windows

cmd.exe

Windows Command Processor

The classic command shell. It runs batch files and chained commands and is a very common parent for discovery and for launching other tools. Chained or encoded command lines are worth a look.

Legitimate use

Runs scripts, batch files and interactive admin commands.

Worst caseMedium

Switches

/c

Runs the command that follows and then exits. The usual way other processes launch a command.

Low
/k

Runs the command that follows and keeps the shell open.

Low
/v

Enables delayed environment variable expansion (/v:on). Used to build strings at run time, which can obscure a command.

Low
/q

Turns off command echo.

Info
/a

Writes output as ANSI.

Info
/u

Writes output as Unicode.

Info

Command lines to worry about

  • Medium

    Chained discovery commands

    Several discovery commands run in one line. Common in automated host survey scripts dropped after initial access.

    Detection regexcmd(\.exe)?\s+.*\/c\s+.*(&&|&|\|\||\|).*(whoami|net |ipconfig|systeminfo|nltest|tasklist|reg )

    T1059.003

  • Medium

    Command output redirected to a share

    Writes command output to a remote share. Seen in remote execution where results are collected over SMB.

    Detection regexcmd(\.exe)?\s+.*\/c\s+.*>\s*\\\\[^\s\\]+\\

    T1059.003

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.

Community detections

87 SigmaHQ rules for cmd.exe. The explainer checks every pasted command line against all of them.

  • Critical
    Sticky Key Like Backdoor Execution

    Detects the usage and installation of a backdoor that uses an option to register a malicious debugger for built-in tools that are accessible in the login screen

    T1546.008by Florian Roth (Nextron Systems), @twjackomo, Jonhnathan Ribeiro, oscd.community

  • Critical
    Suspicious Child Process Of Veeam Dabatase

    Detects suspicious child processes of the Veeam service process. This could indicate potential RCE or SQL Injection.

    by Nasreddine Bencherchali (Nextron Systems)

  • High
    Abused Debug Privilege by Arbitrary Parent Processes

    Detection of unusual child processes by different system processes

    T1548by Semanur Guneysu @semanurtg, oscd.community

  • High
    Change Default File Association To Executable Via Assoc

    Detects when a program changes the default file association of any extension to an executable. When a file is opened, the default program used to open the file (also called the file association or handler) is checked.

    T1546.001by Nasreddine Bencherchali (Nextron Systems)

  • High
    Copy .DMP/.DUMP Files From Remote Share Via Cmd.EXE

    Detects usage of the copy builtin cmd command to copy files with the ".dmp"/".dump" extension from a remote share

    by Nasreddine Bencherchali (Nextron Systems)

  • High
    Forfiles.EXE Child Process Masquerading

    Detects the execution of "forfiles" from a non-default location, in order to potentially spawn a custom "cmd.exe" from the current working directory.

    T1036by Nasreddine Bencherchali (Nextron Systems), Anish Bogati

  • High
    HackTool - Koadic Execution

    Detects command line parameters used by Koadic hack tool

    T1059.003T1059.005T1059.007by wagga, Jonhnathan Ribeiro, oscd.community

  • High
    HackTool - RedMimicry Winnti Playbook Execution

    Detects actions caused by the RedMimicry Winnti playbook a automated breach emulations utility

    T1106T1059.003T1218.011by Alexander Rausch

  • High
    HTML Help HH.EXE Suspicious Child Process

    Detects a suspicious child process of a Microsoft HTML Help (HH.exe)

    T1047T1059.001T1059.003T1059.005by Maxim Pavlunin, Nasreddine Bencherchali (Nextron Systems)

  • High
    LOL-Binary Copied From System Directory

    Detects a suspicious copy operation that tries to copy a known LOLBIN from system (System32, SysWOW64, WinSxS) directories to another on disk in order to bypass detections based on locations.

    T1036.003by Nasreddine Bencherchali (Nextron Systems)

  • High
    MMC Spawning Windows Shell

    Detects a Windows command line executable started from MMC

    T1021.003by Karneades, Swisscom CSIRT

  • High
    OneNote.EXE Execution of Malicious Embedded Scripts

    Detects the execution of malicious OneNote documents that contain embedded scripts. When a user clicks on a OneNote attachment and then on the malicious link inside the ".one" file, it exports and executes the malicious embedded script from specific directories.

    T1218.001by @kostastsale

  • High
    Operator Bloopers Cobalt Strike Commands

    Detects use of Cobalt Strike commands accidentally entered in the CMD shell

    T1059.003by _pete_0, TheDFIRReport

  • High
    Operator Bloopers Cobalt Strike Modules

    Detects Cobalt Strike module/commands accidentally entered in CMD shell

    T1059.003by _pete_0, TheDFIRReport

  • High
    Potential CommandLine Obfuscation Using Unicode Characters From Suspicious Image

    Detects potential commandline obfuscation using unicode characters. Adversaries may attempt to make an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit.

    T1027by frack113, Florian Roth (Nextron Systems), Josh Nickels

  • High
    Potential CommandLine Path Traversal Via Cmd.EXE

    Detects potential path traversal attempt via cmd.exe. Could indicate possible command/argument confusion/hijacking

    T1059.003by xknow @xknow_infosec, Tim Shelton

  • 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
    Potential Manage-bde.wsf Abuse To Proxy Execution

    Detects potential abuse of the "manage-bde.wsf" script as a LOLBIN to proxy execution

    T1216by oscd.community, Natalia Shornikova, Nasreddine Bencherchali (Nextron Systems)

  • High
    Potential Privilege Escalation Using Symlink Between Osk and Cmd

    Detects the creation of a symbolic link between "cmd.exe" and the accessibility on-screen keyboard binary (osk.exe) using "mklink". This technique provides an elevated command prompt to the user from the login screen without the need to log in.

    T1546.008by frack113

  • High
    Potential Process Injection Via Msra.EXE

    Detects potential process injection via Microsoft Remote Asssistance (Msra.exe) by looking at suspicious child processes spawned from the aforementioned process. It has been a target used by many threat actors and used for discovery and persistence tactics

    T1055by Alexander McDonald

  • High
    Potentially Suspicious Child Processes Spawned by ConHost

    Detects suspicious child processes related to Windows Shell utilities spawned by `conhost.exe`, which could indicate malicious activity using trusted system components.

    T1202T1218by Swachchhanda Shrawan Poudel (Nextron Systems)

  • High
    Potentially Suspicious Execution From Parent Process In Public Folder

    Detects a potentially suspicious execution of a parent process located in the "\Users\Public" folder executing a child process containing references to shell or scripting binaries and commandlines.

    T1564T1059by Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)

  • High
    Privilege Escalation via Named Pipe Impersonation

    Detects a remote file copy attempt to a hidden network share. This may indicate lateral movement or data staging activity.

    T1021by Tim Rauch, Elastic (idea)

  • High
    Remote Access Tool - ScreenConnect Server Web Shell Execution

    Detects potential web shell execution from the ScreenConnect server process.

    T1190by Jason Rathbun (Blackpoint Cyber)

  • High
    Renamed Visual Studio Code Tunnel Execution

    Detects renamed Visual Studio Code tunnel execution. Attackers can abuse this functionality to establish a C2 channel

    T1071.001T1219by Nasreddine Bencherchali (Nextron Systems)

  • High
    Sdiagnhost Calling Suspicious Child Process

    Detects sdiagnhost.exe calling a suspicious child process (e.g. used in exploits for Follina / CVE-2022-30190)

    T1036T1218by Nextron Systems, @Kostastsale

  • High
    Suspicious ArcSOC.exe Child Process

    Detects script interpreters, command-line tools, and similar suspicious child processes of ArcSOC.exe. ArcSOC.exe is the process name which hosts ArcGIS Server REST services. If an attacker compromises an ArcGIS Server system and uploads a malicious Server Object Extension (SOE), they can send crafted requests to the corresponding service endpoint and remotely execute code from the ArcSOC.exe…

    T1059T1203by Micah Babinski

  • High
    Suspicious BitLocker Access Agent Update Utility Execution

    Detects the execution of the BitLocker Access Agent Update Utility (baaupdate.exe) which is not a common parent process for other processes. Suspicious child processes spawned by baaupdate.exe could indicate an attempt at lateral movement via BitLocker DCOM & COM Hijacking.

    T1218T1021.003by andrewdanis, Swachchhanda Shrawan Poudel (Nextron Systems)

  • High
    Suspicious Child Process Of BgInfo.EXE

    Detects suspicious child processes of "BgInfo.exe" which could be a sign of potential abuse of the binary to proxy execution via external VBScript

    T1059.005T1218T1202by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Child Process of Notepad++ Updater - GUP.Exe

    Detects suspicious child process creation by the Notepad++ updater process (gup.exe). This could indicate potential exploitation of the updater component to deliver unwanted malware.

    T1195.002T1557by Swachchhanda Shrawan Poudel (Nextron Systems)

  • High
    Suspicious Child Process Of SQL Server

    Detects suspicious child processes of the SQLServer process. This could indicate potential RCE or SQL Injection.

    T1505.003T1190by FPT.EagleEye Team, wagga

  • High
    Suspicious Child Process Of Wermgr.EXE

    Detects suspicious Windows Error Reporting manager (wermgr.exe) child process

    T1055T1036by Florian Roth (Nextron Systems)

  • High
    Suspicious File Execution From Internet Hosted WebDav Share

    Detects the execution of the "net use" command to mount a WebDAV server and then immediately execute some content in it. As seen being used in malicious LNK files

    T1059.001by pH-T (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 MSHTA Child Process

    Detects a suspicious process spawning from an "mshta.exe" process, which could be indicative of a malicious HTA script execution

    T1218.005by Michael Haag

  • High
    Suspicious Outlook Child Process

    Detects a suspicious process spawning from an Outlook process.

    T1204.002by Michael Haag, Florian Roth (Nextron Systems), Markus Neis, Elastic, FPT.EagleEye Team

  • High
    Suspicious Process By Web Server Process

    Detects potentially suspicious processes being spawned by a web server process which could be the result of a successfully placed web shell or exploitation

    T1505.003T1190by Thomas Patzke, Florian Roth (Nextron Systems), Zach Stanford @svch0st, Tim Shelton, Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Processes Spawned by WinRM

    Detects suspicious processes including shells spawnd from WinRM host process

    T1190by Andreas Hunkeler (@Karneades), Markus Neis

  • High
    Suspicious Provlaunch.EXE Child Process

    Detects suspicious child processes of "provlaunch.exe" which might indicate potential abuse to proxy execution.

    T1218by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Serv-U Process Pattern

    Detects a suspicious process pattern which could be a sign of an exploited Serv-U service

    T1555by Florian Roth (Nextron Systems)

  • 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 Shells Spawn by Java Utility Keytool

    Detects suspicious shell spawn from Java utility keytool process (e.g. adselfservice plus exploitation)

    by Andreas Hunkeler (@Karneades)

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

  • High
    Suspicious WmiPrvSE Child Process

    Detects suspicious and uncommon child processes of WmiPrvSE

    T1047T1204.002T1218.010by Vadim Khrykov (ThreatIntel), Cyb3rEng, Florian Roth (Nextron Systems)

  • High
    UAC Bypass Using Windows Media Player - Process

    Detects the pattern of UAC Bypass using Windows Media Player osksupport.dll (UACMe 32)

    T1548.002by Christian Burkard (Nextron Systems)

  • High
    VMToolsd Suspicious Child Process

    Detects suspicious child process creations of VMware Tools process which may indicate persistence setup

    T1059by bohops, Bhabesh Raj

  • High
    Webshell Detection With Command Line Keywords

    Detects certain command line parameters often used during reconnaissance activity via web shells

    T1505.003T1018T1033T1087by Florian Roth (Nextron Systems), Jonhnathan Ribeiro, Anton Kutepov, oscd.community, Chad Hudson, Matt Anderson

  • Medium
    Always Install Elevated MSI Spawned Cmd And Powershell

    Detects Windows Installer service (msiexec.exe) spawning "cmd" or "powershell"

    T1548.002by Teymur Kheirkhabarov (idea), Mangatas Tondang (rule), oscd.community

  • Medium
    Cmd Launched with Hidden Start Flags to Suspicious Targets

    Detects cmd.exe executing commands with the "start" utility using "/b" (no window) or "/min" (minimized) flags. To reduce false positives from standard background tasks, detection is restricted to scenarios where the target is a known script extension or located in suspicious temporary/public directories. This technique was observed in Chaos, DarkSide, and Emotet malware campaigns.

    T1564.003by Vladan Sekulic, Swachchhanda Shrawan Poudel (Nextron Systems)

  • Medium
    Command Line Execution with Suspicious URL and AppData Strings

    Detects a suspicious command line execution that includes an URL and AppData string in the command line parameters as used by several droppers (js/vbs > powershell)

    T1059.003T1059.001T1105by Florian Roth (Nextron Systems), Jonhnathan Ribeiro, oscd.community

  • Medium
    Copy From Or To Admin Share Or Sysvol Folder

    Detects a copy command or a copy utility execution to or from an Admin share or remote

    T1039T1048T1021.002by Florian Roth (Nextron Systems), oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, Nasreddine Bencherchali

  • Medium
    Cscript/Wscript Potentially Suspicious Child Process

    Detects potentially suspicious child processes of Wscript/Cscript. These include processes such as rundll32 with uncommon exports or PowerShell spawning rundll32 or regsvr32. Malware such as Pikabot and Qakbot were seen using similar techniques as well as many others.

    by Nasreddine Bencherchali (Nextron Systems), Alejandro Houspanossian ('@lekz86')

  • Medium
    Elevated System Shell Spawned From Uncommon Parent Location

    Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges from a uncommon parent location.

    T1059by frack113, Tim Shelton (update fp)

  • Medium
    Execute Code with Pester.bat

    Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)

    T1059.001T1216by Julia Fomina, oscd.community

  • Medium
    Greedy File Deletion Using Del

    Detects execution of the "del" builtin command to remove files using greedy/wildcard expression. This is often used by malware to delete content of folders that perhaps contains the initial malware infection or to delete evidence.

    T1070.004by frack113 , X__Junior (Nextron Systems)

  • Medium
    Hidden Powershell in Link File Pattern

    Detects events that appear when a user click on a link file with a powershell command in it

    T1059.001by frack113

  • Medium
    IIS WebServer Log Deletion via CommandLine Utilities

    Detects attempts to delete Internet Information Services (IIS) log files via command line utilities, which is a common defense evasion technique used by attackers to cover their tracks. Threat actors often abuse vulnerabilities in web applications hosted on IIS servers to gain initial access and later delete IIS logs to evade detection.

    T1070by Swachchhanda Shrawan Poudel (Nextron Systems)

  • Medium
    Potential Defense Evasion Via Binary Rename

    Detects the execution of a renamed binary often used by attackers or malware leveraging new Sysmon OriginalFileName datapoint.

    T1036.003by Matthew Green @mgreen27, Ecco, James Pemberton @4A616D6573, oscd.community, Andreas Hunkeler (@Karneades)

  • Medium
    Potential Provlaunch.EXE Binary Proxy Execution Abuse

    Detects child processes of "provlaunch.exe" which might indicate potential abuse to proxy execution.

    T1218by Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel

  • Medium
    Potentially Suspicious Child Process Of ClickOnce Application

    Detects potentially suspicious child processes of a ClickOnce deployment application

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious Child Process of KeyScrambler.exe

    Detects potentially suspicious child processes of KeyScrambler.exe

    T1203T1574.001by Swachchhanda Shrawan Poudel

  • Medium
    Potentially Suspicious Child Process Of VsCode

    Detects uncommon or suspicious child processes spawning from a VsCode "code.exe" process. This could indicate an attempt of persistence via VsCode tasks or terminal profiles.

    T1218T1202by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious Child Process Of WinRAR.EXE

    Detects potentially suspicious child processes of WinRAR.exe.

    T1203by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious CMD Shell Output Redirect

    Detects inline Windows shell commands redirecting output via the ">" symbol to a suspicious location. This technique is sometimes used by malicious actors in order to redirect the output of reconnaissance commands such as "hostname" and "dir" to files for future exfiltration.

    T1218by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious Execution Of PDQDeployRunner

    Detects suspicious execution of "PDQDeployRunner" which is part of the PDQDeploy service stack that is responsible for executing commands and packages on a remote machines

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Potentially Suspicious NTFS Symlink Behavior Modification

    Detects the modification of NTFS symbolic link behavior using fsutil, which could be used to enable remote to local or remote to remote symlinks for potential attacks.

    T1059T1222.001by frack113, The DFIR Report

  • Medium
    Potentially Suspicious Ping/Copy Command Combination

    Detects uncommon and potentially suspicious one-liner command containing both "ping" and "copy" at the same time, which is usually used by malware.

    T1070.004by X__Junior (Nextron Systems)

  • Medium
    Potentially Suspicious WebDAV LNK Execution

    Detects possible execution via LNK file accessed on a WebDAV server.

    T1059.001T1204by Micah Babinski

  • Medium
    Potentially Suspicious Windows App Activity

    Detects potentially suspicious child process of applications launched from inside the WindowsApps directory. This could be a sign of a rogue ".appx" package installation/execution

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Private Keys Reconnaissance Via CommandLine Tools

    Adversaries may search for private key certificate files on compromised systems for insecurely stored credential

    T1552.004by frack113, Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Read Contents From Stdin Via Cmd.EXE

    Detect the use of "<" to read and potentially execute a file via cmd.exe

    T1059.003by frack113, Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Remote Access Tool - MeshAgent Command Execution via MeshCentral

    Detects the use of MeshAgent to execute commands on the target host, particularly when threat actors might abuse it to execute commands directly. MeshAgent can execute commands on the target host by leveraging win-console to obscure their activities and win-dispatcher to run malicious code through IPC with child processes.

    T1219.002by @Kostastsale

  • 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
    Shell Process Spawned by Java.EXE

    Detects shell spawned from Java host process, which could be a sign of exploitation (e.g. log4j exploitation)

    by Andreas Hunkeler (@Karneades), Nasreddine Bencherchali

  • Medium
    Suspicious Copy From or To System Directory

    Detects a suspicious copy operation that tries to copy a program from system (System32, SysWOW64, WinSxS) directories to another on disk. Often used to move LOLBINs such as 'certutil' or 'desktopimgdownldr' to a different location with a different name in order to bypass detections based on locations.

    T1036.003by Florian Roth (Nextron Systems), Markus Neis, Tim Shelton (HAWK.IO), Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Suspicious Electron Application Child Processes

    Detects suspicious child processes of electron apps (teams, discord, slack, etc.). This could be a potential sign of ".asar" file tampering (See reference section for more information) or binary execution proxy through specific CLI arguments (see related rule)

    by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    Suspicious MsiExec Embedding Parent

    Adversaries may abuse msiexec.exe to proxy the execution of malicious payloads

    T1218.007by frack113

  • Medium
    Unusual Parent Process For Cmd.EXE

    Detects suspicious parent process for cmd.exe

    T1059by Tim Rauch, Elastic (idea)

  • Medium
    Visual Studio Code Tunnel Execution

    Detects Visual Studio Code tunnel execution. Attackers can abuse this functionality to establish a C2 channel

    T1071.001T1219by Nasreddine Bencherchali (Nextron Systems), citron_ninja

  • Medium
    WSL Child Process Anomaly

    Detects uncommon or suspicious child processes spawning from a WSL process. This could indicate an attempt to evade parent/child relationship detections or persistence attempts via cron using WSL

    T1218T1202by Nasreddine Bencherchali (Nextron Systems)

  • Low
    Change Default File Association Via Assoc

    Detects file association changes using the builtin "assoc" command. When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility.

    T1546.001by Timur Zinniatullin, oscd.community

  • Low
    Directory Removal Via Rmdir

    Detects execution of the builtin "rmdir" command in order to delete directories. Adversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary may leave traces to indicate to what was done within a network and how.

    T1070.004by frack113

  • Low
    File And SubFolder Enumeration Via Dir Command

    Detects usage of the "dir" command part of Windows CMD with the "/S" command line flag in order to enumerate files in a specified directory and all subdirectories.

    T1217by frack113

  • Low
    File Deletion Via Del

    Detects execution of the builtin "del"/"erase" commands in order to delete files. Adversaries may delete files left behind by the actions of their intrusion activity. Malware, tools, or other non-native files dropped or created on a system by an adversary may leave traces to indicate to what was done within a network and how.

    T1070.004by frack113

  • Low
    Local Accounts Discovery

    Local accounts, System Owner/User discovery using operating systems utilities

    T1033T1087.001by Timur Zinniatullin, Daniil Yugoslavskiy, oscd.community

  • Low
    Remote Access Tool - ScreenConnect Remote Command Execution

    Detects the execution of a system command via the ScreenConnect RMM service.

    T1059.003by Ali Alwashali

Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.