3726611b93
* [Tuning] Windows BruteForce Rules Tuning #1 Multiple Logon Failure from the same Source Address: converted to ES|QL and raised the threshold to 100 failed auths, alert quality should be better since it aggregates all failed auths info into one alert vs multiple EQL matches. (expected reduction more than 50%) #2 Privileged Account Brute Force - coverted to ESQL and set the threshold to 50 in a minute. this should drop noise volume by more than 50%. * ++ * Update execution_shell_evasion_linux_binary.toml * Update execution_shell_evasion_linux_binary.toml * Update defense_evasion_indirect_exec_forfiles.toml * Update lateral_movement_remote_file_copy_hidden_share.toml * Update lateral_movement_remote_file_copy_hidden_share.toml * Update persistence_service_windows_service_winlog.toml * Update credential_access_lsass_openprocess_api.toml * Update persistence_suspicious_scheduled_task_runtime.toml * Update impact_hosts_file_modified.toml * Update defense_evasion_process_termination_followed_by_deletion.toml * Update rules/windows/credential_access_lsass_openprocess_api.toml * Update rules/windows/credential_access_bruteforce_admin_account.toml Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> * Update rules/windows/credential_access_lsass_openprocess_api.toml Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> * Update rules/windows/credential_access_bruteforce_multiple_logon_failure_same_srcip.toml Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> * Update credential_access_lsass_openprocess_api.toml * Update impact_hosts_file_modified.toml * Update credential_access_dollar_account_relay.toml * Update credential_access_new_terms_secretsmanager_getsecretvalue.toml --------- Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
94 lines
3.7 KiB
TOML
94 lines
3.7 KiB
TOML
[metadata]
|
|
creation_date = "2025/02/03"
|
|
integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
|
|
maturity = "production"
|
|
updated_date = "2025/12/11"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Detects attempts to execute a command via the forfiles Windows utility. Adversaries may use this utility to proxy
|
|
execution via a trusted parent process.
|
|
"""
|
|
from = "now-9m"
|
|
index = [
|
|
"endgame-*",
|
|
"logs-crowdstrike.fdr*",
|
|
"logs-endpoint.events.process-*",
|
|
"logs-m365_defender.event-*",
|
|
"logs-sentinel_one_cloud_funnel.*",
|
|
"logs-system.security*",
|
|
"logs-windows.forwarded*",
|
|
"logs-windows.sysmon_operational-*",
|
|
"winlogbeat-*",
|
|
]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "Command Execution via ForFiles"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating Command Execution via ForFiles
|
|
|
|
### Possible investigation steps
|
|
|
|
- Identify the user account that performed the action and whether it should perform this kind of action.
|
|
- Contact the account owner and confirm whether they are aware of this activity.
|
|
- Investigate other alerts associated with the user/host during the past 48 hours.
|
|
- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
|
|
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
|
|
|
|
### False positive analysis
|
|
|
|
- This is a dual-use tool, meaning its usage is not inherently malicious. Analysts can dismiss the alert if the administrator is aware of the activity, no other suspicious activity was identified.
|
|
|
|
### 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 antimalware scan. This may 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.
|
|
- 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).
|
|
"""
|
|
references = ["https://lolbas-project.github.io/lolbas/Binaries/Forfiles/"]
|
|
risk_score = 47
|
|
rule_id = "3f7bd5ac-9711-44b4-82c1-fa246d829f15"
|
|
severity = "medium"
|
|
tags = [
|
|
"Domain: Endpoint",
|
|
"OS: Windows",
|
|
"Use Case: Threat Detection",
|
|
"Tactic: Defense Evasion",
|
|
"Data Source: Elastic Endgame",
|
|
"Data Source: Elastic Defend",
|
|
"Data Source: Windows Security Event Logs",
|
|
"Data Source: Microsoft Defender for Endpoint",
|
|
"Data Source: Sysmon",
|
|
"Data Source: SentinelOne",
|
|
"Data Source: Crowdstrike",
|
|
"Resources: Investigation Guide",
|
|
]
|
|
timestamp_override = "event.ingested"
|
|
type = "eql"
|
|
|
|
query = '''
|
|
process where host.os.type == "windows" and event.type == "start" and user.id != "S-1-5-18" and
|
|
(process.name : "forfiles.exe" or ?process.pe.original_file_name == "forfiles.exe") and process.args : ("/c", "-c") and
|
|
not process.args : ("-d", "/d", "cmd /c copy @file*", "cmd /c DEL /Q /F @*", "cmd /c del @*", "D:\\*")
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1202"
|
|
name = "Indirect Command Execution"
|
|
reference = "https://attack.mitre.org/techniques/T1202/"
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0005"
|
|
name = "Defense Evasion"
|
|
reference = "https://attack.mitre.org/tactics/TA0005/"
|
|
|