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 MovementT1080 Taint Shared Content
Command & ControlT1105 Ingress Tool Transfer

References

Event coverage

Rule body yaml

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

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
parent_process_pathregex_match
  • "(?i)\x5cUsers\x5cPublic\x5c.exe" corpus 2 (splunk 2)
process_pathregex_match
  • "(?i)\x5cAppData\x5cLocal\x5cTemp\x5c.+.tmp" corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

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