The hypothesis is that the detected activity represents an adversary attempting to execute or persist with malicious code, which may indicate the presence of malware within the environment. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential malware infections before they cause significant damage.
YARA Rule
rule APT_Malware_PutterPanda_Gen1
{
meta:
description = "Detects a malware "
author = "YarGen Rule Generator"
reference = "not set"
date = "2015-06-03"
super_rule = 1
hash0 = "bf1d385e637326a63c4d2f253dc211e6a5436b6a"
hash1 = "76459bcbe072f9c29bb9703bc72c7cd46a692796"
hash2 = "e105a7a3a011275002aec4b930c722e6a7ef52ad"
strings:
$s1 = "%s%duserid=%dthreadid=%dgroupid=%d" fullword ascii /* PEStudio Blacklist: strings */ /* score: '22.02' */
$s2 = "ssdpsvc.dll" fullword ascii /* score: '11.00' */
$s3 = "Fail %s " fullword ascii /* score: '10.04' */
$s4 = "%s%dpara1=%dpara2=%dpara3=%d" fullword ascii /* score: '10.01' */
$s5 = "LsaServiceInit" fullword ascii /* score: '7.03' */
$s6 = "%-8d Fs %-12s Bs " fullword ascii /* score: '5.04' */
$s7 = "Microsoft DH SChannel Cryptographic Provider" fullword ascii /* PEStudio Blacklist: strings */ /* score: '5.00' */ /* Goodware String - occured 5 times */
condition:
uint16(0) == 0x5a4d and filesize < 1000KB and 5 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 7 string patterns in its detection logic.
Scenario: Scheduled System Maintenance Task
Description: A legitimate scheduled task runs a script that temporarily creates suspicious-looking files or processes as part of system maintenance.
Filter/Exclusion: process.parent_process == "Task Scheduler" or process.name == "schtasks.exe"
Scenario: Antivirus Quarantine Process
Description: An antivirus tool is quarantining a file, which may trigger malware detection rules due to file modifications or deletion.
Filter/Exclusion: process.name == "Windows Defender" or process.name == "MsMpEng.exe"
Scenario: Log File Analysis Job
Description: A log analysis tool (e.g., Splunk, ELK Stack) is parsing log files and may generate temporary files or processes that resemble malware activity.
Filter/Exclusion: process.name == "splunkd.exe" or process.name == "logstash"
Scenario: Software Update Deployment
Description: A patch management tool (e.g., Microsoft Update, SCCM) is deploying updates, which may involve unpacking or executing temporary files.
Filter/Exclusion: process.name == "wuauclt.exe" or process.name == "ccmexec.exe"
Scenario: Database Backup Job
Description: A database backup process (e.g., SQL Server Backup, Oracle RMAN) may create temporary files or use processes that resemble malicious behavior.
Filter/Exclusion: process.name == "sqlservr.exe" or process.name == "rman.exe"