Detection rules › Sigma

Enumerate All Information With Whoami.EXE

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

Detects the execution of "whoami.exe" with the "/all" flag

MITRE ATT&CK coverage

TacticTechniques
Discovery

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Enumerate All Information With Whoami.EXE
id: c248c896-e412-4279-8c15-1c558067b6fa
status: test
description: Detects the execution of "whoami.exe" with the "/all" flag
references:
    - https://brica.de/alerts/alert/public/1247926/agent-tesla-keylogger-delivered-inside-a-power-iso-daa-archive/
    - https://app.any.run/tasks/7eaba74e-c1ea-400f-9c17-5e30eee89906/
    - https://www.youtube.com/watch?v=DsJ9ByX84o4&t=6s
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-12-04
modified: 2024-03-05
tags:
    - attack.discovery
    - attack.t1033
    - car.2016-03-001
logsource:
    category: process_creation
    product: windows
detection:
    selection_main_img:
        - Image|endswith: '\whoami.exe'
        - OriginalFileName: 'whoami.exe'
    selection_main_cli:
        CommandLine|contains|windash: ' -all'
    condition: all of selection_main_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_main_*

Stage 1: selection_main_img

selection_main_img:
    - Image|endswith: '\whoami.exe'
    - OriginalFileName: 'whoami.exe'

Stage 2: selection_main_cli

selection_main_cli:
    CommandLine|contains|windash: ' -all'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -all transforms: windash corpus 2 (sigma 2)
field:"CommandLine" kind:match value:" -all"
Imageends_with
  • \whoami.exe corpus 19 (sigma 19)
field:"Image" kind:ends_with value:"\whoami.exe"
OriginalFileNameeq
  • whoami.exe corpus 9 (sigma 9)
field:"OriginalFileName" kind:eq value:"whoami.exe"