Detection rules › Sigma

HackTool - winPEAS Execution

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

Known false positives

  • Unlikely

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

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

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLineends_with
  • -linpeas
field:"CommandLine" kind:ends_with value:" -linpeas"
CommandLinematch
  • applicationsinfo
  • browserinfo
  • eventsinfo
  • fileanalysis
  • filesinfo
  • processinfo
  • servicesinfo
  • windowscreds
  • https://github.com/carlospolop/PEASS-ng/releases/latest/download/
field:"CommandLine" kind:match
Imageends_with
  • \winPEASany.exe
  • \winPEASany_ofs.exe
  • \winPEASx64.exe
  • \winPEASx64_ofs.exe
  • \winPEASx86.exe
  • \winPEASx86_ofs.exe
field:"Image" kind:ends_with
OriginalFileNameeq
  • winPEAS.exe
field:"OriginalFileName" kind:eq value:"winPEAS.exe"
ParentCommandLineends_with
  • -linpeas
field:"ParentCommandLine" kind:ends_with value:" -linpeas"