This detection targets adversaries leveraging the RedSun hacktool to execute privilege escalation attacks via Microsoft Defender, a tactic often employed by advanced persistent threats to gain elevated system access. SOC teams should proactively hunt for this behavior in Azure Sentinel because early identification of such tool usage allows for immediate containment before attackers can establish persistence or move laterally across critical infrastructure.
rule HKTL_RedSun_Privilege_Escalation_Apr26 {
meta:
description = "Detects RedSun hacktool used for privilege escalation through Microsoft Defender."
author = "Jonathan Peters (cod3nym)"
date = "2026-04-16"
reference = "https://github.com/Nightmare-Eclipse/RedSun"
hash = "57a70c383feb9af60b64ab6768a1ca1b3f7394b8c5ffdbfafc8e988d63935120"
score = 80
id = "64f86635-cf8c-5c65-b821-2d12e8ee9cdb"
strings:
$x1 = "\\??\\pipe\\REDSUN" wide
$x2 = "The red sun shall prevail.\n" ascii fullword
$x3 = "\\RedSun.pdb" ascii
$s1 = "\\System32\\TieringEngineService.exe" wide
$s2 = "SERIOUSLYMSFT" wide
$s3 = "*H+H$!ELIF-TSET-SURIVITNA-DRADNATS-RACIE$}7)CC7)^P(45XZP\\4[PA@%P!O5X" ascii
condition:
uint16(0) == 0x5a4d
and (
1 of ($x*)
or 2 of ($s*)
)
or 3 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 6 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the “RedSun Hacktool Privilege Escalation” detection rule, including suggested filters and exclusions:
Scenario: Scheduled Maintenance by System Center Configuration Manager (SCCM)
SYSTEM account.ccmexec.exe or wuauserv.exe AND the Account Name is NT AUTHORITY\SYSTEM. Additionally, filter out events occurring during defined maintenance windows (e.g., 01:00–04:00 local time).Scenario: Automated Patch Deployment via Microsoft Endpoint Configuration Manager
HKLM.\Program Files\Microsoft Endpoint Manager\ where the Parent Process is msiexec.exe or powershell.exe. Filter specifically for events where the Command Line contains keywords like “Update”, “Patch”, or “Definition”.Scenario: Third-Party Antivirus or EDR Agent Updates (e.g., CrowdStrike, SentinelOne)