Darkgate Malware Weaponizing XLSX, HTML, & PDF To Attack Windows Machines

Forcepoint researchers recently asserted that the Darkgate malware is distributed via phishing emails that have malicious attachments such as XLSX, HTML, or pdf which take over accounts and replicate themselves. 

It is persistent in the sense that it can go unnoticed while endangering lost data, fraud, blackmail, and exposed sensitive information.

Technical Analysis

Forcepoint X-Labs analyzed a recent Darkgate campaign initiated through a phishing email containing a fake Intuit Quickbooks invoice PDF. 

It tricks users into clicking a link to install Java but instead redirects them to a geofenced URL that surreptitiously downloads the next malware stage payload.

Attack Chain (Source – Forcepoint)

A malicious “may-document_[number].pdf” file analysis demonstrates an invoice PDF with an embedded hyperlink in a large XObject image.

Clicking the link downloads a malicious .jar file. The associated URLs share patterns with those used by QakBot actors before, indicating potential connections.

Analyzing the malicious “.jar” file with JD-GUI exposed a “.PNG” and an obfuscated “.class” file containing code to download a “.ZIP” file to C:\Downloads\ using a curl.exe command. 

Upon downloading the ZIP, it leverages PowerShell’s expand-archive to extract the contents.

This class file can also download and save MSI files. Within the ZIP, AutoIt3.exe and a compiled AutoIt script in .a3x format have been extracted, which are then run by the JAR via an obfuscated cmd command.

Darkgate has used AutoIt elsewhere, and this script was compiled using AutoIt 3.26+ with AU3!EA06 headers. Further investigation is needed to determine what this script does.

The operations BITXOR and BinaryToString() of AutoIt are difficult to understand. This tool merges a large data stream into a local variable.

DLLSTRUCTCREATE() library function allows bytes to be loaded into memory and then abuse system resources. Scripts obtain shell code and join with the server botnet remotely.

The Darkgate campaign deploys phishing emails pretending to be QuickBooks invoices to make users download malicious JAR files containing directions for more payloads, such as obfuscated AutoIt scripts. 

https://googleads.g.doubleclick.net/pagead/ads?gdpr=0&client=ca-pub-5372786174760228&output=html&h=280&adk=2324661411&adf=308000102&pi=t.aa~a.1177160622~i.37~rp.4&w=534&abgtt=6&fwrn=4&fwrnh=100&lmt=1716230789&num_ads=1&rafmt=1&armr=3&sem=mc&pwprc=6320262850&ad_type=text_image&format=534×280&url=https%3A%2F%2Fcybersecuritynews.com%2Fdarkgate-malware-weaponizing-files-attack-windows%2F&fwr=0&pra=3&rh=134&rw=534&rpe=1&resp_fmts=3&wgl=1&fa=27&dt=1716222760519&bpp=1&bdt=-M&idt=0&shv=r20240515&mjsv=m202405140101&ptt=9&saldr=aa&abxe=1&cookie_enabled=1&eoidce=1&prev_fmts=0x0%2C574x640%2C534x280%2C534x280%2C534x280%2C320x50&nras=7&correlator=7551107869673&frm=20&pv=1&ga_vid=349619336.1716222759&ga_sid=1716222760&ga_hid=863839689&ga_fc=1&u_tz=330&u_his=1&u_h=900&u_w=1440&u_ah=900&u_aw=1440&u_cd=24&u_sd=2&adx=267&ady=3338&biw=1440&bih=797&scr_x=0&scr_y=164&eid=44759875%2C44759926%2C44759837%2C31081564%2C31083638%2C31083822%2C44798934%2C95331982%2C31083183%2C95331712%2C95332416&oid=2&psts=AOrYGslSOWyxjoOrDHM_rRDaOzvgXP7ocq3O_GzPM4McheDEpuvCi2Y1vVUkDERww0bRV6sw7wa3IZylQYREVMA6qSSpGg%2CAOrYGsm57-S2-pv2UCOEvwOtl9AocXZYZVWyZ43XnnVQjiqyvvolY3fqdS7onbabs-TsNxJhzroYetsGo-Jo2jShCXwiDQ%2CAOrYGsnLxV2gemBCw5ixa0Xh0llhCqtXg0q4otyV82PuPEHbXEP6wuDybgLU2a9MSS_zJE_V6UXXRQxvJo-LOx7x_bI&pvsid=2507710490566134&tmod=1461754656&uas=1&nvt=1&fc=1408&brdim=0%2C0%2C0%2C0%2C1440%2C0%2C1440%2C900%2C1440%2C797&vis=1&rsz=%7C%7Cs%7C&abl=NS&fu=128&bc=31&bz=1&ifi=4&uci=a!4&btvi=4&fsb=1&dtd=M

These scripts run shell code and communicate to remote servers. The Darkgate campaign has nicely blended professional malware techniques and historical URL patterns consequently demonstrating an advanced persistent threat (APT).

IOCs

Initial Stage URLs:

  • afarm[.]net/uvz2q
  • affixio[.]com/emh0c
  • affiliatebash[.]com/myu0f
  • afcmanager[.]net/jxk6m
  • adventsales[.]co[.]uk/iuw8a
  • amikamobile[.]com/ayu4d
  • adztrk[.]com/ixi7r
  • aerospaceavenue[.]com/cnz8g
  • amishwoods[.]com/jwa4v

Second stage URL:

  • smbeckwithlaw[.]com/1[.]zip

C2:

  • ​kindupdates[.]com

Leave a Reply

Your email address will not be published. Required fields are marked *