A researcher details the beginning of a malware infection The Gozi Trojan has improved dramatically since SecureWorks researcher Don Jackson downloaded the first known sample in February 2007. Still, understanding how that first one installed itself on a system offers a good non-technical primer on malware injection and the techniques used to beat the defenses. (For a full technical report, refer to Jackson’s thorough unraveling of Gozi here: http://www.secureworks.com/research/threats/gozi) Even before Gozi was downloaded, it had been designed to confuse. Downloaders, the programs that inject the malware, are recognized by anti-intrusion product signatures, so Gozi split up keywords and strings of code in the downloader so that the pattern that defensive technologies normally would recognize didn’t exist. Once Gozi gots by that gate, those keywords and strings of code were reassembled to their proper place. Then following took place in under one second: In the Windows file where the logged-in user’s custom settings are stored, Gozi writes a file called xx_abcd.exe, where abcd are random characters. This is the data stealing engine. Gozi writes several registry entries, including an xx_id value, a random number that serves as a unique infection ID. All information taken from this computer can then be associated with a dossier on that user’s information. Gozi instructs windows to hide these registry entries, and all associated files including xx_abcd.exe. Gozi unpacks and installs a SOCKS proxy backdoor and assigns a password. This allows the person controlling the Gozi bot to send it updated instructions or add features and functionality to it anonymously and invisibly. Gozi unpacks a default set of options including what URLs it should wake up and monitor for forms it can grab and what IP addresses will serve as this machine’s drop point. Gozi contacts the “mothership” or home server. The mothership tells Gozi to send it all client certificates it can find on the PC, along with the machine’s newly assigned unique ID. Gozi downloads from the mothership an updated set of options to replace or augment the default ones unpacked from the malware. The new instructions might simply override the default options or they might have more specific instructions on new drop sites and other information. Gozi waits. After that, whenever you start entering form data, it catches it on the fly and passes it off along with the unique infection ID to its drop point, where still more code is sorting the data. This happens whether or not the form data is SSL encrypted. On sites where the little lock on the browser glows, Gozi still works. It intercepts the form data in the vestibule that exists after it’s entered and before it’s encrypted. Jackson spent three days debugging Gozi. He says the first sample he looked at was rudimentary. It didn’t encrypt its own transmissions. Some of the encryption and random character generation it used was weak. It didn’t obfuscate its transmissions using proxy communication effectively. As he thought, later versions improved on these weaknesses dramatically, in the span of only a few months. “They didn’t have to be so advanced with Gozi but now they are,” he says. “It will only get more advanced over time.” Related content feature Top cybersecurity M&A deals for 2023 Fears of recession, rising interest rates, mass tech layoffs, and conservative spending trends are likely to make dealmakers cautious, but an ever-increasing need to defend against bigger and faster attacks will likely keep M&A activity steady in By CSO Staff Sep 22, 2023 24 mins Mergers and Acquisitions Mergers and Acquisitions Mergers and Acquisitions brandpost Unmasking ransomware threat clusters: Why it matters to defenders Similar patterns of behavior among ransomware treat groups can help security teams better understand and prepare for attacks By Joan Goodchild Sep 21, 2023 3 mins Cybercrime news analysis China’s offensive cyber operations support “soft power” agenda in Africa Researchers track Chinese cyber espionage intrusions targeting African industrial sectors. By Michael Hill Sep 21, 2023 5 mins Advanced Persistent Threats Cyberattacks Critical Infrastructure brandpost Proactive OT security requires visibility + prevention You cannot protect your operation by simply watching and waiting. It is essential to have a defense-in-depth approach. By Austen Byers Sep 21, 2023 4 mins Security Podcasts Videos Resources Events SUBSCRIBE TO OUR NEWSLETTER From our editors straight to your inbox Get started by entering your email address below. Please enter a valid email address Subscribe