Derusbi
- Type
- Backdoor
- Capabilities
- KeyloggingExfiltrationPersistenceDefense evasionReconnaissanceProcess injectionByovd
- Platforms
- WindowsLinux
Derusbi, also known as PHOTO, is a backdoor family with Windows and Linux variants used in China-linked cyberespionage operations. It has been used by Axiom, also tracked as Group 72, and Deep Panda, while server-side variants have been observed in Winnti-related intrusions. Telecommunications providers are a documented victim sector.
Derusbi supports surveillance and host discovery through screenshot capture, keylogging, collection of usernames, and identification of current and parent processes. Its Linux variant checks whether it is running as root and can inject itself into the Secure Shell process. Server-side Windows variants support arbitrary command execution, interactive remote shells, service and process management, registry manipulation, file browsing and transfer, DLL download and execution, port forwarding, and proxy functionality.
Command-and-control mechanisms include raw sockets, an HTTP beacon fallback, and traffic obfuscation using variable four-byte XOR keys. Server-side variants can initiate outbound connections or listen for incoming commands. In deployments associated with the HDRoot bootkit, an accompanying rootkit driver detects specially crafted incoming packets and redirects them to the backdoor while concealing files and network activity.
Windows persistence mechanisms include service hijacking and registry-based execution through the Regsvr32 utility. Derusbi has abused a vulnerable Novell driver to disable Driver Signature Enforcement by modifying code-integrity settings, and components have been signed with stolen certificates. Anti-forensic behavior includes file deletion and removal of a loaded Linux kernel module from disk with null-byte overwriting.
Associated vulnerabilities
4 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
7 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
(Citation: FireEye Periscope March 2018)(Citation: CISA AA21-200A APT40 July 2021)
Axiom Derusbi 9002 RAT BLACKCOFFEE Derusbi Ghost RAT HiKit PlugX ZXShell APT17
+1 more in the app. View in Mallory
Techniques & procedures
55 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
Utilize behavioral analytics and endpoint detection tools to identify indicators such as pesistence, service creation, lateral movement via removable drive, driver loading and dll side loading.
"APT40 has been observed leveraging a variety of techniques for initial compromise, including web server exploitation..."
In the supply chain attack, altered files on legitimate update servers or DNAT configuration changes in iptables resulted in software update requests being redirected to an illegitimate server.
Execution
7 techniques
Execution
Execution of arbitrary files or shell commands on infected system ... The library is run by executing the following command line: rundll32.exe %Systemroot%\Help\perfc009.dat R32 <random_number> ... cmd.exe /c net stop sharedaccess
[Derusbi](https://attack.mitre.org/software/S0021) is capable of creating a remote Bash shell and executing commands.(Citation: Fidelis Turbo)(Citation: FireEye Periscope March 2018)
FireEye reported that APT19 was active in 2017 when they used 3 different methods to compromise targets: CVE-2017-0199 vulnerability, macro-enabled Microsoft Excel (XLSM) documents and an application whitelisting bypass to the XLSM documents.
FireEye reported that APT19 was active in 2017 when they used 3 different methods to compromise targets: CVE-2017-0199 vulnerability, macro-enabled Microsoft Excel (XLSM) documents and an application whitelisting bypass to the XLSM documents.
Services management: list of services, creating, starting, stopping, deleting services
altered files on legitimate update servers or DNAT configuration changes in iptables resulted in software update requests being redirected to an illegitimate server
It puts a string with its own path to the “ServiceDll” value in the registry that associates with the “iphlpsvc” or “wuauserv” system service depending on Windows version, and saves the original value of “ServiceDll” in encrypted form to the “Security” parameter of the same registry key.
Persistence
5 techniques
Persistence
The malware stores its configuration data in encrypted form in the “Security” value of the HKLM\SOFTWARE\Microsoft\Rpc registry key.
"APT40 relies heavily on web shells for an initial foothold... provide continued access... re-infect... and facilitate lateral movement."
The malware registers itself as a service if it has run with administrator privileges... There is another service called WinHelpSrv that is added to this list... The file creates a new service named WinHelpSrv (Windows Helper Service)... The malicious DLL is registered as a service by adding the “ServiceDll” value that points to its location.
Hi-Zor executes using regsvr32.exe called from the Registry Run Keys / Startup Folder persistence mechanism. Inception has ensured persistence at system boot by setting the value regsvr32 %path%\ctfmonrn.dll /s.
Utilize behavioral analytics and endpoint detection tools to identify indicators such as pesistence, service creation, lateral movement via removable drive, driver loading and dll side loading.
Privilege Escalation
7 techniques
Privilege Escalation
Aria-body has the ability to inject itself into another process such as rundll32.exe and dllhost.exe... BlackEnergy injects its DLL component into svchost.exe... ComRAT has injected its orchestrator DLL into explorer.exe... Stuxnet injects an entire DLL into an existing, newly created, or preselected trusted process.
[Derusbi](https://attack.mitre.org/software/S0021) injects itself into the secure shell (SSH) process.(Citation: Airbus Derusbi 2015)
Uroburos/Turla exploited a VBox driver; Derusbi exploited a Novell driver; Slingshot exploited a Sandra driver. Duqu 2.0 used CVE-2015-2360 in win32k.sys for kernel execution.
The malware registers itself as a service if it has run with administrator privileges... There is another service called WinHelpSrv that is added to this list... The file creates a new service named WinHelpSrv (Windows Helper Service)... The malicious DLL is registered as a service by adding the “ServiceDll” value that points to its location.
Hi-Zor executes using regsvr32.exe called from the Registry Run Keys / Startup Folder persistence mechanism. Inception has ensured persistence at system boot by setting the value regsvr32 %path%\ctfmonrn.dll /s.
Utilize behavioral analytics and endpoint detection tools to identify indicators such as pesistence, service creation, lateral movement via removable drive, driver loading and dll side loading.
FireEye reported that APT19 was active in 2017 when they used 3 different methods to compromise targets: CVE-2017-0199 vulnerability, macro-enabled Microsoft Excel (XLSM) documents and an application whitelisting bypass to the XLSM documents.
Stealth
14 techniques
Stealth
The rootkit conceals malicious network activity from popular network monitoring tools by hooking the IRP_MJ_DIRECTORY_CONTROL service routine of “DeviceTcp” or “Driver\nsiproxy” system objects. It also hides the file “windows\system32\wiarpc.dll” from user-mode applications by hooking the IRP_MJ_DIRECTORY_CONTROL service routine of the file system driver “FileSystem\Ntfs”.
It copies itself to the folder “%System32%\wbem“, with a name consisting of “ntfs” + three random letters, and a “.mof” extension... Property Value FileDescription ProfSvc ... CompanyName Microsoft Corporation
Aria-body has the ability to inject itself into another process such as rundll32.exe and dllhost.exe... BlackEnergy injects its DLL component into svchost.exe... ComRAT has injected its orchestrator DLL into explorer.exe... Stuxnet injects an entire DLL into an existing, newly created, or preselected trusted process.
[Derusbi](https://attack.mitre.org/software/S0021) injects itself into the secure shell (SSH) process.(Citation: Airbus Derusbi 2015)
Examples throughout the content include deleting tools, logs, malware-related files, staged archives, screenshots, temporary files, and exfiltrated data 'to cover their tracks,' 'reduce their footprint,' 'remove traces of activity,' or as part of 'post-intrusion cleanup.'
[Derusbi](https://attack.mitre.org/software/S0021) is capable of deleting files. It has been observed loading a Linux Kernel Module (LKM) and then deleting it from the hard disk as well as overwriting the data with null bytes.(Citation: Fidelis Turbo)(Citation: FireEye Periscope March 2018)
The driver at the very beginning of the process removes all registry values created during its launch and the actual driver file.
The [Derusbi](https://attack.mitre.org/software/S0021) malware supports timestomping.(Citation: Novetta-Axiom)(Citation: Fidelis Turbo)
[Derusbi](https://attack.mitre.org/software/S0021) variants have been seen that use Registry persistence to proxy execution through regsvr32.exe.(Citation: ThreatGeek Derusbi Converge)
The library is run by executing the following command line: rundll32.exe %Systemroot%\Help\perfc009.dat R32 <random_number>
The malware uses an anti-analysis technique by comparing the image path of the executable with rundll32.exe. It is done to ensure that the file is not executed by a sandbox/analyst (it exits if that’s the case).
altered files on legitimate update servers or DNAT configuration changes in iptables resulted in software update requests being redirected to an illegitimate server
It puts a string with its own path to the “ServiceDll” value in the registry that associates with the “iphlpsvc” or “wuauserv” system service depending on Windows version, and saves the original value of “ServiceDll” in encrypted form to the “Security” parameter of the same registry key.
the malicious process allocates a new memory area in order to write the DLL code inside... the malware uses VirtualProtect in order to change the protection of the area... After the malicious code would be written in the new memory location, the process would pass the execution flow to the new DLL file
Defense Impairment
3 techniques
Defense Impairment
The malware stores its configuration data in encrypted form in the “Security” value of the HKLM\SOFTWARE\Microsoft\Rpc registry key.
Derusbi “also used stolen certificates”; Duqu 2.0 “used stolen Foxconn certificate.”
Examples include disabling DSE, disabling PatchGuard, IAT patching, disabling EDR kernel-user communications, and disabling security-focused kernel ETW providers.
Credential Access
2 techniques
Credential Access
It sniffs all incoming network packets and searches them for a specially crafted signature. If found, it redirects these packets to the listening socket opened by the main malware module.
[Derusbi](https://attack.mitre.org/software/S0021) is capable of logging keystrokes.(Citation: FireEye Periscope March 2018)
Discovery
9 techniques
Discovery
[Derusbi](https://attack.mitre.org/software/S0021) is capable of enumerating Registry keys and values.(Citation: FireEye Periscope March 2018)
A Linux version of [Derusbi](https://attack.mitre.org/software/S0021) checks if the victim user ID is anything other than zero (normally used for root), and the malware will not execute if it does not have root privileges. [Derusbi](https://attack.mitre.org/software/S0021) also gathers the username of the victim.(Citation: Fidelis Turbo)
It sniffs all incoming network packets and searches them for a specially crafted signature. If found, it redirects these packets to the listening socket opened by the main malware module.
GetAdaptersInfo API is utilized to find adapter information for the local machine... The GetNetworkParams function is utilized to obtain network parameters for the local machine.
[Derusbi](https://attack.mitre.org/software/S0021) collects current and parent process IDs.(Citation: Fidelis Turbo)(Citation: FireEye Periscope March 2018)
Several entries describe identifying whether the current user has admin privileges, determining privilege level, identifying groups the user belongs to, or verifying execution as SYSTEM.
[Derusbi](https://attack.mitre.org/software/S0021) gathers the name of the local host, version of GNU Compiler Collection (GCC), and the system information about the CPU, machine, and operating system.(Citation: Fidelis Turbo)
[Derusbi](https://attack.mitre.org/software/S0021) is capable of obtaining directory, file, and drive listings.(Citation: Fidelis Turbo)(Citation: FireEye Periscope March 2018)
The malware uses an anti-analysis technique by comparing the image path of the executable with rundll32.exe. It is done to ensure that the file is not executed by a sandbox/analyst (it exits if that’s the case).
Lateral Movement
2 techniques
Lateral Movement
The Remote Shell library creates two named pipes used to communicate with the main module: pipeusb<random_number>i pipeusb<random_number>o
Utilize behavioral analytics and endpoint detection tools to identify indicators such as pesistence, service creation, lateral movement via removable drive, driver loading and dll side loading.
Collection
4 techniques
Collection
[Derusbi](https://attack.mitre.org/software/S0021) is capable of logging keystrokes.(Citation: FireEye Periscope March 2018)
[Derusbi](https://attack.mitre.org/software/S0021) is capable of performing screen captures.(Citation: FireEye Periscope March 2018)
[Derusbi](https://attack.mitre.org/software/S0021) is capable of performing audio captures.(Citation: FireEye Periscope March 2018)
[Derusbi](https://attack.mitre.org/software/S0021) is capable of capturing video.(Citation: FireEye Periscope March 2018)
Command and Control
9 techniques
Command and Control
Many entries describe XOR, XOR/ADD, bitwise NOT and XOR, ROR plus XOR, hexadecimal encoding after encryption, and custom encoding/obfuscation of HTTP traffic or beacons.
[Derusbi](https://attack.mitre.org/software/S0021) uses a backup communication method with an HTTP beacon.(Citation: Fidelis Turbo)
Machete has sent data over HTTP if FTP failed. Mis-Type first attempts to use a Base64-encoded network protocol over a raw TCP socket for C2, and if that method fails, falls back to a secondary HTTP-based protocol. NETEAGLE will send beacons via an HTTP POST request if the infected host is configured to a proxy.
Traffic redirection via port forwarding: infected host is used as proxy ... starting network proxy
[Derusbi](https://attack.mitre.org/software/S0021) binds to a raw socket on a random source port between 31800 and 31900 for C2.(Citation: Fidelis Turbo)
According to the Unit42 article, the server would respond with a DLL file with 4 exports... the malicious process allocates a new memory area in order to write the DLL code inside... After the malicious code would be written in the new memory location, the process would pass the execution flow to the new DLL file.
[Derusbi](https://attack.mitre.org/software/S0021) has used unencrypted HTTP on port 443 for C2.(Citation: Fidelis Turbo)
The content is a catalog of malware and threat groups that encrypt command-and-control communications using algorithms such as DES, AES, RC4, XOR, Blowfish, RSA, Camellia, RC2, RC6, and custom ciphers.
[Derusbi](https://attack.mitre.org/software/S0021) obfuscates C2 traffic with variable 4-byte XOR keys.(Citation: Fidelis Turbo)
Exfiltration
1 technique
Exfiltration
The encrypted + encoded buffer is exfiltrated to the C2 server via a WinHttpWriteData function call.
Impact
1 technique
Impact
Manage running processes: terminating, retrieving module file name, processes token
Observables
10 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
63 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.