ESET researchers tease aside MQsTTang, a brand new backdoor utilized by Mustang Panda, which communicates through the MQTT protocol
ESET researchers have analyzed MQsTTang, a brand new customized backdoor that we attribute to the Mustang Panda APT group. This backdoor is a part of an ongoing marketing campaign that we are able to hint again to early January 2023. In contrast to a lot of the group’s malware, MQsTTang doesn’t appear to be primarily based on present households or publicly out there initiatives.
Mustang Panda is understood for its custom-made Korplug variants (additionally dubbed PlugX) and elaborate loading chains. In a departure from the group’s standard ways, MQsTTang has solely a single stage and doesn’t use any obfuscation methods.
Victimology
We have now seen unknown entities in Bulgaria and Australia in our telemetry. We even have info indicating that this marketing campaign is concentrating on a governmental establishment in Taiwan. Nonetheless, because of the nature of the decoy filenames used, we imagine that political and governmental organizations in Europe and Asia are additionally being focused. This may even be according to the concentrating on of the group’s different current campaigns. As documented by fellow researchers at Proofpoint, Mustang Panda has been identified to focus on European governmental entities since not less than 2020 and has elevated its exercise in Europe even additional, since Russia’s invasion of Ukraine. Determine 1 reveals our view of the concentrating on for this marketing campaign.

Determine 1. Map exhibiting identified and suspected targets of MQsTTang
Attribution
We attribute this new backdoor and the marketing campaign to Mustang Panda with excessive confidence primarily based on the next indicators.
We discovered archives containing samples of MQsTTang in two GitHub repositories belonging to the consumer YanNaingOo0072022. One other GitHub repository of the identical consumer was utilized in a earlier Mustang Panda marketing campaign described by Avast in a December 2022 blogpost.
One of many servers used within the present marketing campaign was working a publicly accessible nameless FTP server that appears to be used to stage instruments and payloads. Within the /pub/god listing of this server there are a number of Korplug loaders, archives, and instruments that had been utilized in earlier Mustang Panda campaigns. This is similar listing that was utilized by the stager described within the aforementioned Avast blogpost. This server additionally had a /pub/gd listing, which was one other path utilized in that marketing campaign.
A number of the infrastructure used on this marketing campaign additionally matches the community fingerprint of beforehand identified Mustang Panda servers.
Technical evaluation
MQsTTang is a barebones backdoor that enables the attacker to execute arbitrary instructions on a sufferer’s machine and get the output. Even so, it does current some attention-grabbing traits. Chief amongst these is its use of the MQTT protocol for C&C communication. MQTT is usually used for communication between IoT gadgets and controllers, and the protocol hasn’t been utilized in many publicly documented malware households. One such instance is Chrysaor, often known as Pegasus for Android. From an attacker’s perspective, considered one of MQTT’s advantages is that it hides the remainder of their infrastructure behind a dealer. Thus, the compromised machine by no means communicates straight with the C&C server. As seen in Determine 2, this functionality is achieved by utilizing the open supply QMQTT library. This library depends upon the Qt framework, a big a part of which is statically linked within the malware. Utilizing the Qt framework for malware growth can also be pretty unusual. Lazarus’s MagicRAT is likely one of the uncommon lately documented examples.

Determine 2. RTTI exhibiting lessons from the QMQTT library
MQsTTang is distributed in RAR archives which solely include a single executable. These executables often have names associated to Diplomacy and passports reminiscent of:
- CVs Amb Officer PASSPORT Ministry Of Overseas Affairs.exe
- Paperwork members of delegation diplomatic from Germany.Exe
- PDF_Passport and CVs of diplomatic members from Tokyo of JAPAN.eXE
- Word No.18-NG-23 from Embassy of Japan.exe
These archives are hosted on an online server with no related area identify. This truth, together with the filenames, leads us to imagine that the malware is unfold through spearphishing.
To this point, we have now solely noticed a number of samples. In addition to variations in some constants and hardcoded strings, the samples are remarkably related. The one notable change is the addition of some anti-analysis methods within the newest variations. The primary of those consists of utilizing the CreateToolhelp32Snapshot Home windows API operate to iterate by working processes and search for the next identified debuggers and monitoring instruments.
- cheatengine-x86_64.exe
- ollydbg.exe
- ida.exe
- ida64.exe
- radare2.exe
- x64dbg.exe
- procmon.exe
- procmon64.exe
- procexp.exe
- processhacker.exe
- pestudio.exe
- systracerx32.exe
- fiddler.exe
- tcpview.exe
Word that, whereas the malware is a 32-bit executable, it solely checks for the presence of x64dbg and never its 32-bit counterpart, x32dbg.
The second method makes use of the FindWindowW Home windows API to search for the next Window Courses and Titles utilized by identified evaluation instruments:
- PROCMON_WINDOW_CLASS
- OLLYDBG
- WinDbgFrameClass
- OllyDbg – [CPU]
- Immunity Debugger – [CPU]
When executed straight, the malware will launch a replica of itself with 1 as a command line argument. That is repeated by the brand new course of, with the argument being incremented by 1 on each run. When this argument hits particular values, sure duties might be executed. Word that the precise values differ between samples; those talked about under correspond to the pattern with SHA-1 02D95E0C369B08248BFFAAC8607BBA119D83B95B. Nonetheless, the duties themselves and the order by which they’re executed is fixed.
Determine 3 reveals an outline of this habits together with the duties which might be executed when the malware is first run.

Determine 3. Execution graph exhibiting the subprocesses and executed duties
Desk 1 incorporates a listing of the duties and the worth at which every of them is executed. We are going to describe them in additional element within the upcoming paragraphs.
Desk 1. Duties executed by the backdoor
Process quantity | Argument worth | Process description |
---|---|---|
1 | 5 | Begin C&C communication. |
2 | 9 | Create copy and launch. |
3 | 32 | Create persistence copy. |
4 | 119 | Set up persistence. |
5 | 148 | Cease recursive execution. |
If any evaluation software or debugger is detected utilizing the methods we described beforehand, the habits of job 1 is altered and duties 2, 3, and 4 are skipped fully.
Process 1: C&C communication
As was beforehand talked about, MQsTTang communicates with its C&C server over the MQTT protocol. All noticed samples use 3.228.54.173 as dealer. This server is a public dealer operated by EMQX, who additionally occur to be the maintainers of the QMQTT library. This might be a technique to make the community visitors appear legit and to cover Mustang Panda’s personal infrastructure. Utilizing this public dealer additionally gives resiliency; the service is unlikely to be taken down due to its many legit customers and, even when the present C&C servers are banned or taken down, Mustang Panda might spin up new ones and use the identical MQTT subjects with out disrupting MQsTTang’s operation.
Nonetheless, this marketing campaign is also a check case by Mustang Panda earlier than deciding whether or not to speculate the time and assets to arrange their very own dealer. That is supported by the low variety of samples we’ve noticed and the quite simple nature of MQsTTang.
As proven in Determine 4, the malware and C&C server use two MQTT subjects for his or her communication. The primary one, iot/server2, is used for communication from the shopper to the server. The second is used for communication from the server to the shopper. It follows the format iot/v2/<Distinctive ID> the place <Distinctive ID> is generated by taking the final 8 bytes, in hex kind, of a UUID. If any evaluation software is detected, server2 and v2 are respectively changed with server0 and v0. That is doubtless with a view to keep away from tipping off defenders by fully aborting the malware’s execution early.

Determine 4. Simplified community graph of the communication between the backdoor and C&C server
All communication between the server and the shopper makes use of the identical encoding scheme. The MQTT message’s payload is a JSON object with a single attribute named msg. To generate the worth of this attribute, the precise content material is first base64 encoded, then XORed with the hardcoded string nasa, and base64 encoded once more. We are going to describe the precise format of those payloads within the related sections.
Upon first connecting to the dealer, the malware subscribes to its distinctive subject. Then, and each 30 seconds thereafter, the shopper publishes a KeepAlive message to the server’s subject. The content material of this message is a JSON object with the next format:
“Alive”: “<malware’s uptime in minutes>”, “c_topic”: “<shopper’s distinctive subject>”
|
When the server desires to concern a command, it publishes a message to the shopper’s distinctive subject. The plaintext content material of this message is solely the command to be executed. As proven in Determine 5, the shopper executes the obtained command utilizing QProcess::startCommand from the Qt framework. The output, obtained utilizing QProcess::readAllStandardOutput, is then despatched again in a JSON object with the next format:
“c_topic”: “<shopper’s distinctive subject>”, “ret”: “<Command output>”
|

Determine 5. Execution of obtained instructions utilizing the QProcess class
Since solely the content material of ordinary output is shipped again, the server is not going to obtain errors or warnings. From the server’s standpoint, a failed command is thus indistinguishable from a command that merely produces no output except some kind of redirection is carried out.
Duties 2 and three: Copying the malware
The second and third duties are pretty related to one another. They copy the malware’s executable to a hardcoded path; c:userspublicvdump.exe and c:userspublicvcall.exe respectively. The filenames used are completely different for every pattern, however they’re at all times situated within the C:userspublic listing.
Within the second job, the newly created copy is then launched with the command line argument 97.
Process 4: Establishing persistence
Persistence is established by the fourth job, which creates a brand new worth qvlc set to c:userspublicvcall.exe beneath the HKCUSoftwareMicrosoftWindowsCurrentVersionRun registry key. This may trigger the malware to be executed on startup.
When MQsTTang is executed on startup as c:userspublicvcall.exe, solely the C&C communication job is executed.
Conclusion
The Mustang Panda marketing campaign described on this article is ongoing as of this writing. The victimology is unclear, however the decoy filenames are according to the group’s different campaigns that concentrate on European political entities.
This new MQsTTang backdoor gives a sort of distant shell with none of the bells and whistles related to the group’s different malware households. Nonetheless, it reveals that Mustang Panda is exploring new know-how stacks for its instruments. It stays to be seen whether or not this backdoor will change into a recurring a part of the group’s arsenal, however it’s another instance of the group’s quick growth and deployment cycle.
IoCs
Information
SHA-1 | Filename | Detection | Description |
---|---|---|---|
A1C660D31518C8AFAA6973714DE30F3D576B68FC | CVs Amb.rar | Win32/Agent.AFBI | RAR archive used to distribute MQsTTang backdoor. |
430C2EF474C7710345B410F49DF853BDEAFBDD78 | CVs Amb Officer PASSPORT Ministry Of Overseas Affairs.exe | Win32/Agent.AFBI | MQsTTang backdoor. |
F1A8BF83A410B99EF0E7FDF7BA02B543B9F0E66C | Paperwork.rar | Win32/Agent.AFBI | RAR archive used to distribute MQsTTang backdoor. |
02D95E0C369B08248BFFAAC8607BBA119D83B95B | PDF_Passport and CVs of diplomatic members from Tokyo of JAPAN.eXE | Win32/Agent.AFBI | MQsTTang backdoor. |
0EA5D10399524C189A197A847B8108AA8070F1B1 | Paperwork members of delegation diplomatic from Germany.Exe | Win32/Agent.AFBI | MQsTTang backdoor. |
982CCAF1CB84F6E44E9296C7A1DDE2CE6A09D7BB | Paperwork.rar | Win32/Agent.AFBI | RAR archive used to distribute MQsTTang backdoor. |
740C8492DDA786E2231A46BFC422A2720DB0279A | 23 from Embassy of Japan.exe | Win32/Agent.AFBI | MQsTTang backdoor. |
AB01E099872A094DC779890171A11764DE8B4360 | BoomerangLib.dll | Win32/Korplug.TH | Recognized Mustang Panda Korplug loader. |
61A2D34625706F17221C1110D36A435438BC0665 | breakpad.dll | Win32/Korplug.UB | Recognized Mustang Panda Korplug loader. |
30277F3284BCEEF0ADC5E9D45B66897FA8828BFD | coreclr.dll | Win32/Agent.ADMW | Recognized Mustang Panda Korplug loader. |
BEE0B741142A9C392E05E0443AAE1FA41EF512D6 | HPCustPartUI.dll | Win32/Korplug.UB | Recognized Mustang Panda Korplug loader. |
F6F3343F64536BF98DE7E287A7419352BF94EB93 | HPCustPartUI.dll | Win32/Korplug.UB | Recognized Mustang Panda Korplug loader. |
F848C4F3B9D7F3FE1DB3847370F8EEFAA9BF60F1 | libcef.dll | Win32/Korplug.TX | Recognized Mustang Panda Korplug loader. |
Community
IP | Area | Internet hosting supplier | First seen | Particulars |
---|---|---|---|---|
3.228.54.173 | dealer.emqx.io | Amazon.com, Inc. | 2020-03-26 | Professional public MQTT dealer. |
80.85.156[.]151 | N/A | Chelyabinsk-Sign LLC | 2023-01-05 | MQsTTang supply server. |
80.85.157[.]3 | N/A | Chelyabinsk-Sign LLC | 2023-01-16 | MQsTTang supply server. |
185.144.31[.]86 | N/A | Abuse-C Position | 2023-01-22 | MQsTTang supply server. |
Github repositories
- https://uncooked.githubusercontent[.]com/YanNaingOo0072022/14/most important/Paperwork.rar
- https://uncooked.githubusercontent[.]com/YanNaingOo0072022/ee/most important/CVs Amb.rar
MITRE ATT&CK methods
This desk was constructed utilizing version 12 of the MITRE ATT&CK framework.
Tactic | ID | Title | Description |
---|---|---|---|
Useful resource Growth | T1583.003 | Purchase Infrastructure: Digital Non-public Server | Some servers used within the marketing campaign are on shared internet hosting. |
T1583.004 | Purchase Infrastructure: Server | Some servers used within the marketing campaign appear to be unique to Mustang Panda. | |
T1587.001 | Develop Capabilities: Malware | MQsTTang is a customized backdoor, in all probability developed by Mustang Panda. | |
T1588.002 | Receive Capabilities: Software | A number of legit and open- supply instruments, together with psexec, ps, curl, and plink, had been discovered on the staging server. | |
T1608.001 | Stage Capabilities: Add Malware | MQsTTang was uploaded to the net server for distribution. | |
T1608.002 | Stage Capabilities: Add Software | A number of instruments had been uploaded to an FTP server. | |
Preliminary Entry | T1566.002 | Phishing: Spearphishing Hyperlink | MQsTTang is distributed through spearphishing hyperlinks to a malicious file on an attacker-controlled internet server. |
Execution | T1106 | Native API | MQsTTang makes use of the QProcess class from the Qt framework to execute instructions. |
T1204.002 | Person Execution: Malicious File | MQsTTang depends on the consumer to execute the downloaded malicious file. | |
Persistence | T1547.001 | Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder | MQsTTang persists by making a registry Run key. |
Protection Evasion | T1036.004 | Masquerading: Masquerade Process or Service | In most samples, the registry key’s created with the identify qvlc. This matches the identify of a legit executable utilized by VLC. |
T1036.005 | Masquerading: Match Professional Title or Location | When creating copies, MQsTTang makes use of filenames of legit packages. | |
T1480 | Execution Guardrails | MQsTTang checks the paths it’s executed from to find out which duties to execute. | |
T1622 | Debugger Evasion | MQsTTang detects working debuggers and alters its habits if any are discovered to be current. | |
Command and Management | T1071 | Utility Layer Protocol | MQsTTang communicates with its C&C server utilizing the MQTT protocol. |
T1102.002 | Internet Service: Bidirectional Communication | MQsTTang makes use of a legit public MQTT dealer. | |
T1132.001 | Knowledge Encoding: Normal Encoding | The content material of the messages between the malware and server is base64 encoded. | |
T1573.001 | Encrypted Channel: Symmetric Cryptography | The content material of the messages between the malware and server is encrypted utilizing a repeating XOR key. | |
Exfiltration | T1041 | Exfiltration Over C2 Channel | The output of executed instructions is shipped again to the server utilizing the identical protocol. |
Latest News
-
Three males discovered responsible of laundering $2.5 million in Goal reward card tech assist rip-off
-
A Nearer Have a look at the Snatch Information Ransom Group – Krebs on Safety
-
UK knowledge regulator orders finish to spreadsheet FOI requests after critical knowledge breaches
-
Securing AI: What You Ought to Know
-
5 of the most well-liked programming languages in cybersecurity