Detection rules › Splunk

Windows Unsigned DLL Side-Loading In Same Process Path

Status
production
Severity
medium
Group by
dest, image_loaded, process_guid, process_hash, process_id, process_name, service_dll_signature_exists, service_dll_signature_verified, signature, signature_id, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

This detection identifies unsigned DLLs loaded through DLL side-loading with same file path with the process loaded the DLL, a technique observed in DarkGate malware. This detection monitors DLL loading, verifies signatures, and flags unsigned DLLs. Suspicious file paths and known executable associations are checked. Detecting such suspicious DLLs is crucial in preventing privilege escalation attacks and other potential security breaches. Regular security assessments, thorough monitoring, and implementing security best practices are essential in safeguarding systems from such threats.

Known false positives

  • No false positives have been identified at this time.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

name: Windows Unsigned DLL Side-Loading In Same Process Path
id: 3cf85c02-f9d6-4186-bf3c-e70ee99fbc7f
version: 20
creation_date: '2024-06-26'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: This detection identifies unsigned DLLs loaded through DLL side-loading with same file path with the process loaded the DLL, a technique observed in DarkGate malware. This detection monitors DLL loading, verifies signatures, and flags unsigned DLLs. Suspicious file paths and known executable associations are checked. Detecting such suspicious DLLs is crucial in preventing privilege escalation attacks and other potential security breaches. Regular security assessments, thorough monitoring, and implementing security best practices are essential in safeguarding systems from such threats.
data_source:
    - Sysmon EventID 7
search: '`sysmon` EventCode=7 Signed=false SignatureStatus != Valid NOT (Image IN ("*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*")) NOT (ImageLoaded IN ("*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*")) |  rex field=Image "(?<ImageFolderPath>.+\\\)" |  rex field=ImageLoaded "(?<ImageLoadedFolderPath>.+\\\)" |  where ImageFolderPath = ImageLoadedFolderPath | stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded dest loaded_file loaded_file_path process_exec process_guid process_hash process_id process_name process_path service_dll_signature_exists service_dll_signature_verified signature signature_id user_id vendor_product | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_unsigned_dll_side_loading_in_same_process_path_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting logs with the process name and imageloaded executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.
known_false_positives: No false positives have been identified at this time.
references:
    - https://www.splunk.com/en_us/blog/security/enter-the-gates-an-analysis-of-the-darkgate-autoit-loader.html
    - https://www.trendmicro.com/en_us/research/23/b/investigating-the-plugx-trojan-disguised-as-a-legitimate-windows.html
finding:
    title: An unsigned dll module was loaded on $dest$
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - PlugX
    - DarkGate Malware
    - Derusbi
    - China-Nexus Threat Activity
    - Malicious Inno Setup Loader
    - Salt Typhoon
    - XWorm
    - SnappyBee
    - NailaoLocker Ransomware
    - Lokibot
    - SolarWinds WHD RCE Post Exploitation
asset_type: Endpoint
mitre_attack_id:
    - T1574.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon` EventCode=7 Signed=false SignatureStatus != Valid NOT (Image IN ("*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*")) NOT (ImageLoaded IN ("*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*"))

Stage 2: rex

| rex field=Image "(?<ImageFolderPath>.+\\\)"

Stage 3: rex

| rex field=ImageLoaded "(?<ImageLoadedFolderPath>.+\\\)"

Stage 4: where

| where ImageFolderPath = ImageLoadedFolderPath

Stage 5: stats

| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded dest loaded_file loaded_file_path process_exec process_guid process_hash process_id process_name process_path service_dll_signature_exists service_dll_signature_verified signature signature_id user_id vendor_product

Stage 6: search

| `security_content_ctime(firstTime)`

Stage 7: search

| `security_content_ctime(lastTime)`

Stage 8: search

| `windows_unsigned_dll_side_loading_in_same_process_path_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagein"*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*"excludes:Image
ImageLoadedin"*:\\windows\\system32\\*", "*:\\windows\\syswow64\\*", "c:\\Program Files*"excludes:ImageLoaded

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 7 corpus 41 (splunk 39, elastic 1, kusto 1)
field:"EventID" kind:eq value:"7"
ImageFolderPathcross_field_compare
  • ImageLoadedFolderPath transforms: op:eq corpus 2 (splunk 2)
field:"ImageFolderPath" kind:cross_field_compare value:"ImageLoadedFolderPath"
SignatureStatusne
  • Valid corpus 2 (splunk 2)
field:"SignatureStatus" kind:ne value:"Valid"
Signedeq
  • false corpus 9 (splunk 5, sigma 4)
field:"Signed" kind:eq value:"false"