The Iran-linked Chafer APT group used a new Python-based backdoor in attacks carried out in November 2018 that targeted a Turkish government entity.
The Chafer APT group has distributed data stealer malware since at least mid-2014, it was focused on surveillance operations and the tracking of individuals.
“In November 2018 the Chafer threat group targeted a Turkish government entity reusing infrastructure that they used in campaigns reported earlier in 2018 by Clearsky, specifically, the domain win10-update[.]com.” reads the analysis published by the experts.
“While we lack visibility into the initial delivery mechanism of this attack, we did observe a secondary payload hosted on 185.177.59
The new payload used in the last attacks is dubbed MechaFlounder, it is the first Python-based malware used by the Chafer APT group. According to the experts, the malware was used as a secondary payload and was used by attackers as a post-exploitation tool.
The payload was bundled as a portable executable using PyInstaller, the malware supports common backdoor commands, including uploading and downloading files, and running commands and applications on the compromised system.
Once infected a system, the backdoor enters a loop and continuously attempts to communicate with the C&C server via HTTP. The C2 can instruct the malicious code to terminate the
“To upload a specified file from the compromised system to the C2 server, the Trojan uses the Browser class in the mechanize module (
“After carrying out the activities for the command, the Trojan will encode the results or output message of the command using the ‘base64.b16encode’ method. Each command has an output message for both a successful and failed execution of the command with the exception of ‘empty’ and ‘terminate’.”
The analysis of the backdoor revealed the use of a parameter previously used in VBScript downloader payloads installed by droppers associated with both Oilrig and Chafer. Experts believe both APT groups might be sharing code.
“This payload, now known as MechaFlounder was created by Chafer using a combination of actor developed code and code snippets freely available online in development communities.”
Palo Alto Networks concludes.
“The MechaFlounder Trojan contains enough functionality for the Chafer actors to carry out the necessary activities needed to accomplish their goals, specifically by supporting file upload and download, as well as command execution functionality,”
(Security Affairs – Chafer APT, hacking)