Detect Data Encrypted for Impact in Splunk
Adversaries may encrypt data on target systems or on large numbers of systems in a network to interrupt availability to system and network resources. They can attempt to render stored data inaccessible by encrypting files or data on local and remote drives and withholding access to a decryption key. This may be done in order to extract monetary compensation from a victim in exchange for decryption or a decryption key (ransomware) or to render data permanently inaccessible in cases where the key is not saved or transmitted. In the case of ransomware, it is typical that common user files like Office documents, PDFs, images, videos, audio, text, and source code files will be encrypted and often renamed or tagged with specific file markers. Adversaries may also encrypt critical system files, disk partitions, MBR, virtual machines hosted on ESXi, or cloud storage objects.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1486 Data Encrypted for Impact
- Canonical reference
- https://attack.mitre.org/techniques/T1486/
SPL Detection Query
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
(EventCode=1 (CommandLine="*vssadmin*delete shadows*" OR CommandLine="*wmic*shadowcopy delete*" OR CommandLine="*bcdedit*/set*recoveryenabled*no*" OR CommandLine="*bcdedit*/set*bootstatuspolicy*ignoreallfailures*" OR CommandLine="*wbadmin delete catalog*" OR CommandLine="*wbadmin delete systemstatebackup*"))
OR
(EventCode=11 (TargetFilename="*.encrypted" OR TargetFilename="*.locked" OR TargetFilename="*.crypt" OR TargetFilename="*.enc" OR TargetFilename="*.ransom" OR TargetFilename="*.cry" OR TargetFilename="*.lock64" OR TargetFilename="*.cuba" OR TargetFilename="*.avos" OR TargetFilename="*.avos2" OR TargetFilename="*.play" OR TargetFilename="*.blackbyte"))
| eval EventType=case(
EventCode=1, "ShadowDelete",
EventCode=11, "FileEncrypted",
1=1, "Unknown")
| eval ProcessName=coalesce(Image, "unknown")
| bin _time span=1h
| stats
count(eval(EventType="FileEncrypted")) as EncryptedFiles,
count(eval(EventType="ShadowDelete")) as ShadowDeletes,
dc(TargetFilename) as UniqueFiles,
values(CommandLine) as Commands,
earliest(_time) as FirstSeen,
latest(_time) as LastSeen
by host, ProcessName, _time
| where EncryptedFiles > 50 OR ShadowDeletes > 0
| eval RansomwareConfidence=case(
EncryptedFiles > 500 AND ShadowDeletes > 0, "critical",
EncryptedFiles > 200 OR ShadowDeletes > 0, "high",
EncryptedFiles > 50, "medium",
1=1, "low")
| table FirstSeen, LastSeen, host, ProcessName, EncryptedFiles, ShadowDeletes, UniqueFiles, RansomwareConfidence, Commands
| sort - RansomwareConfidence, - EncryptedFiles Detects ransomware execution by correlating Sysmon Event ID 11 (File Created) for known ransomware file extensions with Sysmon Event ID 1 (Process Creation) for shadow copy deletion and recovery sabotage commands. Groups events into 1-hour windows per host and process. Known ransomware families detected include WannaCry, REvil, Maze, BlackCat, Babuk, Royal, Cuba, AvosLocker, Playcrypt, and BlackByte. A combined signal of mass file encryption plus shadow deletion is rated critical.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate encryption tools (BitLocker, VeraCrypt, 7-Zip) encrypting large numbers of files during backup operations
- File migration or archival tools that rename files with new extensions during processing
- Anti-ransomware tools that create decoy/canary files with ransomware-like extensions for honeypot detection
- Disaster recovery testing that involves intentional shadow copy deletion as part of DR exercises
Other platforms for T1486
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Volume Shadow Copy Deletion via vssadmin
Expected signal: Sysmon Event ID 1: Process creation for vssadmin.exe with 'delete shadows /all /quiet' command line. Windows Security Event ID 4688 with same details. VSS Event ID 8224 in System log confirming shadow deletion.
- Test 2Recovery Sabotage via bcdedit
Expected signal: Sysmon Event ID 1: Two process creation events for bcdedit.exe with /set commands. Windows Security Event ID 4688 with command line auditing. Registry modification events for BCD store changes.
- Test 3Mass File Encryption Simulation
Expected signal: Sysmon Event ID 11: 100 file creation events for .docx files, followed by 100 file rename events to .docx.encrypted. The burst of file operations in a short time window from a single process is the key telemetry pattern.
- Test 4Ransom Note Drop Simulation
Expected signal: Sysmon Event ID 11: 10 file creation events for README_DECRYPT.txt in different directories. The identical filename across multiple directories is the key pattern.
References (10)
- https://attack.mitre.org/techniques/T1486/
- https://www.us-cert.gov/ncas/alerts/TA16-091A
- https://www.fireeye.com/blog/threat-research/2017/05/wannacry-malware-profile.html
- https://www.us-cert.gov/ncas/alerts/TA17-181A
- https://www.us-cert.gov/ncas/alerts/AA18-337A
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1486/T1486.md
- https://rhinosecuritylabs.com/aws/s3-ransomware-part-1-attack-vector/
- https://www.halcyon.ai/blog/abusing-aws-native-services-ransomware-encrypting-s3-buckets-with-sse-c
- https://thedfirreport.com/2021/11/29/continuing-the-bazar-cycle/
- https://www.crowdstrike.com/en-us/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/
Unlock Pro Content
Get the full detection package for T1486 including response playbook, investigation guide, and atomic red team tests.