Detection rules › YARA-L

Hacktool - SharpSuccessor Execution

Severity
high
Type
alert
Time window
10m
Match by
hostname
Author
Georg Lauenstein - suresecure GmbH, Mohamed Abdelfattah - suresecure GmbH
Source
github.com/chronicle/detection-rules

SharpSuccessor is a .NET-based post-exploitation tool designed to weaponize the BadSuccessor attack discovered by Yuval Gordon (@YuG0rd) from Akamai. It allows a low-privileged user with 'CreateChild' permissions over any Organizational Unit (OU) in an Active Directory domain to escalate privileges to Domain Administrator. This detection rule identifies execution patterns or behavioral indicators linked to SharpSuccessor activity, which may signal privilege escalation attempts in Active Directory environments.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation

References

Telemetry coverage

Rule body

// Copyright 2025 Google LLC. Licensed under Apache-2.0.

rule hacktool_sharp_successor_execution {

  meta:
    author = "Georg Lauenstein - suresecure GmbH, Mohamed Abdelfattah - suresecure GmbH"
    description = "SharpSuccessor is a .NET-based post-exploitation tool designed to weaponize the BadSuccessor attack discovered by Yuval Gordon (@YuG0rd) from Akamai. It allows a low-privileged user with 'CreateChild' permissions over any Organizational Unit (OU) in an Active Directory domain to escalate privileges to Domain Administrator. This detection rule identifies execution patterns or behavioral indicators linked to SharpSuccessor activity, which may signal privilege escalation attempts in Active Directory environments."
    rule_id = "mr_be51aa7d-b4b8-4d8c-9998-0aa3194e98c3"
    rule_name = "Hacktool - SharpSuccessor Execution"
    tactic = "TA0004"
    technique = "T1068"
    references = "https://academy.bluraven.io/blog/detecting-badsuccessor, https://github.com/logangoins/SharpSuccessor"
    type = "alert"
    platform = "Windows, EDR"
    data_source = "Microsoft Sysmon, Windows Security Event Log, Microsoft Defender XDR"
    severity = "High"
    priority = "High"

  events:

    (
      $sharp_successor_execution.metadata.event_type = "PROCESS_LAUNCH"
      and (
            $sharp_successor_execution.src.process.file.full_path = "SharpSuccessor.exe" nocase or
            $sharp_successor_execution.target.asset.software.description = "SharpSuccessor" nocase or
            $sharp_successor_execution.target.process.file.full_path = /\\SharpSuccessor\.exe/ nocase or
            $sharp_successor_execution.principal.process.file.full_path = /\\SharpSuccessor\.exe/ nocase or
            $sharp_successor_execution.target.process.command_line = /SharpSuccessor/ nocase
          )
    )
    or
    ( // Microsoft-Windows-Security-Auditing -- EventCode: 4673
      $sharp_successor_execution.metadata.event_type = "SERVICE_UNSPECIFIED"
      and (
            $sharp_successor_execution.metadata.description = "A privileged service was called" and
            $sharp_successor_execution.target.process.command_line = /SharpSuccessor/ nocase
          )
    )

    // Capture the hostname where the event occurred
    $sharp_successor_execution.principal.hostname = $hostname

  match:
    $hostname over 10m

  outcome:
    $risk_score = 65
    $event_count = count_distinct($sharp_successor_execution.metadata.id)
    $principal_process_pid = array_distinct($sharp_successor_execution.principal.process.pid)
    $principal_process_command_line = array_distinct($sharp_successor_execution.principal.process.command_line)
    $principal_process_file_sha256 = array_distinct($sharp_successor_execution.principal.process.file.sha256)
    $principal_process_file_full_path = array_distinct($sharp_successor_execution.principal.process.file.full_path)
    $principal_process_product_specific_process_id = array_distinct($sharp_successor_execution.principal.process.product_specific_process_id)
    $principal_process_parent_process_product_specific_process_id = array_distinct($sharp_successor_execution.principal.process.parent_process.product_specific_process_id)
    $target_process_pid = array_distinct($sharp_successor_execution.target.process.pid)
    $target_process_command_line = array_distinct($sharp_successor_execution.target.process.command_line)
    $target_process_file_sha256 = array_distinct($sharp_successor_execution.target.process.file.sha256)
    $target_process_file_full_path = array_distinct($sharp_successor_execution.target.process.file.full_path)
    $target_process_product_specific_process_id = array_distinct($sharp_successor_execution.target.process.product_specific_process_id)
    $principal_user_userid = array_distinct($sharp_successor_execution.principal.user.userid)

  condition:
      $sharp_successor_execution
}

YARA-L rule structure

Condition

Fires when at least one $sharp_successor_execution event in the 10m window.

Events

$sharp_successor_execution PROCESS_LAUNCH (1, 4688)

  • src.process.file.full_path = "SharpSuccessor.exe"
  • target.asset.software.description = "SharpSuccessor"
  • target.process.file.full_path matches "\\SharpSuccessor\.exe"
  • principal.process.file.full_path matches "\\SharpSuccessor\.exe"
  • target.process.command_line matches "SharpSuccessor"
  • metadata.description = "A privileged service was called"
  • target.process.command_line matches "SharpSuccessor"

Match and correlation

Match key
$hostname (principal.hostname)
Within
10m

Outcome

Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.

FieldExpression
risk_score65
event_countcount_distinct($sharp_successor_execution.metadata.id)
principal_process_pidarray_distinct($sharp_successor_execution.principal.process.pid)
principal_process_command_linearray_distinct($sharp_successor_execution.principal.process.command_line)
principal_process_file_sha256array_distinct($sharp_successor_execution.principal.process.file.sha256)
principal_process_file_full_patharray_distinct($sharp_successor_execution.principal.process.file.full_path)
principal_process_product_specific_process_idarray_distinct($sharp_successor_execution.principal.process.product_specific_process_id)
principal_process_parent_process_product_specific_process_idarray_distinct($sharp_successor_execution.principal.process.parent_process.product_specific_process_id)
target_process_pidarray_distinct($sharp_successor_execution.target.process.pid)
target_process_command_linearray_distinct($sharp_successor_execution.target.process.command_line)
target_process_file_sha256array_distinct($sharp_successor_execution.target.process.file.sha256)
target_process_file_full_patharray_distinct($sharp_successor_execution.target.process.file.full_path)
target_process_product_specific_process_idarray_distinct($sharp_successor_execution.target.process.product_specific_process_id)
principal_user_useridarray_distinct($sharp_successor_execution.principal.user.userid)