REPTILE
- Type
- Rootkit
- Capabilities
- Defense evasionPersistencePrivilege escalationPost exploitation
- Platforms
- Linux
Reptile is an open-source Linux loadable-kernel-module rootkit that combines kernel-level concealment with backdoor and reverse-shell functionality. It can hide its own kernel module, files, directories, processes, network connections, and selected portions of file contents. A user-space control utility communicates with the kernel component through hooked ioctl handling to control concealment and grant root privileges. Reptile uses the KHOOK framework for inline kernel-function hooking.
Its loader decrypts an embedded kernel module and loads it directly through the init_module system call. Reptile supports persistence through udev rules, while observed deployments have also used boot initialization scripts. Its port-knocking mechanism recognizes specially crafted TCP, UDP, or ICMP packets and triggers a reverse connection to an attacker-specified destination. The reverse-shell component is based on TinySHell and uses AES encryption with HMAC-SHA1 integrity protection.
Reptile is deployed after compromise to conceal malicious activity and maintain privileged remote access to Linux systems. It has been used by UNC3886 and identified in Earth Berberoka's toolset. Modified versions are integrated with the Mélofée and SparrowShell Linux implants, although individual variants may retain only a subset of its capabilities. Documented deployments include Linux servers and systems at South Korean organizations. Its public availability and reuse by multiple operators mean that its presence alone does not establish threat-actor attribution.
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.
The kernel component is a modified version of the open-source Reptile rootkit and supports capabilities such as hiding files, processes, and network activity.
“From one of the victims where we found an rshell sample, we also found a binary belonging to the Reptile rootkit framework, a rootkit identified as part of the arsenal of Earth Berberoka.”
Reptile is an open-source kernel module rootkit that targets Linux systems and is publicly available on GitHub. Unlike other rootkit malware that typically only provide concealment capabilities, Reptile goes a step further by offering a reverse shell, allowing threat actors to easily take control of systems.
Techniques & procedures
27 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
Adversaries may buy, steal, or download malware that can be used during targeting.
Initial Access
1 technique
Initial Access
Researchers observed the group deploying Linux rootkits, including REPTILE and MEDUSA, after exploiting vCenter and ESXi vulnerabilities.
Execution
2 techniques
Execution
[REPTILE](https://attack.mitre.org/software/S1219) can deploy components automatically with shell scripts.(Citation: Google Cloud Mandiant UNC3886 2024)
By using the macro, the code bypasses standard C library functions and directly interfaces with the system call: #define init_module(module_image, len, param_values) syscall(__NR_init_module, module_image, len, param_values)
Persistence
7 techniques
Persistence
The [REPTILE](https://attack.mitre.org/software/S1219) reverse shell component can listen for a specialized packet in TCP, UDP, or ICMP for activation.(Citation: Google Cloud Mandiant UNC3886 2024)(Citation: Mandiant Fortinet Zero Day)
[REPTILE](https://attack.mitre.org/software/S1219) has the ability to control compromised endpoints via port knocking.(Citation: Google Cloud Mandiant UNC3886 2024)
The [REPTILE](https://attack.mitre.org/software/S1219) launcher can daemonize a process.(Citation: Google Cloud Mandiant UNC3886 2024)
The Reptile rootkit demonstrates this technique by installing a malicious udev rule under /etc/udev/rules.d/: ACTION=="add", ENV{MAJOR}=="1", ENV{MINOR}=="8", RUN+="/lib/udev/reptile"
[REPTILE](https://attack.mitre.org/software/S1219) has used udev for persistence.(Citation: Google Cloud Mandiant UNC3886 2024)
upon examining the rc.local autorun script, it is evident that a command to ensure persistence exists between the tags “#<intel_audio>” and “#</intel_audio>” | It also supports persistence through Udev. The following rules file is created in the /lib/udev/rules.d/ directory... to ensure that it will be executed even after a reboot.
The [REPTILE](https://attack.mitre.org/software/S1219) rootkit is implemented as a loadable kernel module (LKM).(Citation: Google Cloud Mandiant UNC3886 2024)
Privilege Escalation
6 techniques
Privilege Escalation
Aside from the concealment and Port Knocking features, Reptile provides a feature where the “root” command can be used to give the current user root privileges.
The [REPTILE](https://attack.mitre.org/software/S1219) launcher can daemonize a process.(Citation: Google Cloud Mandiant UNC3886 2024)
The Reptile rootkit demonstrates this technique by installing a malicious udev rule under /etc/udev/rules.d/: ACTION=="add", ENV{MAJOR}=="1", ENV{MINOR}=="8", RUN+="/lib/udev/reptile"
[REPTILE](https://attack.mitre.org/software/S1219) has used udev for persistence.(Citation: Google Cloud Mandiant UNC3886 2024)
upon examining the rc.local autorun script, it is evident that a command to ensure persistence exists between the tags “#<intel_audio>” and “#</intel_audio>” | It also supports persistence through Udev. The following rules file is created in the /lib/udev/rules.d/ directory... to ensure that it will be executed even after a reboot.
The [REPTILE](https://attack.mitre.org/software/S1219) rootkit is implemented as a loadable kernel module (LKM).(Citation: Google Cloud Mandiant UNC3886 2024)
Stealth
11 techniques
Stealth
The first sample we found dropped a rootkit based on a modified version of the open source projet Reptile.
Stripping binaries and appending a single null byte significantly degraded static detections; limited XOR string/configuration encoding and lightweight packing were also used.
Rootkits often rename their processes and threads to match benign system components... kworker, migration, rcu_sched, sshd, systemd, dbus-daemon, or bash.
BridgeAgent ... маскировал свой процесс под /usr/bin/gnome-shell. Некоторые бинарники злоумышленники переименовывали ... чтобы выдать файлы за легитимные агенты SentinelOne и Cybereason.
This direct syscall approach allows the custom loader to insert the Kernel module without relying on higher-level functions, which can help avoid detection mechanisms that monitor typical command-line usage patterns.
Некоторые бинарники злоумышленники ... меняли их временные метки ... Также хакеры меняли временные метки файлов, чтобы затруднить расследование и восстановление хронологии атаки.
The [REPTILE](https://attack.mitre.org/software/S1219) launcher component can decrypt kernel module code from a file and load it into memory.(Citation: Google Cloud Mandiant UNC3886 2024)
The [REPTILE](https://attack.mitre.org/software/S1219) reverse shell component can listen for a specialized packet in TCP, UDP, or ICMP for activation.(Citation: Google Cloud Mandiant UNC3886 2024)(Citation: Mandiant Fortinet Zero Day)
[REPTILE](https://attack.mitre.org/software/S1219) has the ability to control compromised endpoints via port knocking.(Citation: Google Cloud Mandiant UNC3886 2024)
Reptile provides a concealment feature for files, directories, processes, and network communications. | Reptile provides a file tampering feature, which allows the contents of a file to be hidden... the strings between these tags are concealed. | When a PID is given along with the “hide” or “show” command, the process of the PID is concealed... hooking next_tgid() makes it so that the concealment target’s process is skipped, making it invisible in the /proc/ list.
not display files with names containing intel_audio or rc.modules when listing a directory
Command and Control
8 techniques
Command and Control
Based on this, a reverse shell connects to the C&C server.
TABLEFLIP passively listens on all active interfaces for specialized command packets that contain an XOR encoded IP address and port to redirect traffic to using iptables commands.
[REPTILE](https://attack.mitre.org/software/S1219) can communicate using TLS over raw TCP.(Citation: Google Cloud Mandiant UNC3886 2024)(Citation: Mandiant Fortinet Zero Day)
The [REPTILE](https://attack.mitre.org/software/S1219) reverse shell component can listen for a specialized packet in TCP, UDP, or ICMP for activation.(Citation: Google Cloud Mandiant UNC3886 2024)(Citation: Mandiant Fortinet Zero Day)
[REPTILE](https://attack.mitre.org/software/S1219) has the ability to control compromised endpoints via port knocking.(Citation: Google Cloud Mandiant UNC3886 2024)
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.
in the last one it is encrypted using the RC4 algorithm with a hardcoded key
[REPTILE](https://attack.mitre.org/software/S1219) can use TLS over raw TCP for secure C2.(Citation: Google Cloud Mandiant UNC3886 2024)(Citation: Mandiant Fortinet Zero Day)
Observables
7 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
36 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.