Detection rules › YARA-L
Hacktool - SharpSuccessor Execution
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
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
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
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
Outcome
Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.
| Field | Expression |
|---|---|
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) |