The Backdoor APT Mongal detection rule identifies potential adversary persistence by leveraging a known malicious payload associated with the APT group, indicating possible long-term access to the network. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect and mitigate early-stage compromise by an advanced persistent threat actor.
YARA Rule
rule Backdoor_APT_Mongal
{
meta:
author = "@patrickrolsen"
maltype = "Backdoor.APT.Mongall"
version = "0.1"
reference = "fd69a799e21ccb308531ce6056944842"
date = "01/04/2014"
strings:
$author = "author user"
$title = "title Vjkygdjdtyuj" nocase
$comp = "company ooo"
$cretime = "creatim\\yr2012\\mo4\\dy19\\hr15\\min10"
$passwd = "password 00000000"
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 5 string patterns in its detection logic.
Scenario: Scheduled System Maintenance Task
Description: A legitimate scheduled task using schtasks.exe is configured to run a maintenance script that inadvertently matches the YARA signature due to similar string patterns.
Filter/Exclusion: Exclude processes initiated by schtasks.exe with a known command line or parent process from the System or Task Scheduler service.
Scenario: Admin Using PowerShell for Remote Management
Description: An administrator uses PowerShell (powershell.exe) to remotely manage a server, and the script or command used contains strings that match the YARA rule for Backdoor_APT_Mongal.
Filter/Exclusion: Exclude processes where the parent process is mstsc.exe (Remote Desktop) or winrm.exe, or where the command line includes known admin tools like Invoke-Command or Enter-PSSession.
Scenario: Legitimate Software Installation
Description: A legitimate software package (e.g., 7-Zip, WinRAR, or Chocolatey) is being installed, and its installation script or binary contains strings that match the YARA signature.
Filter/Exclusion: Exclude processes initiated by msiexec.exe, choco.exe, or setup.exe from trusted software vendors, or use a whitelist of known safe files.
Scenario: Database Backup Job
Description: A database backup job using sqlcmd.exe or mysqldump.exe is running, and the command line or output contains strings that trigger the YARA rule.
Filter/Exclusion: Exclude processes where the command line includes known backup commands or where the parent process is a database service (e.g., sqlservr.exe, mysqld.exe).
Scenario: User-Initiated File Compression
Description: A user is using `7-Zip