Latest alertCVE-2018-11776 in Apache Struts Confirmed Exploited in the WildRead
Search all news in the platform

Detection rule

Potential RipZip Attack on Startup Folder

HighTest-data validatedSigmaHQ (community)T1547

Overview

Detects a phishing attack which expands a ZIP file containing a malicious shortcut. If the victim expands the ZIP file via the explorer process, then the explorer process expands the malicious ZIP file and drops a malicious shortcut redirected to a backdoor into the Startup folder. Additionally, the file name of the malicious shortcut in Startup folder contains {0AFACED1-E828-11D1-9187-B532F1E9575D} meaning the folder shortcut operation.

Rule id
a6976974-ea6f-4e97-818e-ea08625c52cb
ATT&CK techniques
T1547 Boot or Logon Autostart Execution
Severity
High
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
n0n, The Gentlemen, qilin, safepay, nightspire

Validation

  1. ExperimentalSyntax checked only. Not yet tested on events.
  2. Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
  3. SIEM-validatedRun in a real SIEM, with a recorded result.

1 of 1 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.

Detection logic and queries

Queries are shown exactly as generated. Test them in your environment before you deploy them.

Sigma

Sigma (YAML) · a6976974-ea6f-4e97-818e-ea08625c52cb

Download
title: Potential RipZip Attack on Startup Folder
id: a6976974-ea6f-4e97-818e-ea08625c52cb
status: test
description: |
    Detects a phishing attack which expands a ZIP file containing a malicious shortcut.
    If the victim expands the ZIP file via the explorer process, then the explorer process expands the malicious ZIP file and drops a malicious shortcut redirected to a backdoor into the Startup folder.
    Additionally, the file name of the malicious shortcut in Startup folder contains {0AFACED1-E828-11D1-9187-B532F1E9575D} meaning the folder shortcut operation.
references:
    - https://twitter.com/jonasLyk/status/1549338335243534336?t=CrmPocBGLbDyE4p6zTX1cg&s=19
author: Greg (rule)
date: 2022-07-21
modified: 2023-01-05
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1547
logsource:
    category: file_event
    product: windows
detection:
    selection: # %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\target.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}\target.lnk
        TargetFilename|contains|all:
            - '\Microsoft\Windows\Start Menu\Programs\Startup'
            - '.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}'
        Image|endswith: '\explorer.exe'
    condition: selection
falsepositives:
    - Unknown
level: high

QRadar AQL

IBM QRadar AQL (hunting query)Hunting query

Hunting search for the Log Activity tab or the API. It is not a QRadar rule.

AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).

SELECT * FROM events WHERE devicetype=12 AND (LOWER(Filename) LIKE '%\microsoft\windows\start menu\programs\startup%' AND LOWER(Filename) LIKE '%.lnk.{0afaced1-e828-11d1-9187-b532f1e9575d}%') AND (LOWER("Process Path") LIKE '%\explorer.exe' OR LOWER("Process Name") LIKE '%\explorer.exe')

QRadar CRE

Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.

Rule name
OffSet7: Potential RipZip Attack on Startup Folder
Rule type
Event rule (Local)
Log source types
Microsoft Windows Security Event Log DSM: Sysmon EID 11 (FileCreate)

Building blocks

  • BB:OffSet7:Potential RipZip Attack on Startup Folder:selection (match)
    All test lines must match (AND).
    • Filename contains: \Microsoft\Windows\Start Menu\Programs\Startup, .lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}
    • Process Path / Process Name ends with: \explorer.exe

Main rule, option A (building blocks)

  1. when the event(s) were detected by one or more of these log source types: Microsoft Windows Security Event Log DSM: Sysmon EID 11 (FileCreate)
  2. when an event matches the condition built from these building blocks: BB:OffSet7:Potential RipZip Attack on Startup Folder:selection

Main rule, option B (AQL filter test)

  1. when the event matches this AQL filter query: devicetype=12 AND (LOWER(Filename) LIKE '%\microsoft\windows\start menu\programs\startup%' AND LOWER(Filename) LIKE '%.lnk.{0afaced1-e828-11d1-9187-b532f1e9575d}%') AND (LOWER("Process Path") LIKE '%\explorer.exe' OR LOWER("Process Name") LIKE '%\explorer.exe')

Rule response

  • Severity 7, credibility 6, relevance 7
  • Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
  • Respond no more than once per 30 minutes per Log Source (tune per environment)

Limitations

  • QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Splunk

Splunk SPLSearch

Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.

TargetFilename="*\\Microsoft\\Windows\\Start Menu\\Programs\\Startup*" TargetFilename="*.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}*" Image="*\\explorer.exe"

Splunk savedsearches.conf stanzaScheduled search template

Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.

[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now

[Potential RipZip Attack on Startup Folder]
description = Detects a phishing attack which expands a ZIP file containing a malicious shortcut.If the victim expands the ZIP file via the explorer process, then the explorer process expands the malicious ZIP file and drops a malicious shortcut redirected to a backdoor into the Startup folder.Additionally, the file name of the malicious shortcut in Startup folder contains {0AFACED1-E828-11D1-9187-B532F1E9575D} meaning the folder shortcut operation.
search = TargetFilename="*\\Microsoft\\Windows\\Start Menu\\Programs\\Startup*" TargetFilename="*.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}*" Image="*\\explorer.exe"

Microsoft Sentinel

Microsoft Sentinel KQL (ASIM)Hunting query

Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.

imFileEvent
| where (TargetFileName contains "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup" and TargetFileName contains ".lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}") and TargetFilePath endswith "\\explorer.exe"

Defender XDR

Microsoft Defender XDR KQLHunting query

Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.

DeviceFileEvents
| where (FolderPath contains "\\Microsoft\\Windows\\Start Menu\\Programs\\Startup" and FolderPath contains ".lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}") and InitiatingProcessFolderPath endswith "\\explorer.exe"

Elastic

Elastic Lucene (ECS)Hunting query

Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.

(file.path:*\\Microsoft\\Windows\\Start\ Menu\\Programs\\Startup* AND file.path:*.lnk.\{0AFACED1\-E828\-11D1\-9187\-B532F1E9575D\}*) AND process.executable:*\\explorer.exe

Elastic EQL (ECS)Hunting query

EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.

any where (file.path:"*\\Microsoft\\Windows\\Start Menu\\Programs\\Startup*" and file.path:"*.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}*") and process.executable:"*\\explorer.exe"

Elastic ES|QL (ECS)Hunting query

ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.

from * metadata _id, _index, _version | where file.path like "*\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup*" and file.path like "*.lnk.{0AFACED1-E828-11D1-9187-B532F1E9575D}*" and ends_with(process.executable, "\\explorer.exe")

Required telemetry

Log source
product: windows · category: file_event
Fields used
Image TargetFilename

False positives

  • Unknown

Investigation and response

No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.

References

Author and attribution

Author
Greg (rule)
Source
SigmaHQ · rules/windows/file/file_event/file_event_win_ripzip_attack.yml
Upstream commit
9688134317a2
Licence
Detection Rule License (DRL) 1.1

Version history

  1. Version 1Imported from SigmaHQ
  2. OffSet7 build · SigmaHQ 9688134317a2

Related rules