Renamed AutoIt Scripts Interpreter
Identifies a suspicious AutoIt process execution. Malware written as an AutoIt script tends to rename the AutoIt executable to avoid detection.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/09/01"
3integration = ["endpoint", "windows", "m365_defender"]
4maturity = "production"
5updated_date = "2025/03/20"
6
7[transform]
8[[transform.osquery]]
9label = "Osquery - Retrieve DNS Cache"
10query = "SELECT * FROM dns_cache"
11
12[[transform.osquery]]
13label = "Osquery - Retrieve All Services"
14query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
15
16[[transform.osquery]]
17label = "Osquery - Retrieve Services Running on User Accounts"
18query = """
19SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
20NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
21user_account == null)
22"""
23
24[[transform.osquery]]
25label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
26query = """
27SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
28services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
29authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
30"""
31
32
33[rule]
34author = ["Elastic"]
35description = """
36Identifies a suspicious AutoIt process execution. Malware written as an AutoIt script tends to rename the AutoIt
37executable to avoid detection.
38"""
39from = "now-9m"
40index = [
41 "winlogbeat-*",
42 "logs-endpoint.events.process-*",
43 "logs-windows.sysmon_operational-*",
44 "endgame-*",
45 "logs-m365_defender.event-*",
46]
47language = "eql"
48license = "Elastic License v2"
49name = "Renamed AutoIt Scripts Interpreter"
50note = """## Triage and analysis
51
52### Investigating Renamed AutoIt Scripts Interpreter
53
54The OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.
55
56AutoIt is a scripting language and tool for automating tasks on Microsoft Windows operating systems. Due to its capabilities, malicious threat actors can abuse it to create malicious scripts and distribute malware.
57
58This rule checks for renamed instances of AutoIt, which can indicate an attempt of evading detections, application allowlists, and other security protections.
59
60> **Note**:
61> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
62
63#### Possible investigation steps
64
65- 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.
66- Investigate other alerts associated with the user/host during the past 48 hours.
67- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
68- Examine the host for derived artifacts that indicate suspicious activities:
69 - Analyze the process executable using a private sandboxed analysis system.
70 - Observe and collect information about the following activities in both the sandbox and the alert subject host:
71 - Attempts to contact external domains and addresses.
72 - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
73 - Examine the DNS cache for suspicious or anomalous entries.
74 - $osquery_0
75 - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
76 - Examine the host services for suspicious or anomalous entries.
77 - $osquery_1
78 - $osquery_2
79 - $osquery_3
80 - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
81
82### False positive analysis
83
84- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
85
86### Response and remediation
87
88- Initiate the incident response process based on the outcome of the triage.
89- Isolate the involved host to prevent further post-compromise behavior.
90- If the triage identified malware, search the environment for additional compromised hosts.
91 - Implement temporary network rules, procedures, and segmentation to contain the malware.
92 - Stop suspicious processes.
93 - Immediately block the identified indicators of compromise (IoCs).
94 - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
95- Remove and block malicious artifacts identified during triage.
96- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
97- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
98- 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).
99"""
100risk_score = 47
101rule_id = "2e1e835d-01e5-48ca-b9fc-7a61f7f11902"
102severity = "medium"
103tags = [
104 "Domain: Endpoint",
105 "OS: Windows",
106 "Use Case: Threat Detection",
107 "Tactic: Defense Evasion",
108 "Data Source: Elastic Endgame",
109 "Resources: Investigation Guide",
110 "Data Source: Elastic Defend",
111 "Data Source: Sysmon",
112 "Data Source: Microsoft Defender for Endpoint",
113]
114timestamp_override = "event.ingested"
115type = "eql"
116
117query = '''
118process where host.os.type == "windows" and event.type == "start" and
119 process.pe.original_file_name : "AutoIt*.exe" and not process.name : "AutoIt*.exe"
120'''
121
122
123[[rule.threat]]
124framework = "MITRE ATT&CK"
125[[rule.threat.technique]]
126id = "T1036"
127name = "Masquerading"
128reference = "https://attack.mitre.org/techniques/T1036/"
129[[rule.threat.technique.subtechnique]]
130id = "T1036.003"
131name = "Rename System Utilities"
132reference = "https://attack.mitre.org/techniques/T1036/003/"
133
134
135
136[rule.threat.tactic]
137id = "TA0005"
138name = "Defense Evasion"
139reference = "https://attack.mitre.org/tactics/TA0005/"
Triage and analysis
Investigating Renamed AutoIt Scripts Interpreter
The OriginalFileName attribute of a PE (Portable Executable) file is a metadata field that contains the original name of the executable file when compiled or linked. By using this attribute, analysts can identify renamed instances that attackers can use with the intent of evading detections, application allowlists, and other security protections.
AutoIt is a scripting language and tool for automating tasks on Microsoft Windows operating systems. Due to its capabilities, malicious threat actors can abuse it to create malicious scripts and distribute malware.
This rule checks for renamed instances of AutoIt, which can indicate an attempt of evading detections, application allowlists, and other security protections.
Note: This investigation guide uses the Osquery Markdown Plugin introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
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.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Investigate any abnormal behavior by the subject process such as network connections, registry or file modifications, and any spawned child processes.
- Examine the host for derived artifacts that indicate suspicious activities:
- Analyze the process executable using a private sandboxed analysis system.
- Observe and collect information about the following activities in both the sandbox and the alert subject host:
- Attempts to contact external domains and addresses.
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process'
process.entity_id
. - Examine the DNS cache for suspicious or anomalous entries.
- $osquery_0
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process'
- Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
- Examine the host services for suspicious or anomalous entries.
- $osquery_1
- $osquery_2
- $osquery_3
- Attempts to contact external domains and addresses.
- Retrieve the files' SHA-256 hash values using the PowerShell
Get-FileHash
cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
False positive analysis
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
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.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- 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).
Related rules
- Adding Hidden File Attribute via Attrib
- Alternate Data Stream Creation/Execution at Volume Root Directory
- Attempt to Install Kali Linux via WSL
- Bypass UAC via Event Viewer
- Clearing Windows Console History