Files
splunk-security_content/detections/endpoint/process_writing_dynamicwrapperx.yml
2023-03-03 12:40:16 +01:00

88 lines
3.7 KiB
YAML

name: Process Writing DynamicWrapperX
id: b0a078e4-2601-11ec-9aec-acde48001122
version: 1
date: '2021-10-05'
author: Michael Haag, Splunk
status: production
type: Hunting
description: DynamicWrapperX is an ActiveX component that can be used in a script
to call Windows API functions, but it requires the dynwrapx.dll to be installed
and registered. With that, a binary writing dynwrapx.dll to disk and registering
it into the registry is highly suspect. Why is it needed? In most malicious instances,
it will be written to disk at a non-standard location. During triage, review parallel
processes and pivot on the process_guid. Review the registry for any suspicious
modifications meant to load dynwrapx.dll. Identify any suspicious module loads of
dynwrapx.dll. This will identify the process that will invoke vbs/wscript/cscript.
data_source:
- Sysmon Event ID 1
search: '| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes
by _time Processes.process_id Processes.process_name Processes.dest Processes.process_guid
Processes.user | `drop_dm_object_name(Processes)` | join process_guid [| tstats
`security_content_summariesonly` count FROM datamodel=Endpoint.Filesystem where
Filesystem.file_name="dynwrapx.dll" by _time Filesystem.dest Filesystem.file_create_time
Filesystem.file_name Filesystem.file_path Filesystem.process_guid Filesystem.user
| `drop_dm_object_name(Filesystem)` | fields _time process_guid file_path file_name
file_create_time user dest process_name] | stats count min(_time) as firstTime max(_time)
as lastTime by dest process_name process_guid file_name file_path file_create_time
user | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
| `process_writing_dynamicwrapperx_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` and `Filesystem`
node. In addition, confirm the latest CIM App 4.20 or higher is installed and the
latest TA for the endpoint product.
known_false_positives: False positives should be limited, however it is possible to
filter by Processes.process_name and specific processes (ex. wscript.exe). Filter
as needed. This may need modification based on EDR telemetry and how it brings in
registry data. For example, removal of (Default).
references:
- https://blog.f-secure.com/hunting-for-koadic-a-com-based-rootkit/
- https://www.script-coding.com/dynwrapx_eng.html
- https://bohops.com/2018/06/28/abusing-com-registry-structure-clsid-localserver32-inprocserver32/
- https://tria.ge/210929-ap75vsddan
- https://www.virustotal.com/gui/file/cb77b93150cb0f7fe65ce8a7e2a5781e727419451355a7736db84109fa215a89
tags:
analytic_story:
- Remcos
asset_type: Endpoint
confidence: 100
impact: 80
message: An instance of $process_name$ was identified on endpoint $dest$ downloading
the DynamicWrapperX dll.
mitre_attack_id:
- T1059
- T1559.001
observable:
- name: user
type: User
role:
- Victim
- name: dest
type: Hostname
role:
- Victim
- name: process_name
type: Process
role:
- Child Process
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- dest
- process_name
- process_guid
- file_name
- file_path
- file_create_time user
risk_score: 80
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos/windows-sysmon.log
source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
sourcetype: xmlwineventlog