Detection rules › Sigma

Potential SMB Relay Attack Tool Execution

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

Detects different hacktools used for relay attacks on Windows for privilege escalation

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Potential SMB Relay Attack Tool Execution
id: 5589ab4f-a767-433c-961d-c91f3f704db1
status: test
description: Detects different hacktools used for relay attacks on Windows for privilege escalation
references:
    - https://foxglovesecurity.com/2016/09/26/rotten-potato-privilege-escalation-from-service-accounts-to-system/
    - https://pentestlab.blog/2017/04/13/hot-potato/
    - https://github.com/ohpe/juicy-potato
    - https://hunter2.gitbook.io/darthsidious/other/war-stories/domain-admin-in-30-minutes
    - https://hunter2.gitbook.io/darthsidious/execution/responder-with-ntlm-relay-and-empire
    - https://www.localpotato.com/
author: Florian Roth (Nextron Systems)
date: 2021-07-24
modified: 2023-02-14
tags:
    - attack.collection
    - attack.execution
    - attack.credential-access
    - attack.t1557.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_pe:
        Image|contains:
            - 'PetitPotam'
            - 'RottenPotato'
            - 'HotPotato'
            - 'JuicyPotato'
            - '\just_dce_'
            - 'Juicy Potato'
            - '\temp\rot.exe'
            - '\Potato.exe'
            - '\SpoolSample.exe'
            - '\Responder.exe'
            - '\smbrelayx'
            - '\ntlmrelayx'
            - '\LocalPotato'
    selection_script:
        CommandLine|contains:
            - 'Invoke-Tater'
            - ' smbrelay'
            - ' ntlmrelay'
            - 'cme smb '
            - ' /ntlm:NTLMhash '
            - 'Invoke-PetitPotam'
            - '.exe -t * -p '  # JuicyPotatoNG pattern https://github.com/antonioCoco/JuicyPotatoNG
    selection_juicypotato_enum:  # appears when JuicyPotatoNG is used with -b
        CommandLine|contains: '.exe -c "{'
        CommandLine|endswith: '}" -z'
    filter_hotpotatoes:  # known goodware https://hotpot.uvic.ca/
        Image|contains:
            - 'HotPotatoes6'
            - 'HotPotatoes7'
            - 'HotPotatoes ' # Covers the following: 'HotPotatoes 6', 'HotPotatoes 7', 'HotPotatoes Help', 'HotPotatoes Tutorial'
    condition: 1 of selection_* and not 1 of filter_*
falsepositives:
    - Legitimate files with these rare hacktool names
level: critical

Stages and Predicates

Stage 0: condition

1 of selection_* and not 1 of filter_*

Stage 1: selection_pe

selection_pe:
    Image|contains:
        - 'PetitPotam'
        - 'RottenPotato'
        - 'HotPotato'
        - 'JuicyPotato'
        - '\just_dce_'
        - 'Juicy Potato'
        - '\temp\rot.exe'
        - '\Potato.exe'
        - '\SpoolSample.exe'
        - '\Responder.exe'
        - '\smbrelayx'
        - '\ntlmrelayx'
        - '\LocalPotato'

Stage 2: selection_script

selection_script:
    CommandLine|contains:
        - 'Invoke-Tater'
        - ' smbrelay'
        - ' ntlmrelay'
        - 'cme smb '
        - ' /ntlm:NTLMhash '
        - 'Invoke-PetitPotam'
        - '.exe -t * -p '

Stage 3: selection_juicypotato_enum

selection_juicypotato_enum:
    CommandLine|contains: '.exe -c "{'
    CommandLine|endswith: '}" -z'

Stage 4: not filter_hotpotatoes

filter_hotpotatoes:
    Image|contains:
        - 'HotPotatoes6'
        - 'HotPotatoes7'
        - 'HotPotatoes '

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
ImagematchHotPotatoes
ImagematchHotPotatoes6
ImagematchHotPotatoes7

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
  • }" -z
CommandLinematch
  • /ntlm:NTLMhash
  • ntlmrelay
  • smbrelay
  • .exe -c "{
  • .exe -t * -p
  • Invoke-PetitPotam
  • Invoke-Tater corpus 2 (sigma 2)
  • cme smb
Imagematch
  • HotPotato corpus 2 (sigma 2)
  • Juicy Potato corpus 2 (sigma 2)
  • JuicyPotato corpus 2 (sigma 2)
  • PetitPotam corpus 2 (sigma 2)
  • RottenPotato corpus 2 (sigma 2)
  • \LocalPotato corpus 2 (sigma 2)
  • \Potato.exe
  • \Responder.exe
  • \SpoolSample.exe
  • \just_dce_ corpus 2 (sigma 2)
  • \ntlmrelayx corpus 3 (sigma 3)
  • \smbrelayx corpus 3 (sigma 3)
  • \temp\rot.exe