The Misdat Backdoor detection identifies potential adversary persistence by leveraging a known malicious YARA signature, indicating possible unauthorized access or data exfiltration. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect early-stage compromise and prevent lateral movement or data theft.
YARA Rule
rule Misdat_Backdoor
{
meta:
author = "Cylance SPEAR Team"
/* Decode Function
CODE:00406C71 8B 55 F4 mov edx, [ebp+var_C]
CODE:00406C74 8A 54 1A FF mov dl, [edx+ebx-1]
CODE:00406C78 8B 4D F8 mov ecx, [ebp+var_8]
CODE:00406C7B C1 E9 08 shr ecx, 8
CODE:00406C7E 32 D1 xor dl, cl
CODE:00406C80 88 54 18 FF mov [eax+ebx-1], dl
CODE:00406C84 8B 45 F4 mov eax, [ebp+var_C]
CODE:00406C87 0F B6 44 18 FF movzx eax, byte ptr [eax+ebx-1]
CODE:00406C8C 03 45 F8 add eax, [ebp+var_8]
CODE:00406C8F 69 C0 D9 DB 00 00 imul eax, 0DBD9h
CODE:00406C95 05 3B DA 00 00 add eax, 0DA3Bh
CODE:00406C9A 89 45 F8 mov [ebp+var_8], eax
CODE:00406C9D 43 inc ebx
CODE:00406C9E 4E dec esi
CODE:00406C9F 75 C9 jnz short loc_406C6A
*/
strings:
$imul = {03 45 F8 69 C0 D9 DB 00 00 05 3B DA 00 00}
$delphi = {50 45 00 00 4C 01 08 00 19 5E 42 2A}
condition:
$imul and $delphi
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: Legitimate scheduled job using schtasks.exe to run a maintenance script
Filter/Exclusion: process.parent_process == "schtasks.exe" and process.command_line contains " /RU SYSTEM"
Scenario: System update or patching using wuauclt.exe or msiexec.exe
Filter/Exclusion: process.name == "wuauclt.exe" or process.name == "msiexec.exe"
Scenario: Admin task using taskhost.exe to run a PowerShell script for log management
Filter/Exclusion: process.parent_process == "taskhost.exe" and process.command_line contains "powershell.exe -Command"
Scenario: Regular system monitoring tool like perfmon.exe or eventvwr.exe
Filter/Exclusion: process.name == "perfmon.exe" or process.name == "eventvwr.exe"
Scenario: Backup tool like VSSAdmin.exe or wbadmin.exe performing a scheduled backup
Filter/Exclusion: process.name == "VSSAdmin.exe" or process.name == "wbadmin.exe" and process.command_line contains "backup"