T1001.002

Steganography

Adversaries may use steganographic techniques to hide command and control traffic within digital media files (images, PDFs, etc.) to evade detection. Commands or data can be embedded in image files (JPG, PNG, GIF, BMP) or documents using techniques such as Least Significant Bit (LSB) encoding, appending data after EOF markers, or hiding data in file format metadata and structures (e.g., IDAT chunks in PNG). Real-world malware including HAMMERTOSS, LunarWeb, LunarMail, ZeroT, LightNeuron, RDAT, Duqu, and Sliver have leveraged steganographic C2 channels. Detection focuses on process behavior (tools that process or download image files with unusual patterns), network anomalies (HTTP traffic downloading image files at regular intervals with response size variance), and file system indicators (known steganography utilities being executed).

Microsoft Sentinel / Defender
kusto
let StegoTools = dynamic(["steghide", "outguess", "stegdetect", "openstego", "silenteye", "stegosuite", "snow.exe", "jphide", "jpseek", "camouflage"]);
let StegoExtensions = dynamic([".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif", ".webp"]);
// Detection 1: Known steganography tool execution
let StegoToolExecution = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName has_any (StegoTools)
    or ProcessCommandLine has_any (StegoTools)
    or (FileName =~ "python.exe" and ProcessCommandLine has_any ("steg", "lsb", "steganography"))
    or (FileName =~ "python3" and ProcessCommandLine has_any ("steg", "lsb", "steganography"))
| extend DetectionType = "StegoToolExecution"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Detection 2: Image files downloaded and then executed or read by suspicious processes
let SuspiciousImageRead = DeviceFileEvents
| where Timestamp > ago(24h)
| where FileName has_any (StegoExtensions)
| where InitiatingProcessFileName in~ ("powershell.exe", "pwsh.exe", "cmd.exe", "wscript.exe",
          "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe",
          "bitsadmin.exe", "curl.exe", "wget.exe")
| where ActionType in ("FileCreated", "FileModified")
| extend DetectionType = "SuspiciousImageFileWrite"
| project Timestamp, DeviceName, AccountName=InitiatingProcessAccountName,
          FileName, FolderPath, InitiatingProcessFileName,
          InitiatingProcessCommandLine, DetectionType;
// Detection 3: certutil or other tools embedding data into image files
let DataEmbeddingTools = DeviceProcessEvents
| where Timestamp > ago(24h)
| where (FileName =~ "certutil.exe" and ProcessCommandLine has_any ("-encode", "-decode", "-f"))
    or (FileName =~ "copy.exe" and ProcessCommandLine matches regex @"/[bB].*\.(jpg|jpeg|png|gif|bmp)")
    or (ProcessCommandLine matches regex @"copy\s.*/[bB].*\.(jpg|jpeg|png|gif|bmp)")
    or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any ("LSB", "Invoke-PSImage", "Invoke-Steganography", "BitmapImage", "LockBits", "GetPixel", "SetPixel", "IDAT"))
| extend DetectionType = "DataEmbeddingTool"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
union StegoToolExecution, SuspiciousImageRead, DataEmbeddingTools
| sort by Timestamp desc
high severity medium confidence

Data Sources

Process: Process Creation File: File Creation File: File Modification Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents DeviceFileEvents

False Positives

  • Legitimate graphic design or photography software that uses image processing libraries referencing pixel manipulation functions like GetPixel/SetPixel
  • Security researchers or penetration testers running steganography analysis tools in lab environments
  • Digital watermarking software used by media organizations to embed copyright information in images
  • Forensics tools (e.g., Autopsy plugins) that analyze image files for hidden content during incident response
  • Python machine learning or computer vision scripts using PIL/Pillow that process image pixel data

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections