| ID | Technique | Tactic |
|---|---|---|
| T1219 | Remote Access Tools | Command and Control |
Detection: Detect Remote Access Software Usage URL
Description
The following analytic detects the execution of known remote access software within the environment. It leverages network logs mapped to the Web data model, identifying specific URLs and user agents associated with remote access tools like AnyDesk, GoToMyPC, LogMeIn, and TeamViewer.
Search
1
2| tstats `security_content_summariesonly`
3 count min(_time) as firstTime
4 max(_time) as lastTime
5 latest(Web.http_method) as http_method
6 latest(Web.http_user_agent) as http_user_agent
7 latest(Web.url) as url
8 latest(Web.user) as user
9 latest(Web.dest) as dest
10
11FROM datamodel=Web WHERE
12
13Web.url_domain=*
14NOT Web.url_domain IN (
15 "-",
16 "unknown"
17)
18[
19
20| inputlookup remote_access_software
21
22| search domain!=""
23
24| rename domain as Web.url_domain
25
26| table Web.url_domain
27]
28
29BY Web.action Web.src Web.category
30 Web.url_domain Web.url_length
31
32
33| `drop_dm_object_name("Web")`
34
35
36| lookup local=t remote_access_software domain AS url_domain OUTPUT app as signature, category, reference, description
37
38
39| `security_content_ctime(firstTime)`
40
41| `security_content_ctime(lastTime)`
42
43
44| `remote_access_software_usage_exceptions`
45
46
47| `detect_remote_access_software_usage_url_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Palo Alto Network Threat | 'pan:threat' |
'not_applicable' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| detect_remote_access_software_usage_url_filter | search * |
detect_remote_access_software_usage_url_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | Yes |
Implementation
The detection is based on data that originates from network logs. These logs must be processed using the appropriate Splunk Technology Add-ons
that are specific to the network logs. The logs must also be mapped to the Web data model. Use the Splunk Common Information Model (CIM) to
normalize the field names and speed up the data modeling process. The "exceptions" macro leverages both an Assets and Identities lookup, as well
as a KVStore collection called "remote_software_exceptions" that lets you track and maintain device-based exceptions for this set of detections.
Known False Positives
It is possible that legitimate remote access software is used within the environment. Ensure that the lookup is reviewed and updated with any additional remote access software that is used within the environment. Known false positives can be added to the remote_access_software_usage_exception.csv lookup to globally suppress these situations across all remote access content
Associated Analytic Story
Intermediate Findings
| Message | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| A domain for a known remote access software [$url_domain$] was contacted by [$src$]. | src | system | 20 |
| A domain for a known remote access software [$url_domain$] was contacted by [$src$]. | user | user | 20 |
Threat Objects
| Field | Type |
|---|---|
| url_domain | domain |
| signature | signature |
References
-
https://thedfirreport.com/2022/11/28/emotet-strikes-again-lnk-file-leads-to-domain-wide-ransomware/
-
https://thedfirreport.com/2022/08/08/bumblebee-roasts-its-way-to-domain-admin/
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | not_applicable |
pan:threat |
| Integration | ✅ Passing | Dataset | not_applicable |
pan:threat |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 18