Skip to content

Commit e1205cb

Browse files
Samirbouseric-forte-elasticMikaayensonw0rk3r
authored
[New/Tuning] Windows Rules to detect top threats/TTPs 24/25 (#5001)
* [New/Tuning] Windows Top Threats 2024/2025 1) MSHTA: - tuning to exclude FPs - new rule `Remote Script via Microsoft HTML Application` compatible with 3d party EDR/sysmon/system/winlog integration and that does not require correlation or multiple type of events. 2) MSIEXEC: * Update defense_evasion_mshta_susp_child.toml * Update defense_evasion_script_via_html_app.toml * Update defense_evasion_mshta_susp_child.toml * Create defense_evasion_msiexec_remote_payload.toml * Update defense_evasion_msiexec_remote_payload.toml * ++ * Create execution_scripting_remote_webdav.toml * Create execution_windows_fakecaptcha_cmd_ps.toml * Create command_and_control_rmm_netsupport_susp_path.toml * Update command_and_control_rmm_netsupport_susp_path.toml * ++ * Update execution_jscript_fake_updates.toml * Create command_and_control_dns_susp_tld.toml * ++ * Create command_and_control_remcos_rat_iocs.toml * Update execution_windows_fakecaptcha_cmd_ps.toml * Update execution_scripts_archive_file.toml * Update defense_evasion_masquerading_renamed_autoit.toml * ++ * Create execution_nodejs_susp_patterns.toml * Update execution_nodejs_susp_patterns.toml * Update execution_windows_fakecaptcha_cmd_ps.toml * Fix unit test errors * Update defense_evasion_network_connection_from_windows_binary.toml * Add system index * Add tag * Update rules/windows/command_and_control_remcos_rat_iocs.toml Co-authored-by: Mika Ayenson, PhD <[email protected]> * Remove duplicate * Update defense_evasion_msiexec_child_proc_netcon.toml * Update defense_evasion_masquerading_renamed_autoit.toml * Update defense_evasion_masquerading_renamed_autoit.toml * Update defense_evasion_masquerading_renamed_autoit.toml * Create credential_access_browsers_unusual_parent.toml * Update credential_access_browsers_unusual_parent.toml * ++ * Update defense_evasion_masquerading_renamed_autoit.toml * Update rules/windows/command_and_control_dns_susp_tld.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_remcos_rat_iocs.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/defense_evasion_mshta_susp_child.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/discovery_host_public_ip_address_lookup.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/discovery_host_public_ip_address_lookup.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/execution_windows_phish_clickfix.toml Co-authored-by: Jonhnathan <[email protected]> * Update discovery_host_public_ip_address_lookup.toml * Update execution_windows_phish_clickfix.toml * Update rules/windows/defense_evasion_script_via_html_app.toml * Update rules/windows/command_and_control_dns_susp_tld.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/discovery_host_public_ip_address_lookup.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_dns_susp_tld.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/credential_access_browsers_unusual_parent.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_dns_susp_tld.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/defense_evasion_msiexec_child_proc_netcon.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/discovery_host_public_ip_address_lookup.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/defense_evasion_msiexec_child_proc_netcon.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/discovery_host_public_ip_address_lookup.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/defense_evasion_msiexec_child_proc_netcon.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/execution_nodejs_susp_patterns.toml Co-authored-by: Jonhnathan <[email protected]> * Update discovery_host_public_ip_address_lookup.toml * Update rules/windows/command_and_control_dns_susp_tld.toml Co-authored-by: Jonhnathan <[email protected]> * Update defense_evasion_masquerading_renamed_autoit.toml * Update defense_evasion_script_via_html_app.toml --------- Co-authored-by: eric-forte-elastic <[email protected]> Co-authored-by: Eric Forte <[email protected]> Co-authored-by: Mika Ayenson, PhD <[email protected]> Co-authored-by: Jonhnathan <[email protected]>
1 parent b2bc602 commit e1205cb

18 files changed

+1708
-20
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
[metadata]
2+
creation_date = "2025/08/20"
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "crowdstrike"]
4+
maturity = "production"
5+
updated_date = "2025/08/20"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Identifies DNS queries to commonly abused Top Level Domains by common LOLBINs or executable running from world writable
11+
directories or unsigned binaries. This behavior matches on common malware C2 abusing less formal domain names.
12+
"""
13+
from = "now-9m"
14+
index = [
15+
"endgame-*",
16+
"logs-endpoint.events.network-*",
17+
"logs-sentinel_one_cloud_funnel.*",
18+
"logs-crowdstrike.fdr*",
19+
"logs-windows.sysmon_operational-*",
20+
"winlogbeat-*"
21+
]
22+
language = "eql"
23+
license = "Elastic License v2"
24+
name = "Network Activity to a Suspicious Top Level Domain"
25+
note = """## Triage and analysis
26+
27+
### Investigating Network Activity to a Suspicious Top Level Domain
28+
29+
#### Possible investigation steps
30+
31+
- Investigate the process execution chain (parent process tree) for unknown processes or malicious scripts.
32+
- Review if the domain reputation and the frequency of network activities as well as any download/upload activity.
33+
- Verify if the executed process is persistent on the host like common mechanisms Startup folder, task or Run key.
34+
- Investigate other alerts associated with the user/host during the past 48 hours.
35+
- Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.
36+
37+
### False positive analysis
38+
39+
- Trusted domain from an expected process running in the environment.
40+
41+
### Response and remediation
42+
43+
- Initiate the incident response process based on the outcome of the triage.
44+
- Isolate the involved host to prevent further post-compromise behavior.
45+
- Immediately block the identified indicators of compromise (IoCs).
46+
- Implement any temporary network rules, procedures, and segmentation required to contain the attack.
47+
- 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.
48+
- Update firewall rules to be more restrictive.
49+
- Reimage the host operating system or restore the compromised files to clean versions.
50+
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
51+
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
52+
- 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).
53+
"""
54+
references = ["https://www.cybercrimeinfocenter.org/top-20-tlds-by-malicious-phishing-domains"]
55+
risk_score = 73
56+
rule_id = "e516bf56-d51b-43e8-91ec-9e276331f433"
57+
severity = "high"
58+
tags = [
59+
"Domain: Endpoint",
60+
"OS: Windows",
61+
"Use Case: Threat Detection",
62+
"Tactic: Command and Control",
63+
"Resources: Investigation Guide",
64+
"Data Source: Elastic Endgame",
65+
"Data Source: Elastic Defend",
66+
"Data Source: Windows Security Event Logs",
67+
"Data Source: SentinelOne",
68+
"Data Source: Crowdstrike",
69+
"Data Source: Sysmon",
70+
]
71+
timestamp_override = "event.ingested"
72+
type = "eql"
73+
74+
query = '''
75+
network where host.os.type == "windows" and dns.question.name != null and
76+
(
77+
process.name : ("MSBuild.exe", "mshta.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "msiexec.exe", "rundll32.exe",
78+
"bitsadmin.exe", "InstallUtil.exe", "python.exe", "regsvr32.exe", "dllhost.exe", "node.exe",
79+
"java.exe", "javaw.exe", "*.pif", "*.com", "*.scr") or
80+
?process.code_signature.trusted != true or
81+
?process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "Python Software Foundation") or
82+
process.executable : ("?:\\Users\\*.exe", "", "?:\\ProgramData\\*.exe")
83+
) and
84+
dns.question.name regex """.*\.(top|buzz|xyz|rest|ml|cf|gq|ga|onion|monster|cyou|quest|cc|bar|cfd|click|cam|surf|tk|shop|club|icu|pw|ws|online|fun|life|boats|store|hair|skin|motorcycles|christmas|lol|makeup|mom|bond|beauty|biz|live|work|zip|country|accountant|date|party|science|loan|win|men|faith|review|racing|download|host)"""
85+
'''
86+
87+
88+
[[rule.threat]]
89+
framework = "MITRE ATT&CK"
90+
[[rule.threat.technique]]
91+
id = "T1071"
92+
name = "Application Layer Protocol"
93+
reference = "https://attack.mitre.org/techniques/T1071/"
94+
[[rule.threat.technique.subtechnique]]
95+
id = "T1071.004"
96+
name = "DNS"
97+
reference = "https://attack.mitre.org/techniques/T1071/004/"
98+
99+
100+
[rule.threat.tactic]
101+
id = "TA0011"
102+
name = "Command and Control"
103+
reference = "https://attack.mitre.org/tactics/TA0011/"
104+
105+
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[metadata]
2+
creation_date = "2025/08/20"
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system"]
4+
maturity = "production"
5+
updated_date = "2025/08/20"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Identifies known execution traces of the REMCOS Remote Access Trojan. Remcos RAT is used by attackers to perform actions on infected machines remotely.
11+
"""
12+
from = "now-9m"
13+
index = [
14+
"endgame-*",
15+
"logs-endpoint.events.registry-*",
16+
"logs-endpoint.events.file-*",
17+
"logs-m365_defender.event-*",
18+
"logs-sentinel_one_cloud_funnel.*",
19+
"logs-system.security*",
20+
"logs-windows.sysmon_operational-*",
21+
"winlogbeat-*",
22+
]
23+
language = "eql"
24+
license = "Elastic License v2"
25+
name = "Potential REMCOS Trojan Execution"
26+
note = """## Triage and analysis
27+
28+
### Investigating Potential REMCOS Trojan Execution
29+
30+
Remcos RAT is used by attackers to perform actions on infected machines remotely.
31+
32+
### Possible investigation steps
33+
34+
- Review the origin of the REMCOS file and the execution chain to identify the initial vector..
35+
- Examine if the process is set to persist in the affected system via scheduled task, Startup folder or Run key.
36+
- Check the network, files and child processes activity associated with the every suspicious process in the execution chain of REMCOS.
37+
- Correlate the event with other security alerts or logs from data sources like Elastic Defend or Microsoft Defender for Endpoint to gather additional context and identify any related malicious activities.
38+
39+
### Response and remediation
40+
41+
- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the attacker.
42+
- Terminate any suspicious processes identified in the alert, such as PowerShell, cmd.exe, or other flagged executables, to halt any ongoing malicious activity.
43+
- Review and revoke any unauthorized user accounts or privileges that may have been created or modified using tools like net.exe or schtasks.exe.
44+
- Conduct a thorough scan of the affected system using endpoint protection tools to identify and remove any malware or unauthorized software installed by the attacker.
45+
- Restore the system from a known good backup if any critical system files or configurations have been altered or compromised.
46+
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
47+
- Implement enhanced monitoring and logging for ScreenConnect and other remote access tools to detect similar activities in the future, ensuring that alerts are promptly reviewed and acted upon."""
48+
references = [
49+
"https://any.run/malware-trends/remcos",
50+
"https://attack.mitre.org/software/S0332/",
51+
"https://www.elastic.co/security-labs/exploring-the-ref2731-intrusion-set"
52+
]
53+
risk_score = 73
54+
rule_id = "d8b2f85a-cf1c-40fc-acf0-bb5d588a8ea6"
55+
severity = "high"
56+
tags = [
57+
"Domain: Endpoint",
58+
"OS: Windows",
59+
"Use Case: Threat Detection",
60+
"Tactic: Command and Control",
61+
"Resources: Investigation Guide",
62+
"Data Source: Elastic Endgame",
63+
"Data Source: Elastic Defend",
64+
"Data Source: Sysmon",
65+
"Data Source: SentinelOne",
66+
"Data Source: Microsoft Defender for Endpoint",
67+
"Data Source: Windows Security Event Logs"
68+
]
69+
timestamp_override = "event.ingested"
70+
type = "eql"
71+
72+
query = '''
73+
any where host.os.type == "windows" and
74+
(
75+
(event.category == "file" and event.type == "deletion" and file.path like "C:\\Users\\*\\AppData\\Local\\Temp\\TH????.tmp") or
76+
77+
(event.category == "file" and file.path : "?:\\Users\\*\\AppData\\Roaming\\remcos\\logs.dat") or
78+
79+
(event.category == "registry" and
80+
registry.value : ("Remcos", "Rmc-??????", "licence") and
81+
registry.path : (
82+
"*\\Windows\\CurrentVersion\\Run\\Remcos",
83+
"*\\Windows\\CurrentVersion\\Run\\Rmc-??????",
84+
"*\\SOFTWARE\\Remcos-*\\licence",
85+
"*\\Software\\Rmc-??????\\licence"
86+
)
87+
)
88+
)
89+
'''
90+
91+
92+
[[rule.threat]]
93+
framework = "MITRE ATT&CK"
94+
[[rule.threat.technique]]
95+
id = "T1219"
96+
name = "Remote Access Tools"
97+
reference = "https://attack.mitre.org/techniques/T1219/"
98+
99+
100+
[rule.threat.tactic]
101+
id = "TA0011"
102+
name = "Command and Control"
103+
reference = "https://attack.mitre.org/tactics/TA0011/"
104+
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[metadata]
2+
creation_date = "2025/08/20"
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel", "m365_defender", "system", "crowdstrike"]
4+
maturity = "production"
5+
updated_date = "2025/08/20"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
Identifies execution of the NetSupport remote access software from non-default paths. Adversaries may abuse NetSupport
11+
Manager to control a target victim machine.
12+
"""
13+
from = "now-9m"
14+
index = [
15+
"endgame-*",
16+
"logs-crowdstrike.fdr*",
17+
"logs-endpoint.events.process-*",
18+
"logs-m365_defender.event-*",
19+
"logs-sentinel_one_cloud_funnel.*",
20+
"logs-system.security*",
21+
"logs-windows.sysmon_operational-*",
22+
"winlogbeat-*",
23+
]
24+
language = "eql"
25+
license = "Elastic License v2"
26+
name = "NetSupport Manager Execution from an Unusual Path"
27+
note = """## Triage and analysis
28+
29+
### Investigating NetSupport Manager Execution from an Unusual Path
30+
31+
NetSupport Manager, is a remote access tool, facilitates legitimate remote support but can be exploited by adversaries to execute unauthorized commands.
32+
33+
### Possible investigation steps
34+
35+
- Review the origin of the NetSupport file and if it's related to an authorized IT Support case.
36+
- Examine if the NetSupport process is set to persist in the affected system via scheduled task, Startup folder or Run key.
37+
- Check the network, files and child processes activity associated with the NetSupport client32.exe process.
38+
- Correlate the event with other security alerts or logs from data sources like Elastic Defend or Microsoft Defender for Endpoint to gather additional context and identify any related malicious activities.
39+
40+
### False positive analysis
41+
42+
- Legitimate IT support activities using NetSupport by IT support accounts.
43+
44+
### Response and remediation
45+
46+
- Immediately isolate the affected system from the network to prevent further unauthorized access or lateral movement by the attacker.
47+
- Terminate any suspicious processes identified in the alert, such as PowerShell, cmd.exe, or other flagged executables, to halt any ongoing malicious activity.
48+
- Review and revoke any unauthorized user accounts or privileges that may have been created or modified using tools like net.exe or schtasks.exe.
49+
- Conduct a thorough scan of the affected system using endpoint protection tools to identify and remove any malware or unauthorized software installed by the attacker.
50+
- Restore the system from a known good backup if any critical system files or configurations have been altered or compromised.
51+
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to determine if additional systems are affected.
52+
- Implement enhanced monitoring and logging for ScreenConnect and other remote access tools to detect similar activities in the future, ensuring that alerts are promptly reviewed and acted upon."""
53+
references = [
54+
"https://www.netsupportsoftware.com/",
55+
]
56+
risk_score = 73
57+
rule_id = "5f73aef2-7abc-4fd9-ac0d-ab8ec3e13891"
58+
severity = "high"
59+
tags = [
60+
"Domain: Endpoint",
61+
"OS: Windows",
62+
"Use Case: Threat Detection",
63+
"Tactic: Command and Control",
64+
"Resources: Investigation Guide",
65+
"Data Source: Elastic Endgame",
66+
"Data Source: Elastic Defend",
67+
"Data Source: Sysmon",
68+
"Data Source: SentinelOne",
69+
"Data Source: Microsoft Defender for Endpoint",
70+
"Data Source: Windows Security Event Logs",
71+
"Data Source: Crowdstrike",
72+
]
73+
timestamp_override = "event.ingested"
74+
type = "eql"
75+
76+
query = '''
77+
process where host.os.type == "windows" and event.type == "start" and
78+
(process.name : "client32.exe" or ?process.pe.original_file_name == "client32.exe" or process.parent.name : "client32.exe") and
79+
(
80+
process.executable :
81+
("?:\\Users\\*.exe",
82+
"?:\\ProgramData\\*.exe",
83+
"\\Device\\HarddiskVolume?\\Users\\*.exe",
84+
"\\Device\\HarddiskVolume?\\ProgramData\\*.exe") or
85+
?process.parent.executable : ("?:\\Users\\*\\client32.exe", "?:\\ProgramData\\*\\client32.exe")
86+
)
87+
'''
88+
89+
90+
[[rule.threat]]
91+
framework = "MITRE ATT&CK"
92+
[[rule.threat.technique]]
93+
id = "T1219"
94+
name = "Remote Access Tools"
95+
reference = "https://attack.mitre.org/techniques/T1219/"
96+
97+
98+
[rule.threat.tactic]
99+
id = "TA0011"
100+
name = "Command and Control"
101+
reference = "https://attack.mitre.org/tactics/TA0011/"
102+

0 commit comments

Comments
 (0)