Executable File Creation with Multiple Extensions
editExecutable File Creation with Multiple Extensions
editMasquerading can allow an adversary to evade defenses and better blend in with the environment. One way it occurs is when the name or location of a file is manipulated as a means of tricking a user into executing what they think is a benign file type but is actually executable code.
Rule type: eql
Rule indices:
- winlogbeat-*
- logs-endpoint.events.*
- logs-windows.*
Severity: medium
Risk score: 47
Runs every: 5 minutes
Searches indices from: now-9m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
Tags:
- Elastic
- Host
- Windows
- Threat Detection
- Defense Evasion
Version: 6 (version history)
Added (Elastic Stack release): 7.12.0
Last modified (Elastic Stack release): 8.4.0
Rule authors: Elastic
Rule license: Elastic License v2
Investigation guide
editRule query
editfile where event.type == "creation" and file.extension : "exe" and file.name regex~ """.*\.(vbs|vbe|bat|js|cmd|wsh|ps1|pdf|docx?|xlsx?|pp tx?|txt|rtf|gif|jpg|png|bmp|hta|txt|img|iso)\.exe""" and not (process.executable : ("?:\\Windows\\System32\\msiexec.exe", "C:\\Users\\*\\QGIS_SCCM\\Files\\QGIS-OSGeo4W-*-Setup-x86_64.exe") and file.path : "?:\\Program Files\\QGIS *\\apps\\grass\\*.exe") and not process.executable : ("/bin/sh", "/usr/sbin/MailScanner", "/usr/bin/perl")
Threat mapping
editFramework: MITRE ATT&CKTM
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Masquerading
- ID: T1036
- Reference URL: https://attack.mitre.org/techniques/T1036/
-
Tactic:
- Name: Execution
- ID: TA0002
- Reference URL: https://attack.mitre.org/tactics/TA0002/
-
Technique:
- Name: User Execution
- ID: T1204
- Reference URL: https://attack.mitre.org/techniques/T1204/
Rule version history
edit- Version 6 (8.4.0 release)
-
-
Updated query, changed from:
file where event.type == "creation" and file.extension : "exe" and file.name regex~ """.*\.(vbs|vbe|bat|js|cmd|wsh|ps1|pdf|docx?|xlsx?|pp tx?|txt|rtf|gif|jpg|png|bmp|hta|txt|img|iso)\.exe"""
-
- Version 4 (8.2.0 release)
-
- Formatting only
- Version 3 (7.16.0 release)
-
- Formatting only
- Version 2 (7.14.0 release)
-
-
Updated query, changed from:
file where event.type == "creation" and file.extension:"exe" and file.name: ( "*.vbs.exe", "*.vbe.exe", "*.bat.exe", "*.js.exe", "*.cmd.exe", "*.wsh.exe", "*.ps1.exe", "*.pdf.exe", "*.docx.exe", "*.doc.exe", "*.xlsx.exe", "*.xls.exe", "*.pptx.exe", "*.ppt.exe", "*.txt.exe", "*.rtf.exe", "*.gif.exe", "*.jpg.exe", "*.png.exe", "*.bmp.exe", "*.hta.exe", "*.txt.exe", "*.img.exe", "*.iso.exe" )
-