Detection rules › Splunk

RDP File Written by Outlook (Windows Event Log)

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

Remote desktop is a common feature in operating systems. It allows a user to log into an interactive session with a system desktop graphical user interface on a remote system. Targeted spear-phishing campaigns attributed to Russia’s APT29 have been observed distributing .rdp files to victims to initiate a remote connection. This use case detects the creation of .rdp files in the temporary directory that Outlook uses when opening attachments.

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '39085.70280'
title: RDP File Written by Outlook
description: Remote desktop is a common feature in operating systems. It allows a
  user to log into an interactive session with a system desktop graphical user interface
  on a remote system. Targeted spear-phishing campaigns attributed to Russia’s APT29
  have been observed distributing .rdp files to victims to initiate a remote connection.
  This use case detects the creation of .rdp files in the temporary directory that
  Outlook uses when opening attachments.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4663) OR
  "<EventID>4663<" OR TERM(EventCode=4656) OR "<EventID>4656<") ".rdp" ("\\AppData\\Local\\Packages\\Microsoft.Outlook_"
  OR ("\\AppData\\Local\\Microsoft\\Windows\\" "\\Content.Outlook\\"))| where match(file_path,
  "(?i)((\x5cAppData\x5cLocal\x5cMicrosoft\x5cWindows\x5c.*\x5cContent\.Outlook\x5c)|(\x5cAppData\x5cLocal\x5cPackages\x5cMicrosoft\.Outlook_)).*\.rdp")
  | table _time, host, user, process_*, process, parent_*, file_* | bin span=1s |
  stats values(*) as * by _time, host '
techniques:
- lateral-movement:remote services:remote desktop protocol
- initial-access:phishing:spearphishing attachment
technique_id:
- T1021.001
- T1566.001
data_category:
- Windows event logs
references:
- https://x.com/cyb3rops/status/1851880158640099675?s=46
- https://www.microsoft.com/en-us/security/blog/2024/10/29/midnight-blizzard-conducts-large-scale-spear-phishing-campaign-using-rdp-files/
- https://cert.gov.ua/article/6281076
- https://aws.amazon.com/blogs/security/amazon-identified-internet-domains-abused-by-apt29/
- https://github.com/SigmaHQ/sigma/pull/5063/files

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4663) OR "<EventID>4663<" OR TERM(EventCode=4656) OR "<EventID>4656<") ".rdp" ("\\AppData\\Local\\Packages\\Microsoft.Outlook_" OR ("\\AppData\\Local\\Microsoft\\Windows\\" "\\Content.Outlook\\"))

Stage 2: where

| where match(file_path, "(?i)((\x5cAppData\x5cLocal\x5cMicrosoft\x5cWindows\x5c.*\x5cContent\.Outlook\x5c)|(\x5cAppData\x5cLocal\x5cPackages\x5cMicrosoft\.Outlook_)).*\.rdp")

Stage 3: table

| table _time, host, user, process_*, process, parent_*, file_*

Stage 4: bucket

| bin span=1s

Stage 5: 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
  • 4656 corpus 19 (splunk 15, kusto 4)
  • 4663 corpus 34 (splunk 29, kusto 5)
file_pathmatch
  • "(?i)((\x5cAppData\x5cLocal\x5cMicrosoft\x5cWindows\x5c.*\x5cContent\.Outlook\x5c)|(\x5cAppData\x5cLocal\x5cPackages\x5cMicrosoft\.Outlook_)).*\.rdp"

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>4663<"
1TERM
1"<EventID>4656<"
1".rdp"
1"\\AppData\\Local\\Packages\\Microsoft.Outlook_"
1"\\AppData\\Local\\Microsoft\\Windows\\"
1"\\Content.Outlook\\"