This detection targets adversaries leveraging the KPot malware framework to establish persistent command-and-control channels within Azure workloads using specific YARA signatures. Proactive hunting for this behavior is critical because early identification of these lightweight indicators allows the SOC team to isolate potential lateral movement before it escalates into a high-severity incident.
rule kpot
{
meta:
author = " J from THL <j@techhelplist.com>"
date = "2018-08-29"
reference1 = "https://www.virustotal.com/#/file/4e87a0794bf73d06ac1ce4a37e33eb832ff4c89fb9e4266490c7cef9229d27a7/detection"
reference2 = "ETPRO TROJAN KPOT Stealer Check-In [2832358]"
reference3 = "ETPRO TROJAN KPOT Stealer Exfiltration [2832359]"
version = 1
maltype = "Stealer"
filetype = "memory"
strings:
$text01 = "bot_id=%s"
$text02 = "x64=%d"
$text03 = "is_admin=%d"
$text04 = "IL=%d"
$text05 = "os_version=%d"
$text06 = "IP: %S"
$text07 = "MachineGuid: %s"
$text08 = "CPU: %S (%d cores)"
$text09 = "RAM: %S MB"
$text10 = "Screen: %dx%d"
$text11 = "PC: %s"
$text12 = "User: %s"
$text13 = "LT: %S (UTC+%d:%d)"
$text14 = "%s/%s.php"
$text15 = "Host: %s"
$text16 = "username_value"
$text17 = "password_value"
$text18 = "name_on_card"
$text19 = "last_four"
$text20 = "exp_month"
$text21 = "exp_year"
$text22 = "bank_name"
condition:
16 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 22 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the kpot detection rule in an enterprise environment, including suggested filters and exclusions:
Endpoint Protection Scanning of Legacy Archives
.zip archive containing historical project files. The YARA rule triggers because the compressed file contains embedded scripts with signatures matching known KPot malware behaviors, even though the files are benign and quarantined by the AV engine.C:\Program Files\CrowdStrike\fsa.exe) when scanning file paths under D:\LegacyArchives\. Additionally, filter alerts where the parent process is identified as a known security scanner and the file hash matches a previously approved baseline.Scheduled Software Deployment via SCCM
C:\Windows\CCMCache directory.ccmexec.exe) and its child processes when operating within the C:\Windows\CCMCache or C:\Program Files (x86)\Microsoft Configuration Manager directories. Whitelist file hashes for known deployment packages used in the last 30 days.IT Admin Manual Patching with PowerShell
Update-ServerModules.ps1)