Detection rules › Sigma

HAFNIUM Exchange Exploitation Activity

Status
test
Severity
critical
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects activity observed by different researchers to be HAFNIUM group activity (or related) on Exchange servers

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: HAFNIUM Exchange Exploitation Activity
id: bbb2dedd-a0e3-46ab-ba6c-6c82ae7a9aa7
status: test
description: Detects activity observed by different researchers to be HAFNIUM group activity (or related) on Exchange servers
references:
    - https://blog.truesec.com/2021/03/07/exchange-zero-day-proxylogon-and-hafnium/
    - https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/
    - https://discuss.elastic.co/t/detection-and-response-for-hafnium-activity/266289/3
    - https://twitter.com/GadixCRK/status/1369313704869834753?s=20
    - https://twitter.com/BleepinComputer/status/1372218235949617161
author: Florian Roth (Nextron Systems)
date: 2021-03-09
modified: 2023-03-09
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.persistence
    - attack.t1546
    - attack.t1053
    - attack.g0125
    - detection.emerging-threats
logsource:
    category: process_creation
    product: windows
detection:
    selection_attrib:
        CommandLine|contains|all:
            - 'attrib'
            - ' +h '
            - ' +s '
            - ' +r '
            - '.aspx'
    selection_vsperfmon:
        - Image|contains: '\ProgramData\VSPerfMon\'
        - CommandLine|contains|all:
              - 'schtasks'
              - 'VSPerfMon'
    selection_opera_1:
        Image|endswith: 'Opera_browser.exe'
        ParentImage|endswith:
            - '\services.exe'
            - '\svchost.exe'
    selection_opera_2:
        Image|endswith: 'Users\Public\opera\Opera_browser.exe'
    selection_vssadmin:
        CommandLine|contains|all:
            - 'vssadmin list shadows'
            - 'Temp\__output'
    selection_makecab_1:
        Image|endswith: '\makecab.exe'
        CommandLine|contains|all:
            - 'inetpub\wwwroot\'
            - '.dmp.zip'
    selection_makecab_2:
        Image|endswith: '\makecab.exe'
        CommandLine|contains:
            - 'Microsoft\Exchange Server\'
            - 'compressionmemory'
            - '.gif'
    selection_7zip:
        CommandLine|contains|all:
            - ' -t7z '
            - 'C:\Programdata\pst'
            - '\it.zip'
    selection_rundll32:
        CommandLine|contains|all:
            - '\comsvcs.dll'
            - 'Minidump'
            - 'full '
            - '\inetpub\wwwroot'
    selection_other:
        CommandLine|contains:
            - 'Windows\Temp\xx.bat'
            - 'Windows\WwanSvcdcs'
            - 'Windows\Temp\cw.exe'
    condition: 1 of selection*
falsepositives:
    - Unlikely
level: critical

Stages and Predicates

Stage 0: condition

1 of selection*

Stage 1: selection_attrib

selection_attrib:
    CommandLine|contains|all:
        - 'attrib'
        - ' +h '
        - ' +s '
        - ' +r '
        - '.aspx'

Stage 2: selection_vsperfmon

selection_vsperfmon:
    - Image|contains: '\ProgramData\VSPerfMon\'
    - CommandLine|contains|all:
          - 'schtasks'
          - 'VSPerfMon'

Stage 3: selection_opera_1

selection_opera_1:
    Image|endswith: 'Opera_browser.exe'
    ParentImage|endswith:
        - '\services.exe'
        - '\svchost.exe'

Stage 4: selection_opera_2

selection_opera_2:
    Image|endswith: 'Users\Public\opera\Opera_browser.exe'

Stage 5: selection_vssadmin

selection_vssadmin:
    CommandLine|contains|all:
        - 'vssadmin list shadows'
        - 'Temp\__output'

Stage 6: selection_makecab_1

selection_makecab_1:
    Image|endswith: '\makecab.exe'
    CommandLine|contains|all:
        - 'inetpub\wwwroot\'
        - '.dmp.zip'

Stage 7: selection_makecab_2

selection_makecab_2:
    Image|endswith: '\makecab.exe'
    CommandLine|contains:
        - 'Microsoft\Exchange Server\'
        - 'compressionmemory'
        - '.gif'

Stage 8: selection_7zip

selection_7zip:
    CommandLine|contains|all:
        - ' -t7z '
        - 'C:\Programdata\pst'
        - '\it.zip'

Stage 9: selection_rundll32

selection_rundll32:
    CommandLine|contains|all:
        - '\comsvcs.dll'
        - 'Minidump'
        - 'full '
        - '\inetpub\wwwroot'

Stage 10: selection_other

selection_other:
    CommandLine|contains:
        - 'Windows\Temp\xx.bat'
        - 'Windows\WwanSvcdcs'
        - 'Windows\Temp\cw.exe'

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
CommandLinematch
  • +h corpus 2 (sigma 2)
  • +r
  • +s corpus 2 (sigma 2)
  • -t7z
  • .aspx corpus 2 (sigma 2)
  • .dmp.zip
  • .gif corpus 8 (sigma 8)
  • C:\Programdata\pst
  • Microsoft\Exchange Server\
  • Minidump corpus 5 (sigma 4, chronicle 1)
  • Temp\__output
  • VSPerfMon
  • Windows\Temp\cw.exe
  • Windows\Temp\xx.bat
  • Windows\WwanSvcdcs
  • \comsvcs.dll
  • \inetpub\wwwroot
  • \it.zip
  • attrib
  • compressionmemory
  • full
  • inetpub\wwwroot\
  • schtasks corpus 6 (sigma 5, kusto 1)
  • vssadmin list shadows corpus 2 (sigma 2)
Imageends_with
  • Opera_browser.exe
  • Users\Public\opera\Opera_browser.exe
  • \makecab.exe corpus 5 (sigma 5)
Imagematch
  • \ProgramData\VSPerfMon\
ParentImageends_with
  • \services.exe corpus 8 (sigma 8)
  • \svchost.exe corpus 14 (sigma 14)