Ebury
- Type
- Backdoor
- Capabilities
- Credential theftExfiltrationPersistenceDefense evasionLateral movement
- Delivery
- Aitm
- Platforms
- Linux
Ebury is an OpenSSH backdoor and credential stealer with user-space rootkit capabilities, active since at least 2009. It compromises Linux, FreeBSD, and OpenBSD servers, providing persistent unauthorized SSH access and capturing authentication credentials. Its concealment mechanisms hide malicious activity and backdoor logins, and some installations can evade conventional package-integrity checks by leaving packaged libraries unchanged. Stolen credentials are retained in memory for attacker retrieval, with a fallback mechanism for network exfiltration.
Ebury is the core malware family associated with Operation Windigo. Its financially motivated operators expand access through stolen passwords and keys, vulnerabilities in server-administration software, and compromises of hosting-provider infrastructure. Access to provider systems has enabled deployment across thousands of customer servers. Additional malware deployed through the operation supports web traffic redirection, spam proxying, adversary-in-the-middle attacks, and theft of cryptocurrency and payment-card information. Victims include hosting providers, internet service providers, universities, enterprises, cryptocurrency traders, and Tor relay operators, without a demonstrated concentration in a single industry. ESET estimated in May 2024 that almost 400,000 servers had been compromised over the operation's lifetime, with more than 100,000 still infected in late 2023.
Ebury has also been deployed following interception of password-authenticated SSH connections through malicious Tor exit infrastructure. This interception relies on users accepting attacker-controlled SSH host keys rather than breaking SSH encryption. Confirmed infections included management and relay servers, but Ebury infection was not established for every relay associated with the broader interception campaign.
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.
Ebury, active since at least 2009, is an OpenSSH backdoor and credential stealer. It is used to deploy additional malware to: monetize the botnet (such as modules for web traffic redirection), proxy traffic for spam, perform adversary-in-the-middle attacks (AitM), and host supporting malicious infrastructure.
Techniques & procedures
51 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
5 techniques
Resource Development
Senakh admitted that he supported the criminal enterprise by creating accounts with domain registrars which helped build the Ebury botnet infrastructure
allowing Senakh and his co-conspirators to create and operate a botnet comprising tens of thousands of infected servers throughout the world
We’ve seen that the servers we’ve fixed have been misused for distribution of malware, SPAM and, in some cases, to steal credit cards on compromised web servers used for e-commerce.
used the Ebury botnet to generate and redirect internet traffic in furtherance of various click-fraud and spam e-mail schemes
We’ve seen that the servers we’ve fixed have been misused for distribution of malware, SPAM and, in some cases, to steal credit cards on compromised web servers used for e-commerce.
Initial Access
1 technique
Initial Access
Redirected requests would hit DNS servers under the control of Windigo’s operators... These usually hosted exploit kits. Upon successful exploitation, Glupteba would be installed.
Execution
7 techniques
Execution
[Ebury](https://attack.mitre.org/software/S0377) can use the commands `Xcsh` or `Xcls` to open a shell with [Ebury](https://attack.mitre.org/software/S0377) level permissions and `Xxsh` to open a shell with root level.(Citation: ESET Ebury May 2024)
[Ebury](https://attack.mitre.org/software/S0377) has used Python to implement its DGA.(Citation: ESET Ebury Oct 2017)
[Ebury](https://attack.mitre.org/software/S0377) is executed through hooking the keyutils.so file used by legitimate versions of `OpenSSH` and `libcurl`.(Citation: ESET Ebury May 2024)
Ebury uses an abstract UNIX socket to communicate with an external process that will be responsible for data exfiltration.
Trojanized sshd, ssh, ssh-add and the target of the libkeyutils.so.1 symbolic link. | Replacing libkeyutils.so, a library loaded by OpenSSH, with a trojanized version... Patching libkeyutils.so to load libXXX.so instead of the libc.so.6 library.
Replacing libkeyutils.so, a library loaded by OpenSSH, with a trojanized version.
When [Ebury](https://attack.mitre.org/software/S0377) is running as an OpenSSH server, it uses LD_PRELOAD to inject its malicious shared module in to programs launched by SSH sessions. [Ebury](https://attack.mitre.org/software/S0377) hooks the following functions from `libc` to inject into subprocesses; `system`, `popen`, `execve`, `execvpe`, `execv`, `execvp`, and `execl`.(Citation: ESET Ebury Oct 2017)(Citation: ESET Ebury May 2024)
Persistence
5 techniques
Persistence
Senakh and his co-conspirators used the Ebury botnet to generate and redirect internet traffic in furtherance of various click-fraud and spam e-mail schemes
It goes through many evolutions, including our joint analysis of CDORKED on 2013 and the SSH backdoors.
[Ebury](https://attack.mitre.org/software/S0377) modifies the `keyutils` library to add malicious behavior to the OpenSSH client and the curl library.(Citation: ESET Ebury Feb 2014)(Citation: ESET Ebury May 2024)
[Ebury](https://attack.mitre.org/software/S0377) can intercept private keys using a trojanized <code>ssh-add</code> function.(Citation: ESET Ebury Feb 2014)
[Ebury](https://attack.mitre.org/software/S0377) can deactivate PAM modules to tamper with the sshd configuration.(Citation: ESET Ebury Oct 2017)
Stealth
8 techniques
Stealth
[Ebury](https://attack.mitre.org/software/S0377) acts as a user land rootkit using the SSH service.(Citation: ESET Ebury Oct 2017)(Citation: ESET Ebury May 2024)
[Ebury](https://attack.mitre.org/software/S0377) has obfuscated its strings with a simple XOR encryption with a static key.(Citation: ESET Ebury Feb 2014)
The permanently running process listening to this UNIX socket is started by loading the Ebury payload into a legitimate executable using LD_PRELOAD. Abused legitimate processes include: /bin/hostname, /bin/sync, /sbin/auditd, /sbin/rsyslogd... | Abused legitimate processes include: /bin/hostname, /bin/sync, /sbin/auditd, /sbin/rsyslogd, /sbin/udevd...
[Ebury](https://attack.mitre.org/software/S0377) has verified C2 domain ownership by decrypting the TXT record using an embedded RSA public key.(Citation: ESET Ebury Oct 2017)
Senakh and his co-conspirators used the Ebury botnet to generate and redirect internet traffic in furtherance of various click-fraud and spam e-mail schemes
Trojanized sshd, ssh, ssh-add and the target of the libkeyutils.so.1 symbolic link. | Replacing libkeyutils.so, a library loaded by OpenSSH, with a trojanized version... Patching libkeyutils.so to load libXXX.so instead of the libc.so.6 library.
Replacing libkeyutils.so, a library loaded by OpenSSH, with a trojanized version.
When [Ebury](https://attack.mitre.org/software/S0377) is running as an OpenSSH server, it uses LD_PRELOAD to inject its malicious shared module in to programs launched by SSH sessions. [Ebury](https://attack.mitre.org/software/S0377) hooks the following functions from `libc` to inject into subprocesses; `system`, `popen`, `execve`, `execvpe`, `execv`, `execvp`, and `execl`.(Citation: ESET Ebury Oct 2017)(Citation: ESET Ebury May 2024)
Defense Impairment
6 techniques
Defense Impairment
[Ebury](https://attack.mitre.org/software/S0377) has installed a self-signed RPM package mimicking the original system package on RPM based systems.(Citation: ESET Ebury Feb 2014)
Ebury has installed a self-signed RPM package mimicking the original system package on RPM based systems.
[Ebury](https://attack.mitre.org/software/S0377) can intercept private keys using a trojanized <code>ssh-add</code> function.(Citation: ESET Ebury Feb 2014)
[Ebury](https://attack.mitre.org/software/S0377) can deactivate PAM modules to tamper with the sshd configuration.(Citation: ESET Ebury Oct 2017)
[Ebury](https://attack.mitre.org/software/S0377) can disable SELinux Role-Based Access Control and deactivate PAM modules.(Citation: ESET Ebury Oct 2017)
[Ebury](https://attack.mitre.org/software/S0377) disables OpenSSH, system (`systemd`), and audit logs (`/sbin/auditd`) when the backdoor is active.(Citation: ESET Ebury May 2024)
Credential Access
9 techniques
Credential Access
Ebury no longer uses shared memory for storing stolen credentials and maintaining inter-process communication.
HTTP POST requests made to, and from, the servers are leveraged to steal financial details from transactional websites.
[Ebury](https://attack.mitre.org/software/S0377) has intercepted unencrypted private keys as well as private key pass-phrases.(Citation: ESET Ebury Feb 2014)
the malware, which is known as Ebury, harvested log-on credentials from infected computer servers
[Ebury](https://attack.mitre.org/software/S0377) can intercept private keys using a trojanized <code>ssh-add</code> function.(Citation: ESET Ebury Feb 2014)
[Ebury](https://attack.mitre.org/software/S0377) can deactivate PAM modules to tamper with the sshd configuration.(Citation: ESET Ebury Oct 2017)
Toute connexion SSH sur le port 22 transitant par un nœud infecté était redirigée vers l’un des 12 serveurs d’interception SSH.
Ebury operators leverage existing Ebury-compromised servers in the same network segment as their target to perform ARP spoofing.
Since Ebury version 1.5, Ebury starts a process to keep state information and perform credential exfiltration.
Discovery
1 technique
Discovery
The content is a long ATT&CK-style listing of groups and malware that can 'list files and directories,' 'search for files,' 'enumerate drives,' 'gather file metadata,' or 'browse file systems' on compromised hosts.
Collection
3 techniques
Collection
Among the targets are Bitcoin and Ethereum nodes. Ebury automatically steals cryptocurrency wallets hosted on the targeted server once the victim types the password to log into it.
Toute connexion SSH sur le port 22 transitant par un nœud infecté était redirigée vers l’un des 12 serveurs d’interception SSH.
Ebury operators leverage existing Ebury-compromised servers in the same network segment as their target to perform ARP spoofing.
Command and Control
13 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.
The Ebury backdoor is activated by including specific information in the SSH client identification string... An SSH connection enabling the Ebury backdoor contains hexadecimal-encoded data... or base64-encoded data. | The Ebury backdoor is activated by including specific information in the SSH client identification string... Since it is sent before the SSH handshake and key exchange are performed, it is unencrypted.
[Ebury](https://attack.mitre.org/software/S0377) has implemented a fallback mechanism to begin using a DGA when the attacker hasn't connected to the infected system for three days.(Citation: ESET Ebury Oct 2017)
Ebury operators are known to connect daily to compromised systems using the Ebury backdoor to retrieve stolen credentials and system information such as known hosts and users who last connected to the system. | The following domains are used to exfiltrate HTTP POST requests over HTTP or HTTPS.
The following domains are used to exfiltrate HTTP POST requests over HTTP or HTTPS.
[Ebury](https://attack.mitre.org/software/S0377) has used DNS requests over UDP port 53 for C2.(Citation: ESET Ebury Feb 2014)
C2 traffic from ADVSTORESHELL 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.
[Ebury](https://attack.mitre.org/software/S0377) has encoded C2 traffic in hexadecimal format.(Citation: ESET Ebury Feb 2014)
Senakh and his co-conspirators used the Ebury botnet to generate and redirect internet traffic in furtherance of various click-fraud and spam e-mail schemes
To find the server to send this data to, a DNS request is made for the TXT record of a subdomain of one of the following domains... First domain of the sixth iteration of the DGA. | First domain of the sixth iteration of the DGA... First domain of the fifth iteration of the DGA... Below is the list of domains generated by the DGA for each seed by DGA generation.
[Ebury](https://attack.mitre.org/software/S0377) has used a DGA to generate a domain name for C2.(Citation: ESET Ebury Feb 2014)(Citation: ESET Ebury Oct 2017)
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.
[Ebury](https://attack.mitre.org/software/S0377) has encrypted C2 traffic using the client IP address, then encoded it as a hexadecimal string.(Citation: ESET Ebury Feb 2014)
Exfiltration
4 techniques
Exfiltration
If credentials are not collected for two weeks, [Ebury](https://attack.mitre.org/software/S0377) encrypts the credentials using a public key and sends them via UDP to an IP address located in the DNS TXT record.(Citation: ESET Windigo Mar 2014)(Citation: ESET Ebury May 2024)
[Ebury](https://attack.mitre.org/software/S0377) exfiltrates a list of outbound and inbound SSH sessions using OpenSSH's `known_host` files and `wtmp` records. [Ebury](https://attack.mitre.org/software/S0377) can exfiltrate SSH credentials through custom DNS queries or use the command `Xcat` to send the process's ssh session's credentials to the C2 server.(Citation: ESET Windigo Mar 2014)(Citation: ESET Ebury May 2024)
Ebury can exfiltrate SSH credentials through custom DNS queries.
Under certain circumstances, Ebury tries to exfiltrate intercepted credentials by sending an encrypted UDP packet using port 53 (conventionally DNS) as the destination port.
Observables
124 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
73 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.