Detection rules › Splunk

Temporary ConnectWise xml File Activity (Windows Event Log)

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

ConnectWise ScreenConnect is a popular remote desktop solution. ConnectWise released an advisory detailing a critical authentication bypass vulnerability affecting ScreenConnect versions prior to 23.9.8. This use case detects when an XML file in the \Temp\ScreenConnect[version number]\ directory has been created, modified, or deleted. To enable detection of the file activities associated with the vulnerability, configure the Advanced Auditing policy to log successful Windows Event ID 4663 events, and set a System Access Control List (SACL) on the target directory to monitor file modifications. See Huntress article in references for detailed information.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1133 External Remote Services
PersistenceT1133 External Remote Services
Command & ControlT1219 Remote Access Tools

References

Event coverage

Rule body yaml

id: '28096.51137'
title: Temporary ConnectWise xml File Activity
description: ConnectWise ScreenConnect is a popular remote desktop solution. ConnectWise
  released an advisory detailing a critical authentication bypass vulnerability affecting
  ScreenConnect versions prior to 23.9.8. This use case detects when an XML file in
  the \Temp\ScreenConnect\[version number]\ directory has been created, modified,
  or deleted. To enable detection of the file activities associated with the vulnerability,
  configure the Advanced Auditing policy to log successful Windows Event ID 4663 events,
  and set a System Access Control List (SACL) on the target directory to monitor file
  modifications. See Huntress article in references for detailed information.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4663) OR
  "<EventID>4663<") "C:\\Windows\\Temp\\ScreenConnect\\" ".xml" | regex ObjectName="(?i)C:\x5cWindows\x5cTemp\x5c\ScreenConnect\x5c.+\.xml"
  | table _time, host, user, process, process_*, ObjectName | bin span=1s | stats
  values(*) as * by _time, host '
techniques:
- persistence:external remote services
- command-and-control:remote access software
- initial-access:external remote services
technique_id: 
- T1133
- T1219
data_category:
- File monitoring
- Windows event logs
references:
- https://www.huntress.com/blog/detection-guidance-for-connectwise-cwe-288-2
- https://www.connectwise.com/company/trust/security-bulletins/connectwise-screenconnect-23.9.8

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4663) OR "<EventID>4663<") "C:\\Windows\\Temp\\ScreenConnect\\" ".xml"

Stage 2: regex

| regex ObjectName="(?i)C:\x5cWindows\x5cTemp\x5c\ScreenConnect\x5c.+\.xml"

Stage 3: table

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

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
  • 4663 corpus 34 (splunk 29, kusto 5)
ObjectNameregex_match
  • "(?i)C:\x5cWindows\x5cTemp\x5c\ScreenConnect\x5c.+.xml"

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<"
1"C:\\Windows\\Temp\\ScreenConnect\\"
1".xml"