This detection identifies adversary activity involving C#-based red and black team tools by analyzing unique TypeLibGUID signatures within Azure Sentinel logs. Proactively hunting for these indicators allows the SOC to distinguish between legitimate security testing operations and potential malicious reconnaissance or tool deployment by threat actors leveraging similar .NET frameworks.
rule HKTL_NET_GUID_SharpLogger {
meta:
description = "Detects c# red/black-team tools via typelibguid"
reference = "https://github.com/djhohnstein/SharpLogger"
author = "Arnim Rupp"
date = "2020-12-13"
strings:
$typelibguid0 = "36e00152-e073-4da8-aa0c-375b6dd680c4" ascii nocase wide
condition:
(uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550) and any of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the HKTL_NET_GUID_SharpLogger rule, along with targeted mitigation strategies:
Scenario: Execution of Microsoft Endpoint Configuration Manager (SCCM) Client Updates
ccmsetup.exe) frequently invokes C#-based logging components during inventory scans and software deployment tasks. These processes often generate typelibguid entries that match the Red/Black team tool signatures due to shared .NET runtime libraries.\Microsoft\CCM\ or specifically target ccmsetup.exe and ccmexec.exe when running under the SYSTEM account on management servers.Scenario: Scheduled PowerShell Script for Compliance Reporting
Task Scheduler) runs a custom C# wrapper script (e.g., ComplianceLogger.dll) to aggregate audit logs and generate PDF reports for compliance teams. This tool utilizes the same underlying .NET serialization logic detected by the YARA rule.powershell.exe running from a known enterprise directory path like C:\Scripts\Compliance\.Scenario: Deployment of Microsoft Defender for Endpoint Custom Sensors
\Program Files\Microsoft Defender Antimalware\ and the process name matches MsMpEng.exe or SenseService.exe.**Scenario