POWERSOURCE is a PowerShell backdoor associated with targeted intrusion activity linked by multiple vendors to FIN7, with some historical overlap and confusion involving DNSMessenger-related activity and later reporting that similar infrastructure also appeared in MuddyWater operations. It is described as a heavily obfuscated and modified derivative of the public DNS_TXT_Pwnage tool and is designed to operate largely in memory while using DNS TXT records as a covert command-and-control channel.
POWERSOURCE is typically delivered through malicious Microsoft Office documents in spearphishing campaigns. Reported infection chains include documents that abuse Dynamic Data Exchange to execute PowerShell without relying on macros, as well as documents that drop a VBS script which installs the backdoor. After execution, POWERSOURCE decodes and launches PowerShell payloads, can store components in the Windows Registry, and on systems with newer PowerShell versions can hide a decoded payload in an NTFS alternate data stream for defense evasion.
The malware establishes persistence through Registry Run keys and has also been reported in broader DNSMessenger-style chains that use scheduled tasks and WMI event subscriptions depending on privilege level and host configuration. POWERSOURCE queries Registry locations as part of preparing persistence. Its command-and-control traffic uses DNS TXT queries and responses to exchange attacker tasking and results, allowing remote execution while blending into commonly permitted DNS traffic.
POWERSOURCE has been used to deliver additional payloads, notably the memory-resident PowerShell backdoor TEXTMATE, which provides an interactive reverse shell over DNS, and in some cases Cobalt Strike Beacon. Observed targeting linked to POWERSOURCE activity included U.S.-based organizations in financial services, transportation, retail, education, IT services, and electronics. The malware is best characterized as a PowerShell-based backdoor used for covert post-compromise access, persistence, and staged delivery of follow-on tooling.
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Powersource — Version modifiée de l’outil public DNS_TXT_Pwnage. | Textmate — Distribué par Powersource. S’exécute en mémoire via Powershell.
Palo Alto Networks believe that the recent wave of attacks might have been mistakenly associated with the FIN7 group, it also reported that a C&C server delivering the FIN7-linked DNSMessenger tool was in MuddyWater attacks as well.
29 distinct techniques documented for this family, organized by ATT&CK tactic.
Le vecteur d’infection principalement employé par FIN7 est le courriel d’hameçonnage. Il contient une pièce jointe malveillante et plus rarement une URL pointant vers des sites compromis ou des services légitimes tels que Google Docs.
The eSentire Security Operations Center has observed a spear phishing campaign targeting customers in the financial industry. The email claims to originate from the Securities and Exchange Commission and arrives bundled with a malicious Microsoft Word Document.
...plus rarement une URL pointant vers des sites compromis ou des services légitimes tels que Google Docs.
The emails associated with this malware campaign were spoofed to make them appear as if they had originated from the Securities and Exchange Commission (SEC) Electronic Data Gathering, Analysis, and Retrieval (EDGAR) system.
The command is then executed using the Windows Management Interface (WMI) Win32_Process object using the Create method.
the malware also creates a Scheduled Task on the infected system named "kernel32"
Using this channel, the attackers were able to directly interact with the Windows Command Processor using the contents of DNS TXT record queries and the associated responses generated on the attacker-controlled DNS server.
[POWERSOURCE](https://attack.mitre.org/software/S0145) is a PowerShell backdoor.(Citation: FireEye FIN7 March 2017)(Citation: Cisco DNSMessenger March 2017)
[TEXTMATE](https://attack.mitre.org/software/S0146) executes cmd.exe to provide a reverse shell to adversaries.(Citation: FireEye FIN7 March 2017)(Citation: Cisco DNSMessenger March 2017)
The document uses the Document_Open() function to call another VBA function.
DDE presents the end-user with a message prompt and requires interaction to execute correctly. Clicking Yes on the pop up will initiate the download of DNSMessenger malware.
The document informs the user that it is secured and instructs the user to enable content.
This document contains a malicious Dynamic Data Exchange (DDE) command which attempts to spawn a PowerShell process. Unlike similar spear phishing campaigns, DDE does not use VBA Macros to execute commands.
the malware also creates a Scheduled Task on the infected system named "kernel32"
If the system is running an earlier version of Powershell, the Stage 3 payload is encoded and written to the registry location dictated by the assignment of $reg_win_path earlier with the key name of 'kernel32'.
If the user has administrative privileges on the infected system, it will set up a WMI event consumer and filter as an additional WMI-based persistence mechanism. The filter name is "kernel32_filter" and the consumer name is "kernel32_consumer".
[POWERSOURCE](https://attack.mitre.org/software/S0145) achieves persistence by setting a Registry Run key, with the path depending on whether the victim account has user or administrator access.(Citation: Cisco DNSMessenger March 2017)
the malware also creates a Scheduled Task on the infected system named "kernel32"
If the user has administrative privileges on the infected system, it will set up a WMI event consumer and filter as an additional WMI-based persistence mechanism. The filter name is "kernel32_filter" and the consumer name is "kernel32_consumer".
[POWERSOURCE](https://attack.mitre.org/software/S0145) achieves persistence by setting a Registry Run key, with the path depending on whether the victim account has user or administrator access.(Citation: Cisco DNSMessenger March 2017)
The code in Stage 2 has been obfuscated... Base64 string encoding was also present throughout the script.
A second block of code present in the Powershell is called $stagerCode and is responsible for extracting and decoding the code that was previously stored in the registry, then executing this code, first checking for the presence of the mutex '1823821749'. If this mutex does not exist, execution continues.
If the victim is using PowerShell 3.0 or later, [POWERSOURCE](https://attack.mitre.org/software/S0145) writes its decoded payload to an alternate data stream (ADS) named kernel32.dll that is saved in <code>%PROGRAMDATA%\Windows\</code>.(Citation: Cisco DNSMessenger March 2017)
TEXTMATE is “memory resident” – often described as “fileless” malware.
If the system is running an earlier version of Powershell, the Stage 3 payload is encoded and written to the registry location dictated by the assignment of $reg_win_path earlier with the key name of 'kernel32'.
[POWERSOURCE](https://attack.mitre.org/software/S0145) queries Registry keys in preparation for setting Run keys to achieve persistence.(Citation: Cisco DNSMessenger March 2017)
The malware then queries the system to determine the characteristics of the environment in which it is operating... It specifically checks the version of Powershell that is installed on the system... The malware also obtains the serial number of the system from the BIOS.
[POWERSOURCE](https://attack.mitre.org/software/S0145) uses DNS TXT records for C2.(Citation: FireEye FIN7 March 2017)(Citation: Cisco DNSMessenger March 2017) | [TEXTMATE](https://attack.mitre.org/software/S0146) uses DNS TXT records for C2.(Citation: FireEye FIN7 March 2017)
[POWERSOURCE](https://attack.mitre.org/software/S0145) has been observed being used to download [TEXTMATE](https://attack.mitre.org/software/S0146) and the Cobalt Strike Beacon payload onto victims.(Citation: FireEye FIN7 March 2017)
The 'MSG' queries which are used to send commands to execute and return the output of the executed commands are hex-encoded and use a dot separator after every 30 bytes.
4H RAT has the capability to create a remote shell. AuditCred can open a reverse shell on the system to execute commands. PlugX allows actors to spawn a reverse shell on a victim. QuasarRAT can launch a remote shell to execute commands on the victim’s machine.
This allows the attacker to send commands to be executed directly by the Command Processor and receive the output of those commands all using DNS TXT requests and responses.
They can use very simple techniques for stealing and transferring data from an internal network to an attacker domain such as HTTP/HTTPS, SMTP, DNS, SMTP, P2P, VPN or even the ARP method for data exfiltration.
Several malware programs exfiltrate the stolen information to an attacker-controlled SMTP server.
136 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
28 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.