MiniDuke
- Type
- Backdoor
- Capabilities
- ExfiltrationPost exploitationDefense evasionReconnaissance
- Platforms
- Windows
MiniDuke is a Windows cyberespionage toolset comprising downloader, loader, and backdoor components, associated with APT29, also known as the Dukes or Cozy Bear, a threat group attributed to Russia’s Foreign Intelligence Service. Publicly documented in 2013, it has been used against government and diplomatic organizations, including targets in Eastern Europe and former Soviet states. MiniDuke served as a second-stage backdoor during Operation Ghost, which targeted European foreign ministries and diplomatic missions, and has also been deployed onto systems already compromised by other Dukes malware.
Its assembly-written backdoor supports remote command execution, credentialed process creation, process enumeration and termination, extensive file and directory operations, file transfers, drive enumeration, and host profiling. It communicates through HTTP and can relay communications through named pipes, allowing compromised systems without direct internet access to communicate through another infected machine. Analyzed variants support HTTP PUT and POST exfiltration, including encrypted data disguised as JPEG images. MiniDuke can discover command-and-control infrastructure through Twitter, generate new Twitter URLs algorithmically, and fall back to Google Search when its primary discovery mechanism fails.
Evasion techniques include control-flow flattening, hashed API resolution, encrypted strings and configuration, payload compression, and memory cleanup. Some variants derive configuration-encryption keys from host-specific information using a modified SHA-1 routine. MiniDuke is related to CosmicDuke, which combines MiniDuke backdoor technology with the Cosmu information-stealing family.
Associated threat actors
4 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
MiniDuke ... Dynamic Resolution: Domain Generation Algorithms ... Fallback Channels ... Web Service: Dead Drop Resolver.
In parallel, the Duke group was also installing separate malware onto these networks, namely Backdoor.Miniduke and the more elusive Trojan.Seaduke.
In parallel, the Duke group was also installing separate malware onto these networks, namely Backdoor.Miniduke and the more elusive Trojan.Seaduke.
In February 2014 we observed the Miniduke threat actor using the same backdoor on their hacked servers, although using a much stronger password.
Techniques & procedures
36 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
For the SolarWinds Compromise, APT29 used numerous pieces of malware that were likely developed for or by the group, including SUNBURST, SUNSPOT, Raindrop, and TEARDROP.
Initial Access
3 techniques
Initial Access
Command 'exeu' - process creation in a domain environment ... CreateProcessWithLogonW( &Username, &Domain, lpPassword ... )
Phishing (T1566): APT29 uses spearphishing emails with malicious links or attachments to gain initial access.
APT29 has been observed crafting targeted spearphishing campaigns leveraging web links to a malicious dropper; once executed, the code delivers Remote Access Tools (RATs) and evades detection using a range of techniques.
Execution
3 techniques
Execution
Table 1: Implemented commands ... exew execute command ... exec execute command interactively ... exeu execute command interactively as specified domain user
Execution T1106 Execution through API They use CreateProcess or LoadLibrary Windows APIs to execute binaries.
WaitNamedPipeA is used to wait until 11 seconds have elapsed or an instance of the “\\pipe\DefPipe” pipe is available for connection
Persistence
3 techniques
Persistence
Command 'exeu' - process creation in a domain environment ... CreateProcessWithLogonW( &Username, &Domain, lpPassword ... )
The malware creates in HKCU\Software\Microsoft\ApplicationManager a value 'AppID' with the data it calculates from GetTickcount(), used as an identifier/mutex.
Command 'exec' - standard process creation: CreateProcessA ... Command 'exeu' - process creation in a domain environment CreateProcessWithLogonW
Privilege Escalation
4 techniques
Privilege Escalation
Byte = 0x33 – create a new process in the security context of the credentials received from the C2 server
Command 'exeu' - process creation in a domain environment ... CreateProcessWithLogonW( &Username, &Domain, lpPassword ... )
The binary creates a new process that runs in the context of the credentials extracted from the network traffic via a CreateProcessWithLogonW function call
Command 'exec' - standard process creation: CreateProcessA ... Command 'exeu' - process creation in a domain environment CreateProcessWithLogonW
Stealth
8 techniques
Stealth
[MiniDuke](https://attack.mitre.org/software/S0051) can use control flow flattening to obscure code.(Citation: ESET Dukes October 2019)
The encrypted buffer is added to a fake JPEG image (note the file signature in the network traffic) and transmitted to the C2 server without raising any suspicion
Byte = 0x33 – create a new process in the security context of the credentials received from the C2 server
the backdoor also performs a “cleaning” operation by freeing the memory in order to hide possible IOCs that could be extracted from it
Command 'exeu' - process creation in a domain environment ... CreateProcessWithLogonW( &Username, &Domain, lpPassword ... )
The binary creates a new process that runs in the context of the credentials extracted from the network traffic via a CreateProcessWithLogonW function call
Sample A has been debugged until Sample B’s decompression finished... Decryption of module and function names
The buffer to be hashed contains the current computer name concatenated with DWORDs of all interface descriptions... used to create a per-system encryption key for the malware configuration.
Defense Impairment
2 techniques
Defense Impairment
The malware creates in HKCU\Software\Microsoft\ApplicationManager a value 'AppID' with the data it calculates from GetTickcount(), used as an identifier/mutex.
Byte = 0x21 – move a file to a new file ... Byte = 0x22 – copy a file to a new file ... Byte = 0x23 – delete a file ... Byte = 0x25 – create a directory ... Byte = 0x26 – delete a directory
Discovery
5 techniques
Discovery
The malware retrieves the NetBIOS name of the local computer and the user name by calling the GetComputerNameA and GetUserNameA functions
Discovery T1057 Process Discovery The Dukes can list running processes.
[MiniDuke](https://attack.mitre.org/software/S0051) can gather the hostname on a compromised machine.(Citation: ESET Dukes October 2019)
[MiniDuke](https://attack.mitre.org/software/S0051) can enumerate local drives.(Citation: ESET Dukes October 2019)
The buffer to be hashed contains the current computer name concatenated with DWORDs of all interface descriptions... used to create a per-system encryption key for the malware configuration.
Lateral Movement
1 technique
Lateral Movement
this pipe is supposed to be utilized between this machine and another machine that has an Internet connection
Collection
1 technique
Collection
Collection T1005 Data from Local System The Dukes can collect files on the compromised machines
Command and Control
10 techniques
Command and Control
The modified SHA1 algorithm in the MiniDuke sample is used to create a per-system encryption key for the malware configuration.
[MiniDuke](https://attack.mitre.org/software/S0051) uses Google Search to identify C2 servers if its primary C2 method via Twitter is not working.(Citation: Securelist MiniDuke Feb 2013)
Command and Control T1071 Standard Application Layer Protocol The Dukes are using HTTP and HTTPS protocols to communicate with the C&C server.
[MiniDuke](https://attack.mitre.org/software/S0051) uses HTTP and HTTPS for command and control.(Citation: F-Secure The Dukes)(Citation: ESET Dukes October 2019)
The proxy is set to 10.1.1.1:8080 using the InternetSetOptionA function
[MiniDuke](https://attack.mitre.org/software/S0051) can can use a named pipe to forward communications from one compromised machine with internet access to other compromised machines.(Citation: ESET Dukes October 2019)
Some [MiniDuke](https://attack.mitre.org/software/S0051) components use Twitter to initially obtain the address of a C2 server or as a backup if no hard-coded C2 server responds.(Citation: F-Secure The Dukes)(Citation: Securelist MiniDuke Feb 2013)(Citation: ESET Dukes October 2019)
[MiniDuke](https://attack.mitre.org/software/S0051) can download additional encrypted backdoors onto the victim via GIF files.(Citation: Securelist MiniDuke Feb 2013)(Citation: ESET Dukes October 2019)
The request is encoded in a custom BASE64 encoding, using the following alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$~
[MiniDuke](https://attack.mitre.org/software/S0051) can use DGA to generate new Twitter URLs for C2.(Citation: ESET Dukes October 2019)
Exfiltration
2 techniques
Exfiltration
Exfiltration T1041 Exfiltration Over Command and Control Channel The Dukes use the C&C channel to exfiltrate stolen data.
using a named pipe in the case of no Internet connectivity
Impact
1 technique
Impact
Table 1: Implemented commands ... pskill/kill kill a process
Observables
14 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
34 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.