name: RunDLL Loading DLL By Ordinal
id: 6c135f8d-5e60-454e-80b7-c56eed739833
version: 4
date: '2020-11-30'
author: David Dorsey, Splunk
type: batch
datamodel:
- Endpoint
description: This search looks for executing scripts with rundll32. Adversaries may
  abuse rundll32.exe to proxy execution of malicious code. Using rundll32.exe, vice
  executing directly, may avoid triggering security tools that may not monitor execution
  of the rundll32.exe process because of allowlists or false positives from normal
  operations.
search: '| tstats `security_content_summariesonly` values(Processes.process) as process
  min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes
  where Processes.process_name = rundll32.exe by Processes.process_name Processes.parent_process_name
  Processes.process Processes.dest Processes.user | `drop_dm_object_name(Processes)`
  | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `rundll_loading_dll_by_ordinal_filter`'
how_to_implement: You must be ingesting data that records process activity from your
  hosts to populate the Endpoint data model in the Processes node. You must also be
  ingesting logs with both the process name and command line from your endpoints.
  The command-line arguments are mapped to the "process" field in the Endpoint data
  model.
known_false_positives: While not common, loading a DLL under %AppData% and calling
  a function by ordinal is possible by a legitimate process
references: []
tags:
  analytic_story:
  - Unusual Processes
  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:
  - Installation
  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.parent_process_name
  - Processes.process
  - Processes.dest
  - Processes.user
  security_domain: endpoint
