Detection rules › Sigma

Potential CVE-2022-29072 Exploitation Attempt

Status
test
Severity
high
Log source
product windows, category process_creation
Author
frack113, @kostastsale
Source
github.com/SigmaHQ/sigma

Detects potential exploitation attempts of CVE-2022-29072, a 7-Zip privilege escalation and command execution vulnerability. 7-Zip version 21.07 and earlier on Windows allows privilege escalation (CVE-2022-29072) and command execution when a file with the .7z extension is dragged to the Help>Contents area. This is caused by misconfiguration of 7z.dll and a heap overflow. The command runs in a child process under the 7zFM.exe process.

MITRE ATT&CK coverage

TacticTechniques
ExecutionNo specific technique

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Potential CVE-2022-29072 Exploitation Attempt
id: 9a4ccd1a-3526-4d99-b980-9f9c5d3a6ee3
status: test
description: |
    Detects potential exploitation attempts of CVE-2022-29072, a 7-Zip privilege escalation and command execution vulnerability.
    7-Zip version 21.07 and earlier on Windows allows privilege escalation (CVE-2022-29072) and command execution when a file with the .7z extension is dragged to the Help>Contents area. This is caused by misconfiguration of 7z.dll and a heap overflow.
    The command runs in a child process under the 7zFM.exe process.
references:
    - https://github.com/kagancapar/CVE-2022-29072
    - https://twitter.com/kagancapar/status/1515219358234161153
author: frack113, @kostastsale
date: 2022-04-17
modified: 2024-08-15
tags:
    - attack.execution
    - cve.2022-29072
    - detection.emerging-threats
logsource:
    product: windows
    category: process_creation
detection:
    selection_parent:
        ParentImage|endswith: '\7zFM.exe'
    selection_img:
        - Image|endswith:
              - '\cmd.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'Cmd.Exe'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    filter_main_extensions_and_flags:
        - CommandLine|contains:
              - ' /c '
              - ' /k '
              - ' /r '
        - CommandLine|endswith:
              - '.bat'
              - '.cmd'
              - '.ps1'
    filter_main_null:
        CommandLine: null
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_main_*

Stage 1: selection_parent

selection_parent:
    ParentImage|endswith: '\7zFM.exe'

Stage 2: selection_img

selection_img:
    - Image|endswith:
          - '\cmd.exe'
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'Cmd.Exe'
          - 'PowerShell.EXE'
          - 'pwsh.dll'

Stage 3: not filter_main_*

filter_main_extensions_and_flags:
    - CommandLine|contains:
          - ' /c '
          - ' /k '
          - ' /r '
    - CommandLine|endswith:
          - '.bat'
          - '.cmd'
          - '.ps1'
filter_main_null:
    CommandLine: null

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLineends_with.bat
CommandLineends_with.cmd
CommandLineends_with.ps1
CommandLineis_null(no value, null check)
CommandLinematch /c
CommandLinematch /k
CommandLinematch /r

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)
OriginalFileNameeq
  • Cmd.Exe corpus 65 (sigma 43, splunk 17, elastic 5)
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
ParentImageends_with
  • \7zFM.exe corpus 2 (sigma 2)