Detection rules › Sigma

HackTool - RemoteKrbRelay Execution

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

Detects the use of RemoteKrbRelay, a Kerberos relaying tool via CommandLine flags and PE metadata.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: HackTool - RemoteKrbRelay Execution
id: a7664b14-75fb-4a50-a223-cb9bc0afbacf
status: test
description: |
    Detects the use of RemoteKrbRelay, a Kerberos relaying tool via CommandLine flags and PE metadata.
references:
    - https://github.com/CICADA8-Research/RemoteKrbRelay
author: Nasreddine Bencherchali (Nextron Systems)
date: 2024-06-27
tags:
    - attack.credential-access
    - attack.t1558.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\RemoteKrbRelay.exe'
        - OriginalFileName: 'RemoteKrbRelay.exe'
    selection_cli_required:
        CommandLine|contains|all:
            - ' -clsid '
            - ' -target '
            - ' -victim '
    # selection_cli_attacks:
    #     # Note: In the current implementation these flags do not require any other flags. Which means they can't be used on their own. They're already covered by "selection_cli_required"
    #     CommandLine|contains:
    #         - '-adcs ' # relay to HTTP Web Enrollment and get certificate
    #         - '-laps ' # relay to LDAP and extract LAPS passwords
    #         - '-ldapwhoami ' # relay to LDAP and get info about relayed user
    #         - '-shadowcred ' # relay to LDAP and setup Shadow Credentials
    selection_cli_attack_smb:
        CommandLine|contains|all:
            - '-smb ' # relay to SMB
            - '--smbkeyword '
        CommandLine|contains:
            - 'interactive'
            - 'secrets'
            - 'service-add'
    selection_cli_attack_rbcd_main:
        CommandLine|contains: '-rbcd ' # relay to LDAP and setup RBCD
    selection_cli_attack_rbcd_options:
        CommandLine|contains:
            - '-cn ' # Computer name that will be written to msDs-AllowedToActOnBehalfOfOtherIdentity
            - '--computername ' # Computer name that will be written to msDs-AllowedToActOnBehalfOfOtherIdentity
    selection_cli_attack_changepass:
        CommandLine|contains: '-chp ' # relay to LDAP and change user password
        CommandLine|contains|all:
            - '-chpPass ' # new password
            - '-chpUser ' # the name of the user whose password you want to change
    selection_cli_attack_addgrpname:
        CommandLine|contains|all:
            - '-addgroupmember ' # relay to LDAP and add user to group
            - '-group '
            - '-groupuser '
    condition: selection_img or selection_cli_required or all of selection_cli_attack_rbcd_* or selection_cli_attack_changepass or selection_cli_attack_addgrpname or selection_cli_attack_smb
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

selection_img or selection_cli_required or all of selection_cli_attack_rbcd_* or selection_cli_attack_changepass or selection_cli_attack_addgrpname or selection_cli_attack_smb

Stage 1: selection_img

selection_img:
    - Image|endswith: '\RemoteKrbRelay.exe'
    - OriginalFileName: 'RemoteKrbRelay.exe'

Stage 2: selection_cli_required

selection_cli_required:
    CommandLine|contains|all:
        - ' -clsid '
        - ' -target '
        - ' -victim '

Stage 3: selection_cli_attack_rbcd_main

selection_cli_attack_rbcd_main:
    CommandLine|contains: '-rbcd '

Stage 4: selection_cli_attack_rbcd_options

selection_cli_attack_rbcd_options:
    CommandLine|contains:
        - '-cn '
        - '--computername '

Stage 5: selection_cli_attack_changepass

selection_cli_attack_changepass:
    CommandLine|contains: '-chp '
    CommandLine|contains|all:
        - '-chpPass '
        - '-chpUser '

Stage 6: selection_cli_attack_addgrpname

selection_cli_attack_addgrpname:
    CommandLine|contains|all:
        - '-addgroupmember '
        - '-group '
        - '-groupuser '

Stage 7: selection_cli_attack_smb

selection_cli_attack_smb:
    CommandLine|contains|all:
        - '-smb '
        - '--smbkeyword '
    CommandLine|contains:
        - 'interactive'
        - 'secrets'
        - 'service-add'

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
  • -clsid corpus 2 (sigma 2)
  • -target
  • -victim
  • --computername
  • --smbkeyword
  • -addgroupmember
  • -chp
  • -chpPass
  • -chpUser
  • -cn
  • -group
  • -groupuser
  • -rbcd
  • -smb
  • interactive corpus 3 (sigma 3)
  • secrets
  • service-add
Imageends_with
  • \RemoteKrbRelay.exe
OriginalFileNameeq
  • RemoteKrbRelay.exe