Chronos-DFIR includes 7 YARA rule sets totaling 30+ individual rules for binary pattern matching against malware families, ransomware, C2 frameworks, and living-off-the-land binaries (LOLBins). YARA rules complement Sigma detection by identifying file-level artifacts (executables, DLLs, scripts) through string patterns, PE headers, and behavioral signatures.
YARA (Yet Another Ridiculous Acronym) is a pattern-matching engine for identifying and classifying malware. Chronos-DFIR integrates YARA scanning as part of its forensic analysis pipeline.
File: rules/yara/ransomware/qilin_agenda.yarQILIN is a cross-platform RaaS (Ransomware-as-a-Service) targeting Windows servers and VMware ESXi hypervisors. It uses ChaCha20 + RSA-2048 encryption and exfiltrates data via rclone.
rule QILIN_Ransomware_Strings_Windows { meta: description = "Detects QILIN/Agenda ransomware Windows variant" author = "Chronos-DFIR / Ivan Huerta" severity = "critical" mitre = "T1486 – Data Encrypted for Impact" tags = "ransomware, qilin, agenda, t1486" strings: // Ransom note fragments $note1 = "RECOVER-README" ascii nocase wide $note2 = "qilinsupport" ascii nocase wide $note3 = ".qilin" ascii wide $note4 = ".agenda" ascii nocase wide // VSS/Shadow deletion (pre-encryption) $vss_del1 = "vssadmin Delete Shadows /All /Quiet" ascii nocase wide $vss_del2 = "wbadmin DELETE SYSTEMSTATEBACKUP" ascii nocase wide $bcdedit = "bcdedit /set {default} recoveryenabled No" ascii nocase // ChaCha20 magic constant $chacha20 = "expand 32-byte k" ascii // QILIN config JSON structure $config1 = "\"encrypt_mode\"" ascii $config2 = "\"file_ext\"" ascii $config3 = "\"note_name\"" ascii condition: (any of ($note*)) or ($chacha20 and any of ($config*)) or (($vss_del1 or $vss_del2) and $bcdedit) or 2 of ($config*)}
QILIN Attack Chain Breakdown
Initial Access: Exploits public-facing apps or valid credentials
Pre-Encryption: Deletes Volume Shadow Copies via vssadmin + bcdedit
Persistence: Modifies registry for safe mode auto-start (bypasses AV/EDR)
Encryption: ChaCha20 stream cipher + RSA-2048 for key exchange
Exfiltration: Uses rclone to sync stolen data to Mega/Google Drive/S3
Ransom Note: Drops RECOVER-README.txt with .onion link
ESXi Variant: Targets hypervisors with vim-cmd to kill VMs before encryption
import "pe"rule C2_CobaltStrike_Beacon_Strings { meta: description = "Detects Cobalt Strike Beacon strings and config" severity = "critical" mitre = "T1071.001 – Application Layer Protocol: Web" strings: $cs1 = "beacon.dll" ascii nocase $cs2 = "ReflectiveLoader" ascii $cs3 = "%02d/%02d/%02d %02d:%02d:%02d" ascii $cs4 = "beacon" ascii nocase $cs5 = "Cobalt Strike" ascii $metadata = "metadata" ascii $sleep_mask = "SleepMask" ascii $pipe_name = "\\\\.\\pipe\\MSSE-" ascii $named_pipe = "\\pipe\\" ascii condition: pe.is_pe and ( 2 of ($cs*) or ($pipe_name or $sleep_mask or $metadata) ) or (not pe.is_pe and 3 of ($cs*))}
Cobalt Strike is a commercial penetration testing tool frequently abused by threat actors. Beacon DLLs use reflective loading and named pipes (\\.\pipe\MSSE-*) for inter-process communication.
// Boolean logiccondition: $a and $bcondition: $a or $bcondition: not $a// String countscondition: #a > 5 // String $a appears 5+ timescondition: 2 of ($str*) // At least 2 strings matching patterncondition: all of them // All strings must be present// File sizecondition: filesize < 1MB// PE modulecondition: pe.is_pe and pe.number_of_sections > 5