Detect Remote Access Software Usage File
Description
The following analytic detects the writing of files from known remote access software to disk within the environment. It leverages data from Endpoint Detection and Response (EDR) agents, focusing on file path, file name, and user information. This activity is significant as adversaries often use remote access tools like AnyDesk, GoToMyPC, LogMeIn, and TeamViewer to maintain unauthorized access. If confirmed malicious, this could allow attackers to persist in the environment, potentially leading to data exfiltration, further compromise, or complete control over affected systems. It is best to update both the remote_access_software_usage_exception.csv lookup and the remote_access_software lookup with any known or approved remote access software to reduce false positives and increase coverage. In order to enhance performance, the detection filters for specific file names extensions / names that are used in the remote_access_software lookup. If add additional entries, consider updating the search filters to include those file names / extensions as well, if not alread covered.
Query · spl
| tstats `security_content_summariesonly`
count min(_time) as firstTime,
max(_time) as lastTime
values(Filesystem.file_path) as file_path
FROM datamodel=Endpoint.Filesystem WHERE
[
| inputlookup remote_access_software
| search file_name!=""
| rename file_name as Filesystem.file_name
| table Filesystem.file_name
]
OR
[
| inputlookup remote_access_software
| search file_path!=""
| rename file_path as Filesystem.file_path
| table Filesystem.file_path
]
BY Filesystem.action Filesystem.dest Filesystem.file_access_time
Filesystem.file_create_time Filesystem.file_hash
Filesystem.file_modify_time Filesystem.file_name
Filesystem.file_path Filesystem.file_acl Filesystem.file_size
Filesystem.process_guid Filesystem.process_id
Filesystem.user Filesystem.vendor_product
| `drop_dm_object_name(Filesystem)`
| lookup local=t remote_access_software file_name OUTPUT app as name_signature, category as name_category, reference as name_reference, description as name_description
| lookup local=t remote_access_software file_path OUTPUT app as path_signature, category as path_category, reference as path_reference, description as path_description
| eval signature=coalesce(nullif(name_signature, ""), path_signature),
category=coalesce(nullif(name_category, ""), path_category),
reference=coalesce(nullif(name_reference, ""), path_reference),
description=coalesce(nullif(name_description, ""), path_description)
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `remote_access_software_usage_exceptions`
| `detect_remote_access_software_usage_file_filter`
Implementation guide
The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to
provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest
logs that contain the file path, file name, and the user that created the file. These logs must be processed using the appropriate
Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the Filesystem node of the Endpoint
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
- Known or approved applications used by the organization or usage of built-in functions. 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
Analyst notes
Known false positives: Known or approved applications used by the organization or usage of built-in functions. 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