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

Detection rule

Compress Data and Lock With Password for Exfiltration With 7-ZIP

MediumTest-data validatedSigmaHQ (community)T1560.001

Overview

An adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party utilities

Rule id
9fbf5927-5261-4284-a71d-f681029ea574
ATT&CK techniques
T1560.001 Archive Collected Data: Archive via Utility
Severity
Medium
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
qilin, INC Ransom, Akira, safepay, Play, 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.

3 of 3 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) · 9fbf5927-5261-4284-a71d-f681029ea574

Download
title: Compress Data and Lock With Password for Exfiltration With 7-ZIP
id: 9fbf5927-5261-4284-a71d-f681029ea574
status: test
description: An adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party utilities
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1560.001/T1560.001.md
author: frack113
date: 2021-07-27
modified: 2026-06-05
tags:
    - attack.collection
    - attack.t1560.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Description|contains: '7-Zip'
        - Image|endswith:
              - '\7z.exe'
              - '\7zr.exe'
              - '\7za.exe'
        - OriginalFileName:
              - '7z.exe'
              - '7za.exe'
              - '7zr.exe'
    selection_password:
        CommandLine|contains: ' -p'
    selection_action:
        CommandLine|contains:
            - ' a '
            - ' u '
    condition: all of selection_*
falsepositives:
    - Legitimate activity is expected since compressing files with a password is common.
level: medium

QRadar CRE

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

Rule name
OffSet7: Compress Data and Lock With Password for Exfiltration With 7-ZIP
Rule type
Event rule (Local)
Log source types
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

Building blocks

  • BB:OffSet7:Compress Data and Lock With Password for Exfiltr:selection_img (match)
    Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
    • custom property needed: Description contains: 7-Zip
      No QRadar property mapped for "Description": create a custom event property (regex or JSON) on the DSM first.
    • Process Path / Process Name ends with: \7z.exe, \7zr.exe, \7za.exe
    • Filename is equal to (case-insensitive): 7z.exe, 7za.exe, 7zr.exe
  • BB:OffSet7:Compress Data and Lock With Password for Exfiltr:selection_password (match)
    All test lines must match (AND).
    • Command contains: -p
  • BB:OffSet7:Compress Data and Lock With Password for Exfiltr:selection_action (match)
    All test lines must match (AND).
    • Command contains: a, u

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: Security 4688 (with command-line auditing) or Sysmon EID 1
  2. when an event matches the condition built from these building blocks: (ALL of [BB:OffSet7:Compress Data AND Lock With Password for Exfiltr:selection_img, BB:OffSet7:Compress Data AND Lock With Password for Exfiltr:selection_password, BB:OffSet7:Compress Data AND Lock With Password for Exfiltr:selection_action])

Main rule, option B (AQL filter test)

Not available: the AQL conversion failed for this rule.

Rule response

  • Severity 5, 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

  • AQL conversion failed (field 'Description' is not supported); only the building-block design is available.
  • 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.

(Description="*7-Zip*" OR Image IN ("*\\7z.exe", "*\\7zr.exe", "*\\7za.exe") OR OriginalFileName IN ("7z.exe", "7za.exe", "7zr.exe")) CommandLine="* -p*" (CommandLine IN ("* a *", "* u *"))

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

[Compress Data and Lock With Password for Exfiltration With 7-ZIP]
description = An adversary may compress or encrypt data that is collected prior to exfiltration using 3rd party utilities
search = (Description="*7-Zip*" OR Image IN ("*\\7z.exe", "*\\7zr.exe", "*\\7za.exe") OR OriginalFileName IN ("7z.exe", "7za.exe", "7zr.exe")) CommandLine="* -p*" (CommandLine IN ("* a *", "* u *"))

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.

imProcessCreate
| where (TargetProcessFileDescription contains "7-Zip" or (TargetProcessName endswith "\\7z.exe" or TargetProcessName endswith "\\7zr.exe" or TargetProcessName endswith "\\7za.exe") or (TargetProcessFileOriginalName in~ ("7z.exe", "7za.exe", "7zr.exe"))) and TargetProcessCommandLine contains " -p" and (TargetProcessCommandLine contains " a " or TargetProcessCommandLine contains " u ")

Defender XDR

Microsoft Defender XDR KQLHunting query

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

DeviceProcessEvents
| where (ProcessVersionInfoFileDescription contains "7-Zip" or (FolderPath endswith "\\7z.exe" or FolderPath endswith "\\7zr.exe" or FolderPath endswith "\\7za.exe") or (ProcessVersionInfoOriginalFileName in~ ("7z.exe", "7za.exe", "7zr.exe"))) and ProcessCommandLine contains " -p" and (ProcessCommandLine contains " a " or ProcessCommandLine contains " u ")

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.

(process.pe.description:*7\-Zip* OR (process.executable:(*\\7z.exe OR *\\7zr.exe OR *\\7za.exe)) OR (process.pe.original_file_name:(7z.exe OR 7za.exe OR 7zr.exe))) AND process.command_line:*\ \-p* AND (process.command_line:(*\ a\ * OR *\ u\ *))

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 (process.pe.description:"*7-Zip*" or (process.executable like~ ("*\\7z.exe", "*\\7zr.exe", "*\\7za.exe")) or (process.pe.original_file_name like~ ("7z.exe", "7za.exe", "7zr.exe"))) and process.command_line:"* -p*" and (process.command_line like~ ("* a *", "* u *"))

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 (process.pe.description like "*7-Zip*" or ends_with(process.executable, "\\7z.exe") or ends_with(process.executable, "\\7zr.exe") or ends_with(process.executable, "\\7za.exe") or process.pe.original_file_name in ("7z.exe", "7za.exe", "7zr.exe")) and process.command_line like "* -p*" and (process.command_line like "* a *" or process.command_line like "* u *")

No working conversion: IBM QRadar AQL (hunting query) (QRadar AQL backend has no property mapping for field "Description")

Required telemetry

Log source
product: windows · category: process_creation
Fields used
CommandLine Description Image OriginalFileName

False positives

  • Legitimate activity is expected since compressing files with a password is common.

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
frack113
Source
SigmaHQ · rules/windows/process_creation/proc_creation_win_7zip_password_compression.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