By Joey Chen and Amitai Ben Shushan Ehrlich, with additional insights from QGroup
- A new threat cluster we track as WIP19 has been targeting telecommunications and IT service providers in the Middle East and Asia.
- We assess it is highly likely this activity is espionage-related and that WIP19 is a Chinese-speaking threat group.
- The threat cluster has some overlap with Operation Shadow Force but utilizes new malware and techniques.
- WIP19 utilizes a legitimate, stolen certificate to sign novel malware, including SQLMaggie, ScreenCap and a credential dumper.
SentinelLabs has been monitoring a threat cluster we track as WIP19, a group characterized by the usage of a legitimate, stolen digital certificate issued by a company called “DEEPSoft”. Based on our investigations, WIP19 has been targeting telecommunications and IT service providers in the Middle East and Asia.
Throughout this activity, the threat actor abused the certificate to sign several malicious components. Almost all operations performed by the threat actor were completed in a “hands-on keyboard” fashion, during an interactive session with compromised machines. This meant the attacker gave up on a stable C2 channel in exchange for stealth.
Our analysis of the backdoors utilized, in conjunction with pivoting on the certificate, suggest portions of the components used by WIP19 were authored by WinEggDrop, a well-known Chinese-speaking malware author who has created tools for a variety of groups and has been active since 2014.
The use of WinEggDrop-authored malware, stolen certificates and correlating TTPs indicate possible links to Operation Shadow Force, as reported by TrendMicro and AhnLab. As the toolset itself appears to be shared among several actors, it is unclear whether this is a new iteration of operation “Shadow Force” or simply a different actor utilizing similar TTPs. The activity we observed, however, represents a more mature actor, utilizing new malware and techniques.
We linked an implant dubbed “SQLMaggie”, recently described by DCSO CyTec, to this set of activity. SQLMaggie appears to be actively maintained and provides insights into the development timeline with hardcoded version names. In addition, we identified a number of other pieces of malware utilized by this threat actor.
This report focuses on detailing the set of activity we track as WIP19 and provides further context around the usage of these new tools.
Abusing Valid Digital Certificates
WIP19 has been observed signing malware with a valid digital certificate issued for DEEPSoft Co., Ltd., a Korean company specializing in messaging solutions. The threat actor used the certificate to sign several malware components, some of which were tailor-made for specific targets. We assess that it is highly likely the certificate was stolen, as it was also used to sign legitimate software used by DEEPSoft in the past.
Activity involving toolsets authored by WingEggDrop and signed with both legitimate and fake certificates has been previously reported on by AhnLab. It’s commonly understood that malware created by WinEggDrop is shared among several threat clusters, making it possible that these associated toolsets could also be in use by the WIP19 threat actor.
Like many components utilized by WIP19, all their credential harvesting tools – consisting mainly of password dumpers – were signed using the DEEPSoft certificate. The main dumper used by the threat actor utilized open source projects to load an SSP to LSASS and then dump the process.
WIP19’s password dumper consists of two components, one used as a loader, and the other as a dumper. On many of the instances observed, the dumper was executed using WMIEXEC.
The dumper loader component is a signed EXE file, internally dubbed
ssp_rpc_loader, as indicated from the PDB path embedded within the file. As the name suggests, the loader uses RPC to load a malicious DLL file as an SSP (Security Support Provider), given as an argument. The loader appears to be taken from an open source project available on GitHub.
The actual SSP loaded is NanoDump, which is loaded into LSASS and creates a minidump of the process. Loading NanoDump as an SSP is a built-in function embedded within NanoDump. This is done utilizing the MiniDumpWriteDump API. The dump will be created in the following path:
Much like the loader, the threat actor did not bother to remove the PDB path for the DLL dumper.
Combining both components, a full execution of the dumper will look like this:
Keylogger & Screen Recording (ScreenCap)
WIP19 has been observed utilizing a less-common (although documented) DLL search order hijacking of
explorer.exe to load a keylogging and screen recording component internally named
The threat actor dropped the malicious, signed DLL, in the path
c:\windows\linkinfo.dll. Dropping the file in this specific path triggers the loading of the DLL into
explorer.exe the next time it is executed. The threat actor may manually kill and restart the
explorer.exe process to initiate the screen recording and keylogging functionality.
The ScreenCap malware performs checks involving the victim’s machine name, indicating it is specially crafted for each deployment. This does not prevent the actor from re-signing each of the payloads with the DEEPSoft certificate, proving the actors have direct access to the stolen certificate.
After verifying it is executed on the correct machine, the ScreenCap malware drops a RAR CLI binary in one of the following paths, according to the target’s operating system:
C:\Documents and Settings\All Users\Application Data\dwmgr.exe C:\Users\Public\AppData\MsTemp\dwmgr.exe
The keylogging functionality mainly focuses on the user’s browser. The malware detects the user’s browser and logs all keystrokes to
.ax files stored in its current working directory. By default, it will keylog Internet Explorer activity, but it also supports keylogging of other popular browsers including Chrome and Opera.
A relatively unique TTP observed in this activity is the recording of the user’s screen. Much like keylogging, this helps the actor harvest credentials and access sensitive information. The malware will record the screen for 1,296,000 milliseconds at a time, 30 times, and store the output as
.avi files in its current working directory.
During our analysis of the ScreenCap malware, we identified a number of samples that contained hardcoded victim IDs. This indicates that some of the intrusions are well researched and highly targeted.
ExtendedProcedure SQL (SQLMaggie)
Whilst we did not observe the initial infection vector in this intrusion, the SQLmaggie malware dropped on victim networks targets Windows systems and has to be executed in an MSSQL server. This provided us a foundation from which to investigate further.
We found that SQLMaggie masquerades as a legitimate DLL containing extended stored procedure functions for an MSSQL Server. The executed methodology uses the
sp_addextendedproc function to register an external DLL in a MSSQL server. After registering the DLL into the MSSQL server, the threat actor is able to fully control the server machine and use this backdoor to conduct reconnaissance in the internal network. For instance:
sp_addextendedproc 'malicious', 'c:\Program Files\Microsoft SQL Server\MSSQL13.0.MSSQLSERVER\MSSQL\Binn\malicious.dll';
Our analysis showed that this backdoor was authored by WinEggDrop.
From the timestamp of the sample, we can confirm the first version of this backdoor variant was developed in or before 2019. Available commands in each version vary according to the target environment. Unlike some of the other components which can be found on public, open-source repositories, neither the source code nor the executable for SQLMaggie appear to be publicly available. This suggests that the tool is either sold or used privately, or is in exclusive use by WinEggDrop.
Below we detail SQLMaggie backdoor commands and capabilities. The following commands appear in all versions of SQLMaggie.
|SysInfo||Show system information and detected is it in the VM or not|
|FileAccess||Modify file permissions|
|Type||Open file and print the strings inside|
Additionally, the following commands appear variously in different versions of SQLMaggie coded for specific targets.
|StopSocks5||Stop Socks5 tunnel stopped|
|StartHook||Start WinSock socket hook|
|StopHook||Stop Winsock socket Hook|
|ResetClientData||Attacker input information|
|ViewClientData||Show client data, attacker input information|
|TS||Checking regkey about TermService and its port|
|ListIP||Get host name, IP|
|CheckPath||Get data path|
|StartSocks5||Create Socks5 tunnel|
|SetClient||Set client data, include hook winsock and allow ip, port|
|SetFile||Set file attributes|
|GetUser||Using ROOT\\CIMV2 to get host account|
|GetModule||Print out the execute module file path|
|ScanStatus||Scan the victim’s environment machines|
|StopScan||Terminate all scan threads|
|GetAdmin||Get domain admin account|
|SqlCheck||Check SQL server is running and list username & password|
|SqlScan||Create a thread to scan for SQL server|
|Exploit Run||Use exploit to execute process|
|Exploit AddUser||Use exploit to add user|
|Exploit Clone||Use exploit to clone user|
|Exploit TS||Use exploit to install TermService on a machine|
|StartHook||Hook WinSock socket and show client data, attacker input information|
|Port||Check if port is open|
|WriteAll||MSSQLServer Write permission|
|AccessAll||MSSQLServer Access permission|
We assess it is highly likely this activity is espionage-related and that WIP19 is a Chinese-speaking threat group. The Work-In-Progress (WIPxx) designation is used for unattributed clusters of activity. A WIP may represent activity that fits under the umbrella of an existing – but thus far unknown – actor or ultimately represent the activity of a new threat actor.
The intrusions we have observed involved precision targeting and were low in volume. Specific user machines were hardcoded as identifiers in the malware deployed, and the malware was not widely proliferated. Further, the targeting of telecommunications and IT service providers in the Middle East and Asia suggest the motive behind this activity is espionage-related. Communications providers are frequent targets of espionage activity due to the kinds and amount of sensitive data they hold.
The overlap with Operation Shadow Force through a possible common developer in WinEggDrop, and the fact their tooling has been observed in other Chinese espionage-related activity, supports the assessment that this activity is likely being carried out by a thus far unidentified Chinese-speaking threat group. The hardcoding of machine identifiers and the usage of malware to log keystrokes and screenshot specific user machines, suggests that WIP19 is after very specific information.
WIP19 is an example of the greater breadth of Chinese espionage activity experienced in critical infrastructure industries. The existence of reliable quartermasters and common developers enables a landscape of hard-to-identify threat groups that are using similar tooling, making threat clusters difficult to distinguish from the defenders point of view. We hope this report helps move the needle forward in the effort to continue identifying threat groups engaged in spying on industries critical to society.
SentinelLabs continues to track this activity to provide further insight into their evolution and future activity.
Indicators of Compromise
|SQLMaggie SHA1||Real File Name|
|ScreenCap SHA1||Real File Name|
|Hacking Tool SHA1||Description|
|da876cd6e3528f95aafb158713d3b21db5fc780b||Browser credential stealer|
|1121324a15e6714e4313dfa18c8b03a6da381ba1||Credential dumper loader|
|9bedb5810536879fae95c70a918eb90ac628953e||Network scanning tool|
|afe25455804a7afb7639cb4e356cb089105be82d||Port relay tool|
|37cca724227a8e77671ecde3d295f5b98531705b||Credential dumper loader|
|2eeb46d538c486f8591a78a65dde250b0bf62f89||Windows domain tool|