Fileless Storage
Adversaries may store data in fileless formats to conceal malicious activity from defenses. Fileless storage includes the Windows Registry, event logs, WMI repository, and on Linux, shared memory directories (/dev/shm, /run/shm) and volatile paths (/tmp). Windows Registry-based storage is widely used by malware including QakBot, ComRAT, ShadowPad, DarkWatchman, Turla, APT32, and Volgmer to store encrypted configurations, payloads, and C2 data. Linux malware including FritzFrog (FrogShell), Muhstik, and others abuse /dev/shm and /run/shm to store binaries that are executed directly from shared memory without writing to persistent disk storage.
let SuspiciousRegistryPaths = dynamic([
"HKCU\\Software\\Microsoft\\[^\\\\]+$",
"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ShellCompatibility",
"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\PrintConfigs",
"HKLM\\SOFTWARE\\Microsoft\\DRM",
"HKLM\\SOFTWARE\\Classes\\.wav\\",
"HKCU\\Software\\ApplicationContainer\\",
"HKLM\\SOFTWARE\\Plus",
"HKCU\\SOFTWARE\\Plus"
]);
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| where RegistryValueData has_any ("MZ", "TVqQ", "4D5A") // PE magic bytes in Base64 or hex
or (strlen(RegistryValueData) > 10000
and (RegistryValueData matches regex @"^[A-Za-z0-9+/=]{100,}$")) // Large Base64 blob
| where RegistryKey !startswith "HKLM\\SYSTEM\\CurrentControlSet\\Services\\"
and RegistryKey !startswith "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey, RegistryValueName,
RegistryValueData, InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Some legitimate software stores large Base64-encoded configuration or license data in registry values
- Group Policy preferences that store Base64-encoded data in registry keys for computer configuration
- Certificate enrollment and management software that stores certificate data in registry values
- Backup and synchronization tools that cache serialized objects (sometimes Base64-encoded) in registry
References (5)
- https://attack.mitre.org/techniques/T1027/011/
- https://learn.microsoft.com/microsoft-365/security/intelligence/fileless-threats
- https://securelist.com/a-new-secret-stash-for-fileless-malware/106393/
- https://www.elastic.co/guide/en/security/7.17/prebuilt-rule-7-16-3-binary-executed-from-shared-memory-directory.html
- https://www.akamai.com/blog/security-research/fritzfrog-botnet-new-capabilities-log4shell
Unlock Pro Content
Get the full detection package for T1027.011 including response playbook, investigation guide, and atomic red team tests.