Threat Hunting: Initial infection - Cmd.exe file Spawned by Third-Party Applications

Where in the Cyber Kill Chain?


CyberKill-Delivery__1__1000x86

IDENTIFYING

The Cmd.exe file spawned by third-party applications

COMPONENT

Remarks

TACTIC

Identify instances of the cmd.exe file spawned by Microsoft Office applications, Adobe applications, Internet Explorer, Firefox, Chrome, IIS (w3wp), and the Windows Service Hosting process (svchost.exe). This question only detects the results of a very narrow set of attack techniques and should not be considered a universal method of identifying application exploits.

TECHNIQUE

Command shell spawned by unusual parent process. The Windows Service Hosting and IIS processes may spawn command shells for certain legitimate system services or third- party applications. When you omit the svchost and w3wp processes from the regex expression it should produce a more specific search that can be used as-is in most environments. You should consider to enable the Skip Unique / Make Stackable option in large environments.

PROCEDURE

Trace Executed Processes

  1. Open the TaaS Tanium Console.

  2. Use either the Question Builder or Question Bar proceed to Trace Executed Processes.

  3. Treat inputs as Regular Expressions: Enabled

  4. Skip Unique / Make Stackable: Enabled

  5. Process Path: (?i).*cmd\.exe

  6. Parent Process Path: (?i)(office|adobe|java|iexplore|firefox|chrome|svchost|w3wp).*Get Trace Executed Processes[1 week,1627676444061|1627680043061,1,0,1,1,"(?i).

    *cmd\.exe","(?i).* (office|adobe|java|iexplore

    |firefox|chrome|svchost|w3wp).*","","","",""] from all machines

Technique effective against the following adversary TTPs

  • Initial Infection