A new PowerShell-based malware called PowerExchange has been discovered in attacks linked to APT34, a state-sponsored hacking group from Iran. The malware was used to backdoor on-premise Microsoft Exchange servers, allowing the threat actors to gain unauthorized access.
After infiltrating the servers through a phishing email with a malicious executable, the attackers deployed a web shell named ExchangeLeech to steal user credentials.
PowerExchange communicates with its command-and-control server through emails using the Exchange Web Services API, making it difficult to detect as it appears as benign traffic.
The PowerExchange backdoor provides the hackers with control over the compromised servers, enabling them to execute commands and deliver additional malicious payloads.
During the investigation, the FortiGuard Labs Threat Research team also discovered other compromised endpoints with various malicious implants.
The ExchangeLeech web shell, masquerading as a legitimate IIS file, collects usernames and passwords by monitoring clear text HTTP traffic and capturing credentials from webform data or HTTP headers. The attackers can instruct the web shell to send the stolen credential logs via cookie parameters.
FortiGuard Labs linked these attacks to APT34 based on similarities between PowerExchange and the TriFive malware previously used by the group.
Both backdoors are written in PowerShell, activated by scheduled tasks, and leverage the organization’s Exchange server with the EWS API for their command-and-control communication.
While the researchers believe PowerExchange is an improved version of TriFive, they have identified notable differences in their code. APT34, also known as Oilrig, has a history of using phishing emails as an initial infection vector and has previously targeted entities in the United Arab Emirates.