Researchers at Avast have published a detailed analysis of a banking trojan they call Guildma. This is almost certainly the same malware as that described by Cybereason as Astaroth, but analyzed here in greater detail. Noticeably, the new report confirms that Astaroth/Guildma’s use of the Avast binary aswrundll.exe as a LOLBin to aid its ‘Living off the Land’ stealth functions is no longer possible.
Guildma originates in Brazil. In an analysis of the Brazilian hacking scene, Recorded Future noted that cultural (language isolation) and stringent banking rules have largely kept Brazilian banking malware within Brazil; but warned that this would probably not last forever. Guildma seems to be a case in point. Avast has detected around 155,000 infection attempts this year alone. Ninety-eight percent are still in Brazil, but the malware is now also targeting 130 banks and web services such as Netflix, Facebook, Amazon, and Google Mail, around the world — although still avoiding computers running in English.
Detections began to spike in May 2019, peaking in June 2019, but ongoing. It was in May that the hackers expanded their pool of bank targets, and also began targeting around 75 other web services around the world.
Guildma is distributed through targeted phishing, with victims addressed by name. The emails include a ZIP archive attachment containing a malicious LNK file. If this is opened, it uses WMI to silently download an XSL file, which in turn downloads all Guildma’s modules via BITSAdmin, and executes a first stage loader that loads the modules.
The phishing is delivered from hacked or purchased websites that have been compromised with malicious PHP code with mass mailing functions.
Guildma is complex and stealthy malware that is a combination of RAT, spyware, password stealer and banking malware. It remains primarily banking malware. “Guildma is highly modular and complex malware supporting a wide range of functionalities, and is currently undergoing rapid development, expanding the range of targeted banks, from Brazil to banks used in other Latin American countries,” comments Adolf Streda, malware researcher at Avast and one of the authors of the analysis.
It is frequently updated by its authors and is currently at version 140. While other researchers believe it has been around since late 2017, the Avast researchers believe it is older. “We estimate that the first versions of Guildma were created in 2015,” they say. They note that one of the seeds used to generate the keys for module encryption has remained unchanged since late 2015.
Once activated, the malware waits for either a command from the C&C server, or an anticipated user interaction — such as opening a webpage of one of the targeted banks. All the core modules are written in Borland Delphi and they are probably based on well-known open source RATs like Delphi Remote Access PC, AmigoRAT or PureRAT.
Guildma first searches for banking application files, windows that may belong to these applications, and open e-banking browser windows. If none of these are found, it searches for certain desktop email clients, and services including Netflix, Amazon and Facebook. If it finds anything it is looking for, it can steal login credentials, take screenshots, and intercept mouse and keyboard clicks. It can close interesting browser windows, forcing the user to restart the connection and log in again — at which point it can steal the credentials as they are entered
It can also control the PC remotely, clicking keys, mouse clicking and manipulating files — and can download and execute further malware.
The report presents a full history of the development of Guildma over the last four years, with a detailed analysis of its components. “The malware authors have used large amounts of domains, various infection and stealing techniques, and programming languages (Delphi, JS, VBS,..) during Guildma’s long existence,” explain the researchers; “but, on the other hand, they also used the same or very similar code patterns like encryption algorithm and seeds, URL path format, variables or file names. With these patterns, we have been able to track the entire campaign with high accuracy, even if some parts of the malware or modules have been changed.”
Related: Hackers Add Security Software Removal to Banload Banking Malware
Related: Brazilian Financial Malware Spreads Beyond National Boundaries
Related: Meet Torii, a Stealthy, Versatile and Highly Persistent IoT Botnet
Related: Czech Antivirus Targets London’s Biggest Tech Float