Detection rules › Splunk

Temporary File Executed from Public Folder (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

The BlackBerry Threat Research and Intelligence Team has detailed several behaviors of threat actors using the RomCom remote access trojan. One indication of unusual activity is the placement of binaries in Temp directories with the extension .tmp which are launched by processes stored in the Public folder. This use case detects processes executing from temporary directories with parent processes located in public folders

MITRE ATT&CK coverage

TacticTechniques
Lateral Movement
Command & Control

References

Telemetry coverage

Rule body

id: '28106.51148'
title: Temporary File Executed from Public Folder
description: 'The BlackBerry Threat Research and Intelligence Team has detailed several
  behaviors of threat actors using the RomCom remote access trojan. One indication
  of unusual activity is the placement of binaries in Temp directories with the extension
  .tmp which are launched by processes stored in the Public folder. This use case
  detects processes executing from temporary directories with parent processes located
  in public folders. -- Threat Actor Association: UNC5812'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) "\\AppData\\Local\\Temp\\" ".tmp" "\\Users\\Public"
  ".exe" | regex parent_process_path="(?i)\x5cUsers\x5cPublic\x5c\.exe"| regex process_path="(?i)\x5cAppData\x5cLocal\x5cTemp\x5c.+\.tmp"
  | table _time, host, user, process, process_*, parent_process_* | bin span=1s |
  stats values(*) as * by _time, host '
techniques:
- command-and-control:ingress tool transfer
- lateral-movement:taint shared content
technique_id: 
- T1105
- T1080
data_category:
- Windows event logs
references:
- https://www.virustotal.com/gui/file/6d3ab9e729bb03ae8ae3fcd824474c5052a165de6cb4c27334969a542c7b261d/behavior
- https://blogs.blackberry.com/en/2022/10/unattributed-romcom-threat-actor-spoofing-popular-apps-now-hits-ukrainian-militaries

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "\\AppData\\Local\\Temp\\" ".tmp" "\\Users\\Public" ".exe"

Stage 2: regex

| regex parent_process_path="(?i)\x5cUsers\x5cPublic\x5c\.exe"

Stage 3: regex

| regex process_path="(?i)\x5cAppData\x5cLocal\x5cTemp\x5c.+\.tmp"

Stage 4: table

| table _time, host, user, process, process_*, parent_process_*

Stage 5: bucket

| bin span=1s

Stage 6: stats

| stats values(*) as * by _time, host

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4688 corpus 317 (splunk 283, kusto 33, elastic 1)
field:"EventID" kind:eq value:"4688"
parent_process_pathregex_match
  • "(?i)\x5cUsers\x5cPublic\x5c.exe" corpus 2 (splunk 2)
field:"parent_process_name" kind:regex_match
process_pathregex_match
  • "(?i)\x5cAppData\x5cLocal\x5cTemp\x5c.+.tmp" corpus 2 (splunk 2)
field:"process_name" kind:regex_match

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4688<"
1"\\AppData\\Local\\Temp\\"
1".tmp"
1"\\Users\\Public"
1".exe"