First Time Seen Commonly Abused Remote Access Tool Execution
Adversaries may install legitimate remote access tools (RAT) to compromised endpoints for further command-and-control (C2). Adversaries can rely on installed RATs for persistence, execution of native commands and more. This rule detects when a process is started whose name or code signature resembles commonly abused RATs. This is a New Terms rule type indicating the host has not seen this RAT process started before within the last 30 days.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2023/04/03"
3integration = ["windows", "endpoint"]
4maturity = "production"
5min_stack_comments = "The New Term rule type used in this rule was added in Elastic 8.4"
6min_stack_version = "8.4.0"
7updated_date = "2023/05/31"
8
9[rule]
10author = ["Elastic"]
11description = """
12Adversaries may install legitimate remote access tools (RAT) to compromised endpoints for further command-and-control
13(C2). Adversaries can rely on installed RATs for persistence, execution of native commands and more. This rule detects
14when a process is started whose name or code signature resembles commonly abused RATs. This is a New Terms rule type
15indicating the host has not seen this RAT process started before within the last 30 days.
16"""
17from = "now-9m"
18index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
19language = "kuery"
20license = "Elastic License v2"
21name = "First Time Seen Commonly Abused Remote Access Tool Execution"
22note = """
23## Triage and analysis
24
25### Investigating First Time Seen Commonly Abused Remote Access Tool Execution
26
27Remote access software is a class of tools commonly used by IT departments to provide support by connecting securely to users' computers. Remote access is an ever-growing market where new companies constantly offer new ways of quickly accessing remote systems.
28
29At the same pace as IT departments adopt these tools, the attackers also adopt them as part of their workflow to connect into an interactive session, maintain access with legitimate software as a persistence mechanism, drop malicious software, etc.
30
31This rule detects when a remote access tool is seen in the environment for the first time in the last 15 days, enabling analysts to investigate and enforce the correct usage of such tools.
32
33#### Possible investigation steps
34
35- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
36- Check if the execution of the remote access tool is approved by the organization's IT department.
37- Investigate other alerts associated with the user/host during the past 48 hours.
38- Contact the account owner and confirm whether they are aware of this activity.
39 - If the tool is not approved for use in the organization, the employee could have been tricked into installing it and providing access to a malicious third party. Investigate whether this third party could be attempting to scam the end-user or gain access to the environment through social engineering.
40- Investigate any abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.
41
42### False positive analysis
43
44- If an authorized support person or administrator used the tool to conduct legitimate support or remote access, consider reinforcing that only tooling approved by the IT policy should be used. The analyst can dismiss the alert if no other suspicious behavior is observed involving the host or users.
45
46### Response and remediation
47
48- Initiate the incident response process based on the outcome of the triage.
49- Isolate the involved host to prevent further post-compromise behavior.
50- Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system, persistence mechanisms, and malware components.
51- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
52- If an unauthorized third party did the access via social engineering, consider improvements to the security awareness program.
53- Enforce that only tooling approved by the IT policy should be used for remote access purposes and only by authorized staff.
54- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
55"""
56references = [
57 "https://thedfirreport.com/2023/04/03/malicious-iso-file-leads-to-domain-wide-ransomware/",
58 "https://attack.mitre.org/techniques/T1219/",
59]
60risk_score = 47
61rule_id = "6e1a2cc4-d260-11ed-8829-f661ea17fbcc"
62severity = "medium"
63tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Command and Control", "Resources: Investigation Guide", "Data Source: Elastic Defend"]
64timestamp_override = "event.ingested"
65type = "new_terms"
66
67query = '''
68host.os.type: "windows" and
69
70 event.category: "process" and event.type : "start" and
71
72 (
73 process.code_signature.subject_name : (
74 TeamViewer* or "NetSupport Ltd" or "GlavSoft" or "LogMeIn, Inc." or "Ammyy LLC" or
75 "Nanosystems S.r.l." or "Remote Utilities LLC" or "ShowMyPC" or "Splashtop Inc." or
76 "Yakhnovets Denis Aleksandrovich IP" or "Pro Softnet Corporation" or "BeamYourScreen GmbH" or
77 "RealVNC" or "uvnc" or "SAFIB") or
78
79 process.name.caseless : (
80 "teamviewer.exe" or "apc_Admin.exe" or "apc_host.exe" or "SupremoHelper.exe" or "rfusclient.exe" or
81 "spclink.exe" or "smpcview.exe" or "ROMServer.exe" or "strwinclt.exe" or "RPCSuite.exe" or "RemotePCDesktop.exe" or
82 "RemotePCService.exe" or "tvn.exe" or "LMIIgnition.exe" or "B4-Service.exe" or "Mikogo-Service.exe" or "AnyDesk.exe" or
83 "Splashtop-streamer.exe" or AA_v*.exe, or "rutserv.exe" or "rutview.exe" or "vncserver.exe" or "vncviewer.exe" or
84 "tvnserver.exe" or "tvnviewer.exe" or "winvnc.exe" or "RemoteDesktopManager.exe" or "LogMeIn.exe" or ScreenConnect*.exe or
85 "RemotePC.exe" or "r_server.exe" or "radmin.exe" or "ROMServer.exe" or "ROMViewer.exe" or "DWRCC.exe" or "AeroAdmin.exe" or
86 "ISLLightClient.exe" or "ISLLight.exe" or "AteraAgent.exe" or "SRService.exe")
87 ) and
88
89 not (process.pe.original_file_name : ("G2M.exe" or "Updater.exe" or "powershell.exe") and process.code_signature.subject_name : "LogMeIn, Inc.")
90'''
91
92
93[[rule.threat]]
94framework = "MITRE ATT&CK"
95[[rule.threat.technique]]
96id = "T1219"
97name = "Remote Access Software"
98reference = "https://attack.mitre.org/techniques/T1219/"
99
100
101[rule.threat.tactic]
102id = "TA0011"
103name = "Command and Control"
104reference = "https://attack.mitre.org/tactics/TA0011/"
105
106[rule.new_terms]
107field = "new_terms_fields"
108value = ["host.id"]
109[[rule.new_terms.history_window_start]]
110field = "history_window_start"
111value = "now-15d"
Triage and analysis
Investigating First Time Seen Commonly Abused Remote Access Tool Execution
Remote access software is a class of tools commonly used by IT departments to provide support by connecting securely to users' computers. Remote access is an ever-growing market where new companies constantly offer new ways of quickly accessing remote systems.
At the same pace as IT departments adopt these tools, the attackers also adopt them as part of their workflow to connect into an interactive session, maintain access with legitimate software as a persistence mechanism, drop malicious software, etc.
This rule detects when a remote access tool is seen in the environment for the first time in the last 15 days, enabling analysts to investigate and enforce the correct usage of such tools.
Possible investigation steps
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Check if the execution of the remote access tool is approved by the organization's IT department.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Contact the account owner and confirm whether they are aware of this activity.
- If the tool is not approved for use in the organization, the employee could have been tricked into installing it and providing access to a malicious third party. Investigate whether this third party could be attempting to scam the end-user or gain access to the environment through social engineering.
- Investigate any abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.
False positive analysis
- If an authorized support person or administrator used the tool to conduct legitimate support or remote access, consider reinforcing that only tooling approved by the IT policy should be used. The analyst can dismiss the alert if no other suspicious behavior is observed involving the host or users.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- If an unauthorized third party did the access via social engineering, consider improvements to the security awareness program.
- Enforce that only tooling approved by the IT policy should be used for remote access purposes and only by authorized staff.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- Connection to Commonly Abused Web Services
- Network Connection via Certutil
- Port Forwarding Rule Addition
- Potential DNS Tunneling via NsLookup
- Potential Remote Desktop Tunneling Detected