Detection rules › Sigma

HackTool - winPEAS Execution

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Georg Lauenstein (sure[secure])
Source
github.com/SigmaHQ/sigma

WinPEAS is a script that search for possible paths to escalate privileges on Windows hosts. The checks are explained on book.hacktricks.xyz

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: HackTool - winPEAS Execution
id: 98b53e78-ebaf-46f8-be06-421aafd176d9
status: test
description: WinPEAS is a script that search for possible paths to escalate privileges on Windows hosts. The checks are explained on book.hacktricks.xyz
references:
    - https://github.com/carlospolop/PEASS-ng
    - https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation
author: Georg Lauenstein (sure[secure])
date: 2022-09-19
modified: 2023-03-23
tags:
    - attack.privilege-escalation
    - attack.discovery
    - attack.t1082
    - attack.t1087
    - attack.t1046
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'winPEAS.exe'
        - Image|endswith:
              - '\winPEASany_ofs.exe'
              - '\winPEASany.exe'
              - '\winPEASx64_ofs.exe'
              - '\winPEASx64.exe'
              - '\winPEASx86_ofs.exe'
              - '\winPEASx86.exe'
    selection_cli_option:
        CommandLine|contains:
            - ' applicationsinfo' # Search installed applications information
            - ' browserinfo' # Search browser information
            - ' eventsinfo' # Display interesting events information
            - ' fileanalysis' # Search specific files that can contains credentials and for regexes inside files
            - ' filesinfo' # Search generic files that can contains credentials
            - ' processinfo' # Search processes information
            - ' servicesinfo' # Search services information
            - ' windowscreds' # Search windows credentials
    selection_cli_dl:
        CommandLine|contains: 'https://github.com/carlospolop/PEASS-ng/releases/latest/download/'
    selection_cli_specific:
        - ParentCommandLine|endswith: ' -linpeas'
        - CommandLine|endswith: ' -linpeas'
    condition: 1 of selection_*
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

1 of selection_*

Stage 1: selection_img

selection_img:
    - OriginalFileName: 'winPEAS.exe'
    - Image|endswith:
          - '\winPEASany_ofs.exe'
          - '\winPEASany.exe'
          - '\winPEASx64_ofs.exe'
          - '\winPEASx64.exe'
          - '\winPEASx86_ofs.exe'
          - '\winPEASx86.exe'

Stage 2: selection_cli_option

selection_cli_option:
    CommandLine|contains:
        - ' applicationsinfo'
        - ' browserinfo'
        - ' eventsinfo'
        - ' fileanalysis'
        - ' filesinfo'
        - ' processinfo'
        - ' servicesinfo'
        - ' windowscreds'

Stage 3: selection_cli_dl

selection_cli_dl:
    CommandLine|contains: 'https://github.com/carlospolop/PEASS-ng/releases/latest/download/'

Stage 4: selection_cli_specific

selection_cli_specific:
    - ParentCommandLine|endswith: ' -linpeas'
    - CommandLine|endswith: ' -linpeas'

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
CommandLineends_with
  • -linpeas
CommandLinematch
  • applicationsinfo
  • browserinfo
  • eventsinfo
  • fileanalysis
  • filesinfo
  • processinfo
  • servicesinfo
  • windowscreds
  • https://github.com/carlospolop/PEASS-ng/releases/latest/download/
Imageends_with
  • \winPEASany.exe corpus 2 (sigma 2)
  • \winPEASany_ofs.exe corpus 2 (sigma 2)
  • \winPEASx64.exe corpus 2 (sigma 2)
  • \winPEASx64_ofs.exe corpus 2 (sigma 2)
  • \winPEASx86.exe corpus 2 (sigma 2)
  • \winPEASx86_ofs.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • winPEAS.exe
ParentCommandLineends_with
  • -linpeas