Zebrocy
- Type
- Backdoor
- Capabilities
- Credential theftExfiltrationPersistenceDefense evasionReconnaissance
- Delivery
- Spearphishing
- Platforms
- Windows
Zebrocy, also known as Zekapab, is a modular Windows backdoor family associated with APT28, the Russian state-sponsored cyberespionage group also known as Fancy Bear. The family includes C/C++ implementations and a Go-based version. It supports reconnaissance, information collection, additional payload deployment, persistence, and data exfiltration.
Zebrocy collects the current username, system date and time-zone information, running-process details, and information about newly added network drives. Variants capture screenshots in JPEG and BMP formats. It can transfer browser credential-dumping tools onto compromised systems to extract credentials and store them in database files. A backdoor command creates scheduled tasks for persistence, while collected data can be exfiltrated through HTTP POST requests using URL/percent encoding.
Its anti-analysis behavior includes validating its own executable name and searching for processes associated with VMware, VirtualBox, and Parallels. Zebrocy also decodes secondary payloads before writing them to disk and uses AES and XOR to decrypt strings and payloads. These functions support its use as an espionage implant and a platform for deploying further tooling.
Associated threat actors
2 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Historical campaigns by APT28 relied heavily on modular C++ backdoors such as Zebrocy or Sofacy.
PETROVITE demonstrates Stage 1 of the ICS Kill Chain capabilities and targets mining and energy operations in Kazakhstan.
Techniques & procedures
59 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
3 techniques
Initial Access
Multiple entries describe APT28/Pawn Storm/Sofacy campaigns using lure documents, themed emails, and phishing schemes, e.g., “APT28 Hacker Group Targeting Europe, Americas, Asia in Widespread Phishing Scheme”, “New Spear Phishing Campaign Pretends to be EFF”, and “distribution of emails with 'instructions' on 'updating the operating system'”.
Examples include “PowerPoint mouse-over event abused to deliver Graphite implants”, “BREXIT-themed lure document that delivers ZEKAPAB malware”, “fake NATO training docs to breach govt networks”, and repeated references to lure documents delivering Zebrocy or Seduploader.
The attack flow, described below, begins with a phishing email containing a malicious shortened URL.
Execution
8 techniques
Execution
One variant of [Zebrocy](https://attack.mitre.org/software/S0251) uses WMI queries to gather information.(Citation: Unit42 Sofacy Dec 2018)
The Golang backdoor can create a pre-defined scheduled task.
[Zebrocy](https://attack.mitre.org/software/S0251) has a command to create a scheduled task for persistence.(Citation: CISA Zebrocy Oct 2020)
The Golang backdoor uses cmd.exe to execute commands.
The script written to the batch file will run a PowerShell command that drops an executable from the C2
[Zebrocy](https://attack.mitre.org/software/S0251) uses cmd.exe to execute commands on the system.(Citation: ESET Zebrocy May 2019)(Citation: CISA Zebrocy Oct 2020)
The file ... with the name “Seminar.rtf” exploited CVE-2017-0199 ... “Seminar.rtf” downloaded a second stage document ... (4de5adb865b5198b4f2593ad436fceff, exploiting CVE-2017-11882) ... we detected a spearphishing GreyEnergy document ... exploiting CVE-2017-11882
Zebrocy attempts to get users to click on Microsoft Office attachments containing malicious macro scripts.
Persistence
6 techniques
Persistence
UserInitMprLogonScript Windows enables the execution of logon scripts whenever a user or group of users logs into a system. Adding a script’s path to the HKCU\Environment\UserInitMprLogonScript Registry key accomplishes this.
[Zebrocy](https://attack.mitre.org/software/S0251) performs persistence with a logon script via adding to the Registry key <code>HKCU\Environment\UserInitMprLogonScript</code>.(Citation: ESET Zebrocy Nov 2018)
The Golang backdoor can create a pre-defined scheduled task.
[Zebrocy](https://attack.mitre.org/software/S0251) has a command to create a scheduled task for persistence.(Citation: CISA Zebrocy Oct 2020)
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
[Zebrocy](https://attack.mitre.org/software/S0251) creates an entry in a Registry Run key for the malware to execute on startup.(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)
Privilege Escalation
6 techniques
Privilege Escalation
UserInitMprLogonScript Windows enables the execution of logon scripts whenever a user or group of users logs into a system. Adding a script’s path to the HKCU\Environment\UserInitMprLogonScript Registry key accomplishes this.
[Zebrocy](https://attack.mitre.org/software/S0251) performs persistence with a logon script via adding to the Registry key <code>HKCU\Environment\UserInitMprLogonScript</code>.(Citation: ESET Zebrocy Nov 2018)
The Golang backdoor can create a pre-defined scheduled task.
[Zebrocy](https://attack.mitre.org/software/S0251) has a command to create a scheduled task for persistence.(Citation: CISA Zebrocy Oct 2020)
One listed item explicitly names “T1055 Process Injection” and includes APT28-linked malware such as Downdelph among examples.
[Zebrocy](https://attack.mitre.org/software/S0251) creates an entry in a Registry Run key for the malware to execute on startup.(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)
Stealth
12 techniques
Stealth
This redirection process, starting with Google as the first domain the PDF attempts to access, is an obvious Antivirus evasion technique.
[Zebrocy](https://attack.mitre.org/software/S0251)'s Delphi variant was packed with UPX.(Citation: Unit42 Sofacy Dec 2018)(Citation: Accenture SNAKEMACKEREL Nov 2018)
"Gold Dragon encrypts data using Base64..."; "FELIXROOT encrypts collected data with AES and Base64"; "Patchwork encrypted...with AES and then encoded them with base64."; "Pillowmint...encrypted...with AES and further encoded it with Base64."; "Some variants...encode it with base64"; "Zebrocy...hexadecimal for encoding data"
PETROVITE ... T1036 Masquerading ... ERYTHRITE ... T1036 Masquerading
Post-infection, the malware displayed a decoy document to mitigate suspicion
One listed item explicitly names “T1055 Process Injection” and includes APT28-linked malware such as Downdelph among examples.
[Zebrocy](https://attack.mitre.org/software/S0251) has a command to delete files and directories.(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) decodes its secondary payload and writes it to the victim’s machine. [Zebrocy](https://attack.mitre.org/software/S0251) also uses AES and XOR to decrypt strings and payloads.(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)
There are many variations on how malware authors specifically detect sandboxes, but the general theme is that they will check the characteristics of the environment to see whether it looks like a targeted host rather than an automated system.
«Проверка процессов (vmtoolsd, vbox.exe) ... PlugX, Remcos, EvilBunny»; «WMI-запросы ... GravityRAT, OopsIE»; «Ключи реестра ... Smoke Loader, ROKRAT».
«малварь вызывает sleep(60000) или NtDelayExecution и замеряет реальное время ожидания. Если песочница ускоряет таймеры ... обнаруживается расхождение.»
The packed executable loads an AutoIt payload into memory.
Defense Impairment
1 technique
Defense Impairment
Across the content, malware repeatedly 'adds Registry Run keys', 'creates Registry entries', 'modifies the Windows Registry', or 'overwrites registry keys' to maintain persistence.
Credential Access
5 techniques
Credential Access
APT3 has used tools to dump passwords from browsers... Kimsuky has also used Nirsoft's WebBrowserPassView tool to dump the passwords obtained from victims... Mimikatz performs credential dumping to obtain account and password information useful in gaining access to additional systems and enterprise network resources.
PETROVITE ... T1056 Input Capture: Keylogging ... The Appleseed backdoor is a multi-component backdoor that can ... log keystrokes
[Zebrocy](https://attack.mitre.org/software/S0251) installs an application-defined Windows hook to get notified when a network drive has been attached, so it can then use the hook to call its RecordToFile file stealing method.(Citation: Securelist Sofacy Feb 2018)
Agent Tesla can gather credentials from a number of browsers... APT33 has used a variety of publicly available tools like LaZagne to gather credentials... TrickBot can obtain passwords stored in files from web browsers such as Chrome, Firefox, Internet Explorer, and Microsoft Edge... SELECT action_url, username_value, password_value FROM logins; CryptUnprotectData
[Zebrocy](https://attack.mitre.org/software/S0251) has the capability to upload dumper tools that extract credentials from web browsers and store them in database files.(Citation: ESET Zebrocy May 2019)
Discovery
14 techniques
Discovery
[Zebrocy](https://attack.mitre.org/software/S0251) executes the <code>reg query</code> command to obtain information in the Registry.(Citation: ESET Zebrocy May 2019)
[Zebrocy](https://attack.mitre.org/software/S0251) runs the <code>ipconfig /all</code> command.(Citation: ESET Zebrocy May 2019)
[Zebrocy](https://attack.mitre.org/software/S0251) gets the username from the system.(Citation: ESET Zebrocy Nov 2018)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) uses <code>netstat -aon</code> to gather network connection information.(Citation: ESET Zebrocy May 2019)
[Zebrocy](https://attack.mitre.org/software/S0251) uses the <code>tasklist</code> and <code>wmic process get Capture, ExecutablePath</code> commands to gather the processes running on the system.(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)
[Zebrocy](https://attack.mitre.org/software/S0251) collects the OS version and computer name. [Zebrocy](https://attack.mitre.org/software/S0251) also runs the <code>systeminfo</code> command to gather system information. (Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) searches for files that are 60mb and less and contain the following extensions: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .exe, .zip, and .rar. [Zebrocy](https://attack.mitre.org/software/S0251) also runs the <code>echo %APPDATA%</code> command to list the contents of the directory.(Citation: Securelist Sofacy Feb 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019) [Zebrocy](https://attack.mitre.org/software/S0251) can obtain the current execution path as well as perform drive enumeration.(Citation: Accenture SNAKEMACKEREL Nov 2018)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) enumerates information about connected storage devices.(Citation: Unit42 Cannon Nov 2018)
[Zebrocy](https://attack.mitre.org/software/S0251) gathers the current time zone and date information from the system.(Citation: ESET Zebrocy Nov 2018)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) identifies network drives when they are added to victim systems.(Citation: Securelist Sofacy Feb 2018)
There are many variations on how malware authors specifically detect sandboxes, but the general theme is that they will check the characteristics of the environment to see whether it looks like a targeted host rather than an automated system.
«Проверка процессов (vmtoolsd, vbox.exe) ... PlugX, Remcos, EvilBunny»; «WMI-запросы ... GravityRAT, OopsIE»; «Ключи реестра ... Smoke Loader, ROKRAT».
«малварь вызывает sleep(60000) или NtDelayExecution и замеряет реальное время ожидания. Если песочница ускоряет таймеры ... обнаруживается расхождение.»
[Zebrocy](https://attack.mitre.org/software/S0251) collects the serial number for the storage volume C:\.(Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)(Citation: CISA Zebrocy Oct 2020)
Collection
8 techniques
Collection
In addition, Zebrocy file content stealers and keyloggers coded in C# were detected at targets in 2017 and 2018.
PETROVITE ... T1056 Input Capture: Keylogging ... The Appleseed backdoor is a multi-component backdoor that can ... log keystrokes
[Zebrocy](https://attack.mitre.org/software/S0251) installs an application-defined Windows hook to get notified when a network drive has been attached, so it can then use the hook to call its RecordToFile file stealing method.(Citation: Securelist Sofacy Feb 2018)
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.
[Zebrocy](https://attack.mitre.org/software/S0251) stores all collected information in a single file before exfiltration.(Citation: ESET Zebrocy Nov 2018)
A variant of [Zebrocy](https://attack.mitre.org/software/S0251) captures screenshots of the victim’s machine in JPEG and BMP format.(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)(Citation: CISA Zebrocy Oct 2020)
[Zebrocy](https://attack.mitre.org/software/S0251) scans the system and automatically collects files with the following extensions: .doc, .docx, ,.xls, .xlsx, .pdf, .pptx, .rar, .zip, .jpg, .jpeg, .bmp, .tiff, .kum, .tlg, .sbx, .cr, .hse, .hsf, and .lhz.(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019)
[Zebrocy](https://attack.mitre.org/software/S0251) has used a method similar to RC4 as well as AES for encryption and hexadecimal for encoding data before exfiltration. (Citation: Securelist Sofacy Feb 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: CISA Zebrocy Oct 2020)
Command and Control
9 techniques
Command and Control
Both sets of activity used the same servers at the same time and targeted the same organization... different Zebrocy C2 servers, including 193.23.181[.]151 ... Another server we detected that was used both by Zebrocy and by GreyEnergy is 185.217.0[.]124 ... They retrieve additional data from the following URL...
[Zebrocy](https://attack.mitre.org/software/S0251) uses HTTP for C2.(Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)
[Zebrocy](https://attack.mitre.org/software/S0251) uses SMTP and POP3 for C2.(Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy Nov 2018)(Citation: Unit42 Sofacy Dec 2018)(Citation: ESET Zebrocy May 2019)
[Zebrocy](https://attack.mitre.org/software/S0251) obtains additional code to execute on the victim's machine, including the downloading of a secondary payload.(Citation: Palo Alto Sofacy 06-2018)(Citation: Unit42 Cannon Nov 2018)(Citation: ESET Zebrocy May 2019)(Citation: Accenture SNAKEMACKEREL Nov 2018)
ADVSTORESHELL C2 traffic is encrypted, then encoded with Base64 encoding. APT19 HTTP malware variant used Base64 to encode communications to the C2 server. APT33 has used base64 to encode command and control traffic.
[Zebrocy](https://attack.mitre.org/software/S0251) has used URL/Percent Encoding on data exfiltrated via HTTP POST requests.(Citation: Accenture SNAKEMACKEREL Nov 2018)
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.
PETROVITE ... T1573 Encrypted Channel: Asymmetric Cryptography
[Zebrocy](https://attack.mitre.org/software/S0251) uses SSL and AES ECB for encrypting C2 communications.(Citation: ESET Zebrocy Nov 2018)(Citation: ESET Zebrocy May 2019)(Citation: CISA Zebrocy Oct 2020)
Exfiltration
1 technique
Exfiltration
[Zebrocy](https://attack.mitre.org/software/S0251) has exfiltrated data to the designated C2 server using HTTP POST requests.(Citation: Accenture SNAKEMACKEREL Nov 2018)(Citation: CISA Zebrocy Oct 2020)
Observables
41 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
115 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.