This hunt hypothesis targets adversaries leveraging the outdated RC4 encryption algorithm to encrypt victim data during a LockBit 4.0 ransomware attack, which often indicates an active or imminent encryption phase. Proactively hunting for this behavior in Azure Sentinel is critical because identifying RC4 usage early allows the SOC team to isolate affected systems before widespread data loss occurs and accelerates incident response by confirming the specific ransomware variant involved.
rule mal_lockbit4_rc4_win_feb24
{
meta:
author = "0x0d4y"
description = "Detect the implementation of RC4 Algorithm by Lockbit4.0"
date = "2024-02-13"
score = 100
reference = "https://0x0d4y.blog/lockbit4-0-evasion-tales/"
hash = "062311F136D83F64497FD81297360CD4"
id = "4de48ced-b9fa-4286-aac4-c263ad20d67d"
license = "CC BY 4.0"
rule_matching_tlp = "TLP:WHITE"
rule_sharing_tlp = "TLP:WHITE"
malpedia_family = "win.lockbit"
strings:
$rc4_alg = { 48 3d 00 01 00 00 74 0c 88 84 04 ?? ?? ?? ?? 48 ff c0 eb ec 29 c9 41 b8 ?? ?? ?? ?? 4c 8d 0d 15 7b 00 00 45 31 d2 48 81 f9 00 01 00 00 74 34 44 8a 9c 0c ?? ?? ?? ?? 45 00 da 89 c8 99 41 f7 f8 46 02 14 0a 41 0f b6 c2 8a 94 04 ?? ?? ?? ?? 88 94 0c ?? ?? ?? ?? 44 88 9c 04 ?? ?? ?? ?? 48 ff c1 eb c3 29 c0 48 8b 0d 14 9e 00 00 31 d2 45 29 c0 48 3d ?? ?? ?? ?? 74 4b 41 ff c0 45 0f b6 c0 46 8a 8c 04 ?? ?? ?? ?? 44 00 ca 44 0f b6 d2 46 8a 9c 14 ?? ?? ?? ?? 46 88 9c 04 ?? ?? ?? ?? 46 88 8c 14 ?? ?? ?? ?? 46 02 8c 04 ?? ?? ?? ?? 45 0f b6 c9 46 8a 8c 0c ?? ?? ?? ?? 44 30 0c 01 48 ff c0 eb ad }
condition:
uint16(0) == 0x5a4d and
$rc4_alg
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Detect the implementation of RC4 Algorithm by Lockbit4.0 rule, along with targeted filters and exclusions:
Legacy SharePoint Document Library Encryption
RC4 cipher for internal transport encryption. When users access or sync these files, the system generates RC4 handshake logs that mimic Lockbit’s signature.NT SERVICE\SharePoint) and restrict detection to non-standard ports (e.g., exclude port 80/443 if known for SharePoint). Alternatively, filter by User Agent strings containing Microsoft-Office or SharePoint.Scheduled Backup Job via Veeam or Commvault
DOMAIN\VeeamBackupSvc or DOMAIN\CommvaultAgent) and limit detection to the defined maintenance window (e.g., 02:00–04:00 daily).Legacy Point-of-Sale (POS) Terminal Synchronization