Detection rules › Elastic

Malicious Reputation of Executable Download

Source
github.com/elastic/protections-artifacts

Identifies Windows executable files that have been recently downloaded and have a malicious reputation. Attackers may rely upon a user downloading and opening a file in order for their malicious code to execute and gain initial access to an endpoint. Users may be subjected to social engineering to get them to open a file that will lead to code execution.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies Windows executable files that have been recently downloaded and have a malicious reputation. Attackers may
rely upon a user downloading and opening a file in order for their malicious code to execute and gain initial access to
an endpoint. Users may be subjected to social engineering to get them to open a file that will lead to code execution.
"""
id = "4348dc5e-b7de-4aa5-b6f1-20496f72547b"
license = "Elastic License v2"
name = "Malicious Reputation of Executable Download"
os_list = ["windows"]
version = "1.0.7"

query = '''
process where event.action == "start" and
 (process.Ext.relative_file_creation_time <= 1800 or process.Ext.relative_file_name_modify_time <= 1800) and
 (process.code_signature.trusted == false or process.code_signature.exists == false) and
 not process.code_signature.status : ("errorExpired", "errorCode_endpoint*") and

  (process.executable : ("?:\\Users\\*\\Downloads\\*", "*\\AppData\\Local\\Temp\\*", "?:\\Users\\*\\Desktop\\*") and
  /* Direct Child */
   process.parent.name : ("explorer.exe", "chrome.exe", "msedge.exe", "firefox.exe", "7zFM.exe", "iexplore.exe", "winrar.exe"))
'''

min_endpoint_version = "8.10.0"
reputation = true
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"

[internal]
min_endpoint_version = "8.10.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 (process.Ext.relative_file_creation_time <= 1800 or process.Ext.relative_file_name_modify_time <= 1800) and
 (process.code_signature.trusted == false or process.code_signature.exists == false) and
 not process.code_signature.status : ("errorExpired", "errorCode_endpoint*") and
  (process.executable : ("?:\\Users\\*\\Downloads\\*", "*\\AppData\\Local\\Temp\\*", "?:\\Users\\*\\Desktop\\*") and
   process.parent.name : ("explorer.exe", "chrome.exe", "msedge.exe", "firefox.exe", "7zFM.exe", "iexplore.exe", "winrar.exe"))

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.relative_file_creation_timele
  • 1800 transforms: number corpus 6 (elastic 6)
field:"process.Ext.relative_file_creation_time" kind:le value:"1800"
process.Ext.relative_file_name_modify_timele
  • 1800 transforms: number corpus 6 (elastic 6)
field:"process.Ext.relative_file_name_modify_time" kind:le value:"1800"
process.code_signature.existseq
  • false transforms: boolean corpus 119 (elastic 119)
field:"process.code_signature.exists" kind:eq value:"false"
process.code_signature.trustedeq
  • false transforms: boolean corpus 115 (elastic 115)
field:"process.code_signature.trusted" kind:eq value:"false"
process.executablewildcard
  • *\AppData\Local\Temp\* corpus 10 (sigma 10)
  • ?:\Users\*\Desktop\* corpus 3 (elastic 3)
  • ?:\Users\*\Downloads\* corpus 12 (elastic 12)
field:"Image" kind:wildcard
process.parent.namewildcard
  • 7zFM.exe corpus 12 (elastic 12)
  • chrome.exe corpus 9 (elastic 9)
  • explorer.exe corpus 51 (elastic 50, splunk 1)
  • firefox.exe corpus 9 (elastic 9)
  • iexplore.exe corpus 8 (elastic 8)
  • msedge.exe corpus 7 (elastic 7)
  • winrar.exe corpus 15 (elastic 14, splunk 1)
field:"parent_process_name" kind:wildcard