This rule identifies the presence of Winkript, a Windows PowerShell-based ransomware strain, by matching its specific code patterns within memory or script files. Proactively hunting for this indicator allows the SOC to detect early-stage ransomware deployment or persistence mechanisms before encryption occurs, reducing the potential impact on Azure-hosted workloads.
rule Winkriptv10
{
meta:
author="malware-lu"
strings:
$a0 = { 33 C0 8B B8 00 [3] 8B 90 04 [3] 85 FF 74 1B 33 C9 50 EB 0C 8A 04 39 C0 C8 04 34 1B 88 04 39 41 3B CA 72 F0 58 }
condition:
$a0 at pe.entry_point
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Legacy PowerShell Script Execution via Scheduled Tasks: Administrators often deploy custom PowerShell scripts (.ps1) via schtasks or Task Scheduler for routine maintenance (e.g., log rotation, disk cleanup, or backup verification). If these scripts are stored in non-standard locations (like C:\Users\Public\ or C:\Temp\) or are executed directly without being signed, YARA rules targeting script-based execution patterns may flag them.
.ps1 files if the parent process is schtasks.exe or Task Scheduler (taskschd.msi), and the file path matches known administrative directories (e.g., C:\Scripts\, C:\Admin\Tools\). Additionally, allowlist specific script names known to be part of standard maintenance routines.Development and QA Environments: In software development or QA teams, engineers frequently run local PowerShell or Python scripts to test APIs, simulate loads, or debug applications. These scripts are often run from user profile directories (C:\Users\<devuser>\Desktop\ or C:\Users\<devuser>\Projects\) and may use dynamic code execution or obfuscation for testing purposes, triggering YARA patterns designed to catch malicious scripters.
DevTeam, QAEngineers) and the execution path is within the user’s profile directory. Alternatively, allowlist common development tools like powershell.exe or pwsh.exe when the working directory is under C:\Users\ and the user is not in a production service account group.Third-Party Application Self-Update or Maintenance: Some enterprise applications (e.g., antivirus, monitoring agents, or database tools) execute embedded PowerShell or VBScript snippets during self-update,