T1027.003 Microsoft Sentinel · KQL

Detect Steganography in Microsoft Sentinel

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/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let SteganographyTools = dynamic(["invoke-psimage", "steghide", "openstego", "outguess", "stegdetect"]);
let ImageExtensions = dynamic([".png", ".jpg", ".jpeg", ".bmp", ".gif", ".tiff"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any (SteganographyTools)
    or (ProcessCommandLine has_any (ImageExtensions)
        and ProcessCommandLine has_any ("extract", "decode", "lsb", "steg", "hidden", "payload"))
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc
| union (
    DeviceFileEvents
    | where Timestamp > ago(24h)
    | where ActionType == "FileCreated"
    | where FileName endswith ".exe" or FileName endswith ".dll"
    | where InitiatingProcessFileName in~ ("explorer.exe", "iexplore.exe", "chrome.exe", "msedge.exe", "firefox.exe")
    | where FolderPath has_any ("\\Temp\\", "\\Downloads\\", "\\Pictures\\")
    | extend SuspiciousExeDrop = true
    | project Timestamp, DeviceName, AccountName=InitiatingProcessAccountName, FileName, FolderPath, SuspiciousExeDrop
)
high severity medium confidence

Detects steganography tool usage and suspicious executable files created by browser or image-viewing processes — a common pattern when a steganographic dropper extracts a PE from an image file. Monitors for known steganography tools (Invoke-PSImage, steghide, OpenStego) and executables dropped to image storage paths by browsers. The union query also captures the follow-on behavior of a successful steganographic payload extraction.

Data Sources

Process: Process CreationFile: File CreationMicrosoft Defender for Endpoint

Required Tables

DeviceProcessEventsDeviceFileEvents

False Positives & Tuning

  • Legitimate digital forensics and watermarking tools that use steganography for authorized use cases
  • Security researchers running steganography analysis tools on their workstations
  • Browsers dropping legitimate executable installers to Downloads or Pictures folders
  • Digital rights management (DRM) tools that use watermarking techniques similar to steganography
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Unlock Pro Content

Get the full detection package for T1027.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections