Suspicious Rundll32 Rename

Original Source: [splunk source]
Name:Suspicious Rundll32 Rename
id:7360137f-abad-473e-8189-acbdaa34d114
version:6
date:2024-10-17
author:Michael Haag, Splunk
status:deprecated
type:Hunting
Description:The following hunting analytic identifies renamed instances of rundll32.exe executing. rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. During investigation, validate it is the legitimate rundll32.exe executing and what script content it is loading. This query relies on the original filename or internal name from the PE meta data. Expand the query as needed by looking for specific command line arguments outlined in other analytics.
Data_source:
  • -Sysmon EventID 1
search:| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.original_file_name=RUNDLL32.exe AND Processes.process_name!=rundll32.exe by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_rundll32_rename_filter`


how_to_implement:The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
known_false_positives:Although unlikely, some legitimate applications may use a moved copy of rundll32, triggering a false positive.
References:
  -https://attack.mitre.org/techniques/T1218/011/
  -https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md
  -https://lolbas-project.github.io/lolbas/Binaries/Rundll32/
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Suspicious Rundll32 Activity'
    - 'Masquerading - Rename System Utilities'
  asset_type:Endpoint
  confidence:90
  impact:70
  message:Suspicious renamed rundll32.exe binary ran on $dest$ by $user$
  mitre_attack_id:
    - 'T1218'
    - 'T1036'
    - 'T1218.011'
    - 'T1036.003'
  observable:
    name:'dest'
    type:'Endpoint'
    - role:
      - 'Victim'
    name:'User'
    type:'User'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'Processes.dest'
    - 'Processes.user'
    - 'Processes.parent_process_name'
    - 'Processes.parent_process'
    - 'Processes.original_file_name'
    - 'Processes.process_name'
    - 'Processes.process'
    - 'Processes.process_id'
    - 'Processes.parent_process_path'
    - 'Processes.process_path'
    - 'Processes.parent_process_id'
  risk_score:63
  security_domain:endpoint

tests:
  :
manual_test:None