This hunt hypothesis targets adversaries deploying custom Python-based executables that mimic the behavior of known disk wipers to potentially destroy critical data or evade detection through obfuscation. Proactive hunting for this pattern in Azure Sentinel is essential because disk-wiping attacks can cause irreversible service disruption, and identifying these specific Python artifacts early allows the SOC team to isolate affected systems before data loss occurs.
rule SUSP_PY_PYInstaller_Swiper_Jun25 {
meta:
description = "Detects suspicious Python based executable with similarities to a known disk wiper"
author = "Florian Roth"
reference = "https://x.com/cyb3rops/status/1935707307805134975"
date = "2025-06-19"
score = 65
hash1 = "4f669ecbe12e95d51f37be76933de4c2626d20bb01729086ce2efc603c4ffdf3"
id = "049587a8-275d-59a6-bfbd-b72173d21a73"
strings:
$a1 = "bzlib1.dll" ascii fullword
$a2 = "VCRUNTIME140_1.dll" wide fullword
$a3 = "%s%c%s.exe" ascii fullword
$sc1 = { 73 77 69 70 65 72 00 00 00 } // "swiper\0\0\0"
condition:
uint16(0) == 0x5a4d
and filesize < 40000KB
and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 4 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the rule “Detects suspicious Python based executable with similarities to a known disk wiper,” including tailored filters and exclusions:
Automated Backup Verification Scripts
python.exe scripts to verify data integrity or manage temporary cache files. These scripts may iterate through large directories and perform file deletion operations that mimic the behavior of a disk wiper.veeam.service, commvault.exe) AND the command line contains specific keywords like --verify or --cleanup.Software Deployment and Patching Agents
python.exe instances where the image path is located within the vendor’s specific installation directory (e.g., C:\Program Files\Ansible\bin\) AND the user context is a dedicated service account (e.g., DOMAIN\svc_ansible).Scheduled Data Retention and Archiving Jobs