Detect Steganography in CrowdStrike LogScale
Adversaries may use steganography techniques in order to prevent the detection of hidden information. Steganographic techniques can be used to hide data in digital media such as images, audio tracks, video clips, or text files. Adversaries commonly hide malicious payloads within PNG, BMP, JPG, and GIF files, often extracting PE executables or shellcode at runtime using LSB (Least Significant Bit) manipulation or custom XOR-based extraction. Threat actors including APT37, APT29, Andariel, Tropic Trooper, BRONZE BUTLER, and MuddyWater have used steganography to hide C2 configurations, shellcode, and full malware payloads within seemingly benign images.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1027 Obfuscated Files or Information
- Sub-technique
- T1027.003 Steganography
- Canonical reference
- https://attack.mitre.org/techniques/T1027/003/
LogScale Detection Query
// Process execution: steganography tools or image extraction command patterns
#event_simpleName = /^(ProcessRollup2|SyntheticProcessRollup2)$/
| CommandLine = /(?i)(invoke-psimage|steghide|openstego|outguess|stegdetect)/
OR (
CommandLine = /(?i)\.(png|jpg|jpeg|bmp|gif|tiff)/
AND CommandLine = /(?i)(extract|lsb|decode|steg|hidden|payload)/
)
| table([@timestamp, ComputerName, UserName, ImageFileName, CommandLine, ParentBaseFileName, ParentCommandLine])
| union [
// File creation: PE/DLL written to user directories by browser process
#event_simpleName = PeFileWritten
| TargetFileName = /(?i)\\(Temp|Downloads|Pictures)\\[^\\]+\.(exe|dll)$/
| WriterFileName = /(?i)(chrome|msedge|iexplore|firefox|explorer)\.exe$/
| table([@timestamp, ComputerName, UserName, TargetFileName, WriterFileName])
]
| sort(@timestamp, order=desc) CrowdStrike Falcon LogScale (CQL) query detecting steganography tool execution and image-based payload extraction via ProcessRollup2 and SyntheticProcessRollup2 Falcon sensor events, plus PE/DLL files written to user-accessible directories by browser processes via PeFileWritten events. Uses CQL regex matching on CommandLine, ImageFileName, TargetFileName, and WriterFileName fields from the Falcon Data Replicator (FDR) or Event Search.
Data Sources
Required Tables
False Positives & Tuning
- Authorized red team or purple team exercises where Falcon-monitored endpoints run steganography utilities (steghide, outguess, stegdetect) as part of T1027.003 simulation and the host is in a test OU
- Security awareness or training lab environments where staff are shown live demonstrations of steganography payloads using invoke-psimage or similar tooling on dedicated lab machines
- Legitimate software download workflows where a browser retrieves and stages a PE installer in Downloads or Temp prior to a patch management agent executing it; WriterFileName matches browser but EXE is vendor-signed
Other platforms for T1027.003
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 1Hide and Extract Payload with Invoke-PSImage
Expected signal: Sysmon Event ID 3: Network connection to raw.githubusercontent.com. Sysmon Event ID 11: stego_test.png created in %TEMP%. PowerShell ScriptBlock Log Event ID 4104: Invoke-PSImage commands and the embedded script. The PNG will have slightly modified pixel values to carry the hidden payload.
- Test 2Embed Secret Message in Image using steghide
Expected signal: Sysmon Event ID 1: steghide.exe process creation with 'embed' then 'extract' arguments. Sysmon Event ID 11: stego_output.jpg and extracted_payload.txt created in %TEMP%. The steghide tool name will appear in process command lines.
- Test 3Simulate C2 Configuration Retrieval via Steganographic Image
Expected signal: Sysmon Event ID 1: powershell.exe with Invoke-WebRequest to external URL. Sysmon Event ID 3: Network connection to microsoft.com port 443. PowerShell ScriptBlock Log Event ID 4104: the extraction code using bitwise AND on image bytes.
- Test 4Detect High-Entropy Data in Image with binwalk
Expected signal: Process execution for dd and binwalk commands. Auditd execve records for both commands. The binwalk output will show signatures of embedded data within the image file.
References (5)
- https://attack.mitre.org/techniques/T1027/003/
- https://en.wikipedia.org/wiki/Duqu
- https://securingtomorrow.mcafee.com/mcafee-labs/malicious-document-targets-pyeongchang-olympics/
- https://github.com/peewpw/Invoke-PSImage
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1027.003/T1027.003.md
Unlock Pro Content
Get the full detection package for T1027.003 including response playbook, investigation guide, and atomic red team tests.