Detection rules › Elastic

Suspicious Shortcut File Overwrite

Source
github.com/elastic/protections-artifacts

Identifies the overwrite of a Windows shortcut (lnk) file by processes that defaults to handle archive extraction. This could be the result of an attempt to bypass bypass Microsoft SmartScreen protection.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies the overwrite of a Windows shortcut (lnk) file by processes that defaults to handle archive extraction. This
could be the result of an attempt to bypass bypass Microsoft SmartScreen protection.
"""
id = "7e1113a3-8f6a-4450-a95e-343c0c75a639"
license = "Elastic License v2"
name = "Suspicious Shortcut File Overwrite"
os_list = ["windows"]
reference = ["https://www.elastic.co/security-labs/dismantling-smart-app-control"]
version = "1.0.4"

query = '''
file where event.action == "overwrite" and file.extension : "lnk" and
 process.name :("explorer.exe", "7zFM.exe", "WinRAR.exe", "Bandizip.exe") and file.Ext.header_bytes : "4c0000000114020000000000c0000000" and
 process.thread.Ext.call_stack_summary : "ntdll.dll|*|windows.storage.dll|shell32.dll|*" and
 (
  file.path : ("?:\\Users\\*\\Downloads\\*.lnk", "?:\\Users\\*\\AppData\\Local\\Temp\\*.lnk") or
  file.Ext.windows.zone_identifier == 3
  ) and
  not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*windows.storage.dll!RebaseOnVolumeID*")
'''

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"

[[threat.technique.subtechnique]]
id = "T1566.002"
name = "Spearphishing Link"
reference = "https://attack.mitre.org/techniques/T1566/002/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.001"
name = "Malicious Link"
reference = "https://attack.mitre.org/techniques/T1204/001/"



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

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Stage 1: file

file where event.action == "overwrite" and file.extension : "lnk" and
 process.name :("explorer.exe", "7zFM.exe", "WinRAR.exe", "Bandizip.exe") and file.Ext.header_bytes : "4c0000000114020000000000c0000000" and
 process.thread.Ext.call_stack_summary : "ntdll.dll|*|windows.storage.dll|shell32.dll|*" and
 (
  file.path : ("?:\\Users\\*\\Downloads\\*.lnk", "?:\\Users\\*\\AppData\\Local\\Temp\\*.lnk") or
  file.Ext.windows.zone_identifier == 3
  ) and
  not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info: "*windows.storage.dll!RebaseOnVolumeID*")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • overwrite corpus 8 (elastic 8)
field:"EventType" kind:eq value:"overwrite"
file.Ext.header_byteswildcard
  • 4c0000000114020000000000c0000000 corpus 2 (elastic 2)
field:"file.Ext.header_bytes" kind:wildcard value:"4c0000000114020000000000c0000000"
file.Ext.windows.zone_identifiereq
  • 3 transforms: number corpus 6 (elastic 6)
field:"file.Ext.windows.zone_identifier" kind:eq value:"3"
file.extensionwildcard
  • lnk corpus 9 (elastic 9)
field:"file.extension" kind:wildcard value:"lnk"
file.pathwildcard
  • ?:\Users\*\AppData\Local\Temp\*.lnk corpus 2 (elastic 2)
  • ?:\Users\*\Downloads\*.lnk corpus 2 (elastic 2)
field:"TargetFilename" kind:wildcard
process.namewildcard
  • 7zFM.exe corpus 7 (elastic 7)
  • Bandizip.exe corpus 5 (elastic 5)
  • WinRAR.exe corpus 9 (elastic 9)
  • explorer.exe corpus 21 (elastic 19, splunk 2)
field:"process_name" kind:wildcard
process.thread.Ext.call_stack_summarywildcard
  • ntdll.dll|*|windows.storage.dll|shell32.dll|* corpus 2 (elastic 2)
field:"process.thread.Ext.call_stack_summary" kind:wildcard value:"ntdll.dll|*|windows.storage.dll|shell32.dll|*"