Trojan.Karagany
- Type
- RAT
- Capabilities
- Credential theftKeyloggingExfiltrationPersistenceDefense evasionReconnaissance
- Delivery
- Watering holeExploit kit
- Platforms
- Windows
Karagany, also known as Trojan.Karagany and xFrost, is a Windows remote access trojan available through underground markets and used by the Dragonfly threat group. It has been deployed in watering-hole attacks targeting the energy and oil sectors, including activity associated with the Lightsout exploit kit.
Karagany supports password dumping, theft of browser credentials and data, keystroke capture, desktop screenshots, and document inventory. It gathers information about users and local network configuration and can enumerate running processes using the Windows Tasklist utility. Its plugin-based functionality includes self-deletion capabilities that support cleanup and defense evasion. It creates directories to store plugin output and stage collected data for exfiltration, and establishes persistence through a shortcut in the Windows Startup folder. Some Win32/Karagany variants have also been observed downloading FakeRean rogue security software.
Associated vulnerabilities
1 CVE 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
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)(Citation: Gigamon Berserk Bear October 2021)
Techniques & procedures
37 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
Russian government-sponsored threat actors have been linked to widespread router compromise campaigns in the past... The example from the Secureworks engagement appears to demonstrate how targeted threat groups such as IRON LIBERTY can weaponize their access to routers and Internet infrastructure to gain initial access to targeted systems.
Initial Access
3 techniques
Initial Access
These include phishing emails, redirections to compromised web sites and most recently, trojanized update installers on at least three ICSs vendor web sites, in what are referred to as watering-hole style attacks.
Dragonfly operators hacked websites of at least three different companies providing ICS software... there had already been 250 downloads of the trojanized software... In addition to trojanizing legitimate software used by its victims... the group has more recently begun infecting suppliers
"the attackers compromised vulnerable vendor websites and corrupted legitimate software to inject the Havex RAT. Users would then unknowingly download the malware when downloading otherwise legitimate software from vendor websites."
Execution
3 techniques
Execution
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can perform reconnaissance commands on a victim machine via a cmd.exe process.(Citation: Secureworks Karagany July 2019)
"Corrupted websites in this campaign used the LightsOut and Hello exploit kits... The LightsOut exploit kit abused Java and browser vulnerabilities to deliver the Havex and Karagany payloads."
Analysis of the environment suggests that the most likely scenario was that the threat actor used man-on-the-side techniques to intercept the Adobe installer request when it transited a compromised router outside of the victim organization and then return the trojanized response.
Persistence
3 techniques
Persistence
C:\Users\[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can create a link to itself in the Startup folder to automatically start itself upon system restart.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
Many entries describe creating .lnk shortcut files in the Startup folder, such as DarkGate creating a shortcut to itself as an LNK object in the victim startup folder and Operation Dream Job placing LNK files into victims' startup folders.
Privilege Escalation
5 techniques
Privilege Escalation
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can inject a suspended thread of its own process into a new process and initiate via the <code>ResumeThread</code> API.(Citation: Secureworks Karagany July 2019)
The chaining or combination of multiple legacy vulnerability exploits with exploitation of the newer Windows Zerologon vulnerability
C:\Users\[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can create a link to itself in the Startup folder to automatically start itself upon system restart.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
Many entries describe creating .lnk shortcut files in the Startup folder, such as DarkGate creating a shortcut to itself as an LNK object in the victim startup folder and Operation Dream Job placing LNK files into victims' startup folders.
Stealth
8 techniques
Stealth
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can base64 encode and AES-128-CBC encrypt data prior to transmission.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) samples sometimes use common binary packers such as UPX and Aspack on top of a custom Delphi binary packer.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
07:38:51-07:38:52 — The executed Karagany malware creates relevant directories and copies set170.exe as SearchIndexer.exe to the hard-coded %APPDATA%\Local\SearchIndexer\ installation directory.
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can inject a suspended thread of its own process into a new process and initiate via the <code>ResumeThread</code> API.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) has used plugins with a self-delete capability.(Citation: Secureworks Karagany July 2019)
This type of rounding can indicate manually altered timestamps (also known as timestomping).
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can detect commonly used and generic virtualization platforms based primarily on drivers and file paths.(Citation: Secureworks Karagany July 2019)
Analysis of the environment suggests that the most likely scenario was that the threat actor used man-on-the-side techniques to intercept the Adobe installer request when it transited a compromised router outside of the victim organization and then return the trojanized response.
Credential Access
4 techniques
Credential Access
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can dump passwords and save them into <code>\ProgramData\Mail\MailAg\pwds.txt</code>.(Citation: Symantec Dragonfly)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can capture keystrokes on a compromised host.(Citation: Secureworks Karagany July 2019)
Among other things, it extracts data from a victim’s Outlook address book and virtual private networking (VPN) programs... It’s capable of collecting passwords
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can steal data and credentials from browsers.(Citation: Secureworks Karagany July 2019)
Discovery
8 techniques
Discovery
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can monitor the titles of open windows to identify specific keywords.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can gather information on the network configuration of a compromised host.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can gather information about the user on a compromised host.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can use [netstat](https://attack.mitre.org/software/S0104) to collect a list of network connections.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can use [Tasklist](https://attack.mitre.org/software/S0057) to collect a list of running tasks.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can capture information regarding the victim's OS, security, and hardware configuration.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can enumerate files and directories on a compromised host.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can detect commonly used and generic virtualization platforms based primarily on drivers and file paths.(Citation: Secureworks Karagany July 2019)
Collection
5 techniques
Collection
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can capture keystrokes on a compromised host.(Citation: Secureworks Karagany July 2019)
The content repeatedly describes adversaries and malware storing collected data, command output, credentials, archives, or files in local temporary folders, working directories, hidden directories, registry locations, recycle bins, or specific files prior to exfiltration.
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can create directories to store plugin output and stage data for exfiltration.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can take a desktop screenshot and save the file into <code>\ProgramData\Mail\MailAg\shot.png</code>.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
BoomBox can encrypt data using AES prior to exfiltration. ROKRAT can encrypt data prior to exfiltration by using an RSA public key. Trojan.Karagany can base64 encode and AES-128-CBC encrypt data prior to transmission.
Command and Control
4 techniques
Command and Control
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can communicate with C2 via HTTP POST requests.(Citation: Secureworks Karagany July 2019)
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can upload, download, and execute files on the victim.(Citation: Symantec Dragonfly)(Citation: Secureworks Karagany July 2019)
The content repeatedly describes malware and threat actors using SSL, TLS, HTTPS, RSA, AES, Blowfish, RC4, ECIES, Diffie-Hellman, OpenSSL, WolfSSL, and mutual TLS to protect command and control traffic.
[Trojan.Karagany](https://attack.mitre.org/software/S0094) can secure C2 communications with SSL and TLS.(Citation: Secureworks Karagany July 2019)
Recent activity
47 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.