Detection rules › Sigma

Potential CVE-2022-29072 Exploitation Attempt

Status
test
Severity
high
Log source
category process_creation, product windows
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

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

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

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
field:"Image" kind:ends_with
OriginalFileNameeq
  • Cmd.Exe corpus 81 (sigma 43, elastic 21, splunk 17)
  • PowerShell.EXE corpus 138 (sigma 84, splunk 30, elastic 24)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
field:"OriginalFileName" kind:eq
ParentImageends_with
  • \7zFM.exe corpus 2 (sigma 2)
field:"ParentImage" kind:ends_with value:"\7zFM.exe"