
SonicWall Capture Labs Threat Research team has observed a PDF file getting detected by SonicWall Real Time Deep Memory Inspection (RTDMI), which comes as an e-mail attachment. The PDF file contains a link which downloads a malicious PowerPoint file, which then executes AgentTesla as the final payload on the victims machine. The threat actors are now more focused on delivery mechanism and infection chain, by keeping a low profile and very less exposure of malicious code to traditional security providers.
The PDF file contains a link to download the PPAM(PowerPoint File Add-in with macro) which is posted on "Mediafire file hosting service". The PPAM file is downloaded with a genuine looking name as "invoice_4_812937_pdf.ppam".
[caption]
Fig : screenshot of PDF file[/caption]
The PowerPoint file has an embedded macro, The macro has an "Auto_Open" function which creates an instance of WScript.Shell object using CLSID {72C24DD5-D70A-438B-8A42-98424B88AFB8}. And using this Shell Object Mshta is executed to run the remote HTML file.
[caption]
Fig: screenshot of macro[/caption]
The HTML file contains an obfuscated JavaScript, which tries to kill “WinWord.exe” process and creates a scheduled task as ‘micsrssowfwWorsald’ which opens “http[:]//www[.]4kfgjfkg[.]blogspot[.]com/atom.xml” using Mshta. It also loads a remote hosted PowerShell script using IRM(Invoke-RestMethod) and runs its using IEX(Invoke-Expression).
[caption]
Fig: Deobfuscated HTML code[/caption]
The PowerShell script, creates a folder in ‘C:\ProgramData\’ as ‘MEMEMAN’ and drops 5 files in that folder as:
This PowerShell script first tries to kill "msbuild", "CasPol", "jsc", "cmstp" and "mshta" processes. It has two hex encoded PE files, one is the test.exe(Loader File) and other one is the AgentTesla malware file.
It loads the test.exe($YIV4Z) hex bytes as assembly using 'System.
This PowerShell script then runs two more PowerShell commands present is variables $OASI4 and $DEF. Which tries to bypass AMSI, disables script logging, disables AVProtection, add exclusions etc.
The AgentaTesla binary has File Description as 'Web Browser Pass View' and Company Name as 'NirSoft' to disguise itself as NirSoft password recovery Tool.
AgentTesla steals system sensitive information like keystrokes, login credentials used in browsers, collect various types of data likes cookies, clipboard data, system information and email clients used on infected machines. In our cases it connecting to the ftp server hosted at this IP address '107[.]182[.]129[.]168' and posting the a HTML file which has the gathered information of the infected machine on this FTP server, the HTML file name format is PW_-_.html.
We got the credentials of the FTP server where it is keeping all the stolen information. Below is the screenshot of the files present at that server at the time of analysis.
Unavailability of the PDF file and AgentTesla PE file in popular threat intelligence sharing portals like the VirusTotal indicates its uniqueness and limited distribution:
[caption]
Fig: ScreenShot of no presence of PDF file on VT[/caption]
[caption]
Fig: ScreenShot of no presence of AgentTesla file on VT[/caption]
The Powerpoint file is on VT with very less AV's detections.
[caption]
Fig: Less AV's detecting the PowerPoint File[/caption]
SonicWall Real Time Deep Memory Inspection (RTDMI) is detecting the malicious PDF file, PowerPoint file, test.exe and the AgentTesla too.
Evidence of detection by RTDMI ™ engine can be seen below in the Capture ATP report for this file:
Share This Article

An Article By
An Article By
Security News
Security News