The hypothesis is that the detection rule identifies potential APT activity involving backspace operations, which may indicate adversaries attempting to manipulate or erase forensic data. SOC teams should proactively hunt for this behavior in Azure Sentinel to uncover stealthy adversary actions that could evade standard detection mechanisms.
YARA Rule
rule apt_backspace
{
meta:
description = "Detects APT backspace"
author = "Bit Byte Bitten"
date = "2015-05-14"
hash = "6cbfeb7526de65eb2e3c848acac05da1e885636d17c1c45c62ad37e44cd84f99"
strings:
$s1 = "!! Use Splice Socket !!"
$s2 = "User-Agent: SJZJ (compatible; MSIE 6.0; Win32)"
$s3 = "g_nAV=%d,hWnd:0x%X,className:%s,Title:%s,(%d,%d,%d,%d),BOOL=%d"
condition:
uint16(0) == 0x5a4d and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Scenario: System backup job using rsync or tar
Description: A legitimate system backup process may involve copying large volumes of data, which could trigger the rule due to high data transfer patterns.
Filter/Exclusion: Exclude processes associated with rsync, tar, or backup in the command line arguments. Example: process.name = "rsync" OR process.name = "tar" OR command_line contains "backup"
Scenario: Scheduled log rotation using logrotate
Description: Log rotation tasks often involve reading and writing large log files, which could be mistaken for APT activity.
Filter/Exclusion: Exclude processes related to logrotate or log management tools like logrotate, syslog-ng, or rsyslog. Example: process.name = "logrotate"
Scenario: Database replication or synchronization
Description: Database replication tools like mysqldump, pg_basebackup, or Oracle Data Guard may generate high I/O activity that resembles APT behavior.
Filter/Exclusion: Exclude processes associated with database replication tools. Example: process.name = "mysqldump" OR process.name = "pg_basebackup"
Scenario: Software update or patch deployment using yum, apt, or msiexec
Description: Large software updates or patches can cause high disk I/O and file modifications that may trigger the rule.
Filter/Exclusion: Exclude processes related to package managers or update tools. Example: process.name = "yum" OR process.name = "apt" OR process.name = "msiexec"
Scenario: Virtual machine disk cloning or snapshot creation
Description: Tools like VBoxManage, vmrun, or Vagrant may perform disk cloning or snapshot operations