name: Suspicious Rundll32 StartW
id: 9319dda5-73f2-4d43-a85a-67ce961bddb7
version: 1
date: '2021-02-04'
author: Michael Haag, Splunk
type: batch
datamodel:
- Endpoint
description: The following analytic identifies rundll32.exe executing a DLL function
  name, Start and StartW, on the command line that is commonly observed with Cobalt
  Strike x86 and x64 DLL payloads. Rundll32.exe is natively found in C:\Windows\system32
  and C:\Windows\syswow64. Typically, the DLL will be written and loaded from a world
  writeable path or user location. In most instances it will not have a valid certificate
  (Unsigned). During investigation, review the parent process and other parallel application
  execution. Capture and triage the DLL in question. In the instance of Cobalt Strike,
  rundll32.exe is the default process it opens and injects shellcode into. This default
  process can be changed, but typically is not.
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
  as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe
  Processes.process=*start* by Processes.dest Processes.user Processes.parent_process
  Processes.process_name Processes.process Processes.process_id Processes.parent_process_id
  | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
  | `suspicious_rundll32_startw_filter`'
how_to_implement: To successfully implement this search you need to be ingesting information
  on process that include the name of the process responsible for the changes from
  your endpoints into the `Endpoint` datamodel in the `Processes` node.
known_false_positives: Although unlikely, some legitimate applications may use Start
  as a function and call it via the command line. Filter as needed.
references:
- https://attack.mitre.org/techniques/T1218/011/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md
- https://www.cobaltstrike.com/help-windows-executable
- https://lolbas-project.github.io/lolbas/Binaries/Rundll32
- https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/
tags:
  analytic_story:
  - Suspicious Rundll32 Activity
  - Cobalt Strike
  asset_type: Endpoint
  automated_detection_testing: passed
  cis20:
  - CIS 8
  dataset:
  - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log
  kill_chain_phases:
  - Actions on Objectives
  mitre_attack_id:
  - T1218.011
  nist:
  - PR.PT
  - DE.CM
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
  required_fields:
  - _time
  - Processes.process_name
  - Processes.process
  - Processes.dest
  - Processes.user
  - Processes.parent_process
  - Processes.process_id
  - Processes.parent_process_id
  security_domain: endpoint
