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 = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Adversaries may install legitimate remote access tools (RAT) to compromised endpoints for further command-and-control
 11(C2). Adversaries can rely on installed RATs for persistence, execution of native commands and more. This rule detects
 12when a process is started whose name or code signature resembles commonly abused RATs. This is a New Terms rule type
 13indicating the host has not seen this RAT process started before within the last 30 days.
 14"""
 15from = "now-9m"
 16index = [
 17    "logs-endpoint.events.process-*",
 18    "endgame-*",
 19    "winlogbeat-*",
 20    "logs-windows.*",
 21    "logs-system.security*",
 22]
 23language = "kuery"
 24license = "Elastic License v2"
 25name = "First Time Seen Commonly Abused Remote Access Tool Execution"
 26note = """## Triage and analysis
 27
 28### Investigating First Time Seen Commonly Abused Remote Access Tool Execution
 29
 30Remote 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.
 31
 32At 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.
 33
 34This 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.
 35
 36#### Possible investigation steps
 37
 38- 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.
 39- Check if the execution of the remote access tool is approved by the organization's IT department.
 40- Investigate other alerts associated with the user/host during the past 48 hours.
 41- Contact the account owner and confirm whether they are aware of this activity.
 42  - 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.
 43- Investigate any abnormal behavior by the subject process, such as network connections, registry or file modifications, and any spawned child processes.
 44
 45### False positive analysis
 46
 47- 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.
 48
 49### Response and remediation
 50
 51- Initiate the incident response process based on the outcome of the triage.
 52- Isolate the involved host to prevent further post-compromise behavior.
 53- 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.
 54- 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.
 55- If an unauthorized third party did the access via social engineering, consider improvements to the security awareness program.
 56- Enforce that only tooling approved by the IT policy should be used for remote access purposes and only by authorized staff.
 57- 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).
 58"""
 59references = [
 60    "https://thedfirreport.com/2023/04/03/malicious-iso-file-leads-to-domain-wide-ransomware/",
 61    "https://attack.mitre.org/techniques/T1219/",
 62    "https://github.com/redcanaryco/surveyor/blob/master/definitions/remote-admin.json",
 63]
 64risk_score = 47
 65rule_id = "6e1a2cc4-d260-11ed-8829-f661ea17fbcc"
 66severity = "medium"
 67tags = [
 68    "Domain: Endpoint",
 69    "OS: Windows",
 70    "Use Case: Threat Detection",
 71    "Tactic: Command and Control",
 72    "Resources: Investigation Guide",
 73    "Data Source: Elastic Defend",
 74    "Data Source: Elastic Endgame",
 75]
 76timestamp_override = "event.ingested"
 77type = "new_terms"
 78
 79query = '''
 80host.os.type: "windows" and
 81
 82   event.category: "process" and event.type : "start" and
 83
 84    (
 85        process.code_signature.subject_name : (
 86            "Action1 Corporation" or
 87            "AeroAdmin LLC" or
 88            "Ammyy LLC" or
 89            "Atera Networks Ltd" or
 90            "AWERAY PTE. LTD." or
 91            "BeamYourScreen GmbH" or
 92            "Bomgar Corporation" or
 93            "DUC FABULOUS CO.,LTD" or
 94            "DOMOTZ INC." or
 95            "DWSNET OÜ" or
 96            "FleetDeck Inc" or
 97            "GlavSoft LLC" or
 98            "GlavSoft LLC." or
 99            "Hefei Pingbo Network Technology Co. Ltd" or
100            "IDrive, Inc." or
101            "IMPERO SOLUTIONS LIMITED" or
102            "Instant Housecall" or
103            "ISL Online Ltd." or
104            "LogMeIn, Inc." or
105            "Monitoring Client" or
106            "MMSOFT Design Ltd." or
107            "Nanosystems S.r.l." or
108            "NetSupport Ltd" or
109            "NinjaRMM, LLC" or
110            "Parallels International GmbH" or
111            "philandro Software GmbH" or
112            "Pro Softnet Corporation" or
113            "RealVNC" or
114            "RealVNC Limited" or
115            "BreakingSecurity.net" or
116            "Remote Utilities LLC" or
117            "Rocket Software, Inc." or
118            "SAFIB" or
119            "Servably, Inc." or
120            "ShowMyPC INC" or
121            "Splashtop Inc." or
122            "Superops Inc." or
123            "TeamViewer" or
124            "TeamViewer GmbH" or
125            "TeamViewer Germany GmbH" or
126            "Techinline Limited" or
127            "uvnc bvba" or
128            "Yakhnovets Denis Aleksandrovich IP" or
129            "Zhou Huabing"
130        ) or
131
132        process.name.caseless : (
133            AA_v*.exe or
134            "AeroAdmin.exe" or
135            "AnyDesk.exe" or
136            "apc_Admin.exe" or
137            "apc_host.exe" or
138            "AteraAgent.exe" or
139            aweray_remote*.exe or
140            "AweSun.exe" or
141            "B4-Service.exe" or
142            "BASupSrvc.exe" or
143            "bomgar-scc.exe" or
144            "domotzagent.exe" or
145            "domotz-windows-x64-10.exe" or
146            "dwagsvc.exe" or
147            "DWRCC.exe" or
148            "ImperoClientSVC.exe" or
149            "ImperoServerSVC.exe" or
150            "ISLLight.exe" or
151            "ISLLightClient.exe" or
152            fleetdeck_commander*.exe or
153            "getscreen.exe" or
154            "LMIIgnition.exe" or
155            "LogMeIn.exe" or
156            "ManageEngine_Remote_Access_Plus.exe" or
157            "Mikogo-Service.exe" or
158            "NinjaRMMAgent.exe" or
159            "NinjaRMMAgenPatcher.exe" or
160            "ninjarmm-cli.exe" or
161            "r_server.exe" or
162            "radmin.exe" or
163            "radmin3.exe" or
164            "RCClient.exe" or
165            "RCService.exe" or
166            "RemoteDesktopManager.exe" or
167            "RemotePC.exe" or
168            "RemotePCDesktop.exe" or
169            "RemotePCService.exe" or
170            "rfusclient.exe" or
171            "ROMServer.exe" or
172            "ROMViewer.exe" or
173            "RPCSuite.exe" or
174            "rserver3.exe" or
175            "rustdesk.exe" or
176            "rutserv.exe" or
177            "rutview.exe" or
178            "saazapsc.exe" or
179            ScreenConnect*.exe or
180            "smpcview.exe" or
181            "spclink.exe" or
182            "Splashtop-streamer.exe" or
183            "SRService.exe" or
184            "strwinclt.exe" or
185            "Supremo.exe" or
186            "SupremoService.exe" or
187            "teamviewer.exe" or
188            "TiClientCore.exe" or
189            "TSClient.exe" or
190            "tvn.exe" or
191            "tvnserver.exe" or
192            "tvnviewer.exe" or
193            UltraVNC*.exe or
194            UltraViewer*.exe or
195            "vncserver.exe" or
196            "vncviewer.exe" or
197            "winvnc.exe" or
198            "winwvc.exe" or
199            "Zaservice.exe" or
200            "ZohoURS.exe"
201        ) or
202        process.name : (
203            AA_v*.exe or
204            "AeroAdmin.exe" or
205            "AnyDesk.exe" or
206            "apc_Admin.exe" or
207            "apc_host.exe" or
208            "AteraAgent.exe" or
209            aweray_remote*.exe or
210            "AweSun.exe" or
211            "B4-Service.exe" or
212            "BASupSrvc.exe" or
213            "bomgar-scc.exe" or
214            "domotzagent.exe" or
215            "domotz-windows-x64-10.exe" or
216            "dwagsvc.exe" or
217            "DWRCC.exe" or
218            "ImperoClientSVC.exe" or
219            "ImperoServerSVC.exe" or
220            "ISLLight.exe" or
221            "ISLLightClient.exe" or
222            fleetdeck_commander*.exe or
223            "getscreen.exe" or
224            "LMIIgnition.exe" or
225            "LogMeIn.exe" or
226            "ManageEngine_Remote_Access_Plus.exe" or
227            "Mikogo-Service.exe" or
228            "NinjaRMMAgent.exe" or
229            "NinjaRMMAgenPatcher.exe" or
230            "ninjarmm-cli.exe" or
231            "r_server.exe" or
232            "radmin.exe" or
233            "radmin3.exe" or
234            "RCClient.exe" or
235            "RCService.exe" or
236            "RemoteDesktopManager.exe" or
237            "RemotePC.exe" or
238            "RemotePCDesktop.exe" or
239            "RemotePCService.exe" or
240            "rfusclient.exe" or
241            "ROMServer.exe" or
242            "ROMViewer.exe" or
243            "RPCSuite.exe" or
244            "rserver3.exe" or
245            "rustdesk.exe" or
246            "rutserv.exe" or
247            "rutview.exe" or
248            "saazapsc.exe" or
249            ScreenConnect*.exe or
250            "smpcview.exe" or
251            "spclink.exe" or
252            "Splashtop-streamer.exe" or
253            "SRService.exe" or
254            "strwinclt.exe" or
255            "Supremo.exe" or
256            "SupremoService.exe" or
257            "teamviewer.exe" or
258            "TiClientCore.exe" or
259            "TSClient.exe" or
260            "tvn.exe" or
261            "tvnserver.exe" or
262            "tvnviewer.exe" or
263            UltraVNC*.exe or
264            UltraViewer*.exe or
265            "vncserver.exe" or
266            "vncviewer.exe" or
267            "winvnc.exe" or
268            "winwvc.exe" or
269            "Zaservice.exe" or
270            "ZohoURS.exe"
271        )
272	) and
273
274	not (process.pe.original_file_name : ("G2M.exe" or "Updater.exe" or "powershell.exe") and process.code_signature.subject_name : "LogMeIn, Inc.")
275'''
276
277
278[[rule.threat]]
279framework = "MITRE ATT&CK"
280[[rule.threat.technique]]
281id = "T1219"
282name = "Remote Access Software"
283reference = "https://attack.mitre.org/techniques/T1219/"
284
285
286[rule.threat.tactic]
287id = "TA0011"
288name = "Command and Control"
289reference = "https://attack.mitre.org/tactics/TA0011/"
290
291[rule.new_terms]
292field = "new_terms_fields"
293value = ["host.id"]
294[[rule.new_terms.history_window_start]]
295field = "history_window_start"
296value = "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

to-top