Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
TripleCross — A Linux eBPF rootkit with a backdoor, C2, library injection, execution hijacking, persistence and stealth capabilities. | Kitploit
Tools/GitHubGitHub/h3xduck/triplecross
Privilege EscalationPersistence MechanismsCommand and ControlLearning & Education
GitHubh3xduck/triplecross

TripleCross

A Linux eBPF rootkit with a backdoor, C2, library injection, execution hijacking, persistence and stealth capabilities.

View Repository
2.0k243183 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

TripleCross

License GitHub release (latest by date including pre-releases) Maintainability GitHub last commit

TripleCross is a Linux eBPF rootkit that demonstrates the offensive capabilities of the eBPF technology.

TripleCross is inspired by previous implant designs in this area, notably the works of Jeff Dileo at DEFCON 271, Pat Hogan at DEFCON 292, Guillaume Fournier and Sylvain Afchain also at DEFCON 293, and Kris Nóva's Boopkit4. We reuse and extend some of the techniques pioneered by these previous explorations of the offensive capabilities of eBPF technology.

This rootkit was created for my Bachelor's Thesis at UC3M. More details about its design are provided in the thesis document.

Disclaimer

This rookit is purely for educational and academic purposes. The software is provided "as is" and the authors are not responsible for any damage or mishaps that may occur during its use.

Do not attempt to use TripleCross to violate the law. Misuse of the provided software and information may result in criminal charges.

Contents

  1. Features
  2. TripleCross overview
  3. Build and install
  4. Library injection module
  5. Backdoor and C2
  6. Execution hijacking module
  7. Rootkit persistence
  8. Rootkit stealth
  9. License

Features

  1. A library injection module to execute malicious code by writing at a process' virtual memory.
  2. An execution hijacking module that modifies data passed to the kernel to execute malicious programs.
  3. A local privilege escalation module that allows for running malicious programs with root privileges.
  4. A backdoor with C2 capabilities that can monitor the network and execute commands sent from a remote rootkit client. It incorporates multiple activation triggers so that these actions are transmitted stealthily.
  5. A rootkit client that allows an attacker to establish 3 different types of shell-like connections to send commands and actions that control the rootkit state remotely.
  6. A persistence module that ensures the rootkit remains installed maintaining full privileges even after a reboot event.
  7. A stealth module that hides rootkit-related files and directories from the user.

TripleCross overview

The following figure shows the architecture of TripleCross and its modules.

The raw sockets library RawTCP_Lib used for rootkit transmissions is of my authorship and has its own repository.

The following table describes the main source code files and directories to ease its navigation:

DIRECTORYCOMMAND
docsOriginal thesis document
src/clientSource code of the rootkit client
src/client/libRawTCP_Lib shared library
src/commonConstants and configuration for the rootkit. It also includes the implementation of elements common to the eBPF and user space side of the rootkit, such as the ring buffer
src/ebpfSource code of the eBPF programs used by the rootkit
src/helpersIncludes programs for testing the functionality of several rootkit modules, and also the malicious program and library used at the execution hijacking and library injection modules, respectively
src/libbpfContains the libbpf library integrated with the rootkit
src/userSource code of the userland programs used by the rootkits
src/vmlinuxHeaders containing the definition of kernel data structures (this is the recommended method when using libbpf)

Build and Install

Requirements

This research project has been tested under the following environments:

DISTRIBUTIONKERNELGCCCLANGGLIBC
VERSIONUbuntu 21.045.11.010.3.012.0.02.33

We recommend using Ubuntu 21.04, which by default will incorporate the software versions shown here. Otherwise, some of the problems you may run into are described here.

Compilation

The rootkit source code is compiled using two Makefiles.

# Build rootkit
cd src
make all
# Build rootkit client
cd client
make

The following table describes the purpose of each Makefile in detail:

MAKEFILECOMMANDDESCRIPTIONRESULTING FILES
src/client/MakefilemakeCompilation of the rootkit clientsrc/client/injector
src/Makefilemake helpCompilation of programs for testing rootkit capabilities, and the malicious program and library of the execution hijacking and library injection modules, respectivelysrc/helpers/simple_timer, src/helpers/simple_open, src/helpers/simple_execve, src/helpers/lib_injection.so, src/helpers/execve_hijack
src/Makefilemake kitCompilation of the rootkit using the libbpf librarysrc/bin/kit
src/Makefilemake tckitCompilation of the rootkit TC egress programsrc/bin/tc.o

Installation

Once the rootkit files are generated under src/bin/, the tc.o and kit programs must be loaded in order. In the following example, the rootkit backdoor will operate in the network interface enp0s3:

// TC egress program
sudo tc qdisc add dev enp0s3 clsact
sudo tc filter add dev enp0s3 egress bpf direct-action obj bin/tc.o sec classifier/egress
// Libbpf-powered rootkit
sudo ./bin/kit -t enp0s3

Attack scenario scripts

There are two scripts, packager.sh and deployer.sh, that compile and install the rootkit automatically, just as an attacker would do in a real attack scenario.

  • Executing packager.sh will generate all rootkit files under the apps/ directory.

  • Executing deployer.sh will install the rootkit and create the persistence files.

These scripts must first be configured with the following parameters for the proper functioning of the persistence module:

SCRIPTCONSTANTDESCRIPTION
src/helpers/deployer.shCRON_PERSISTCron job to execute after reboot
src/helpers/deployer.shSUDO_PERSISTSudo entry to grant password-less privileges

Footnotes

  1. J. Dileo. Evil eBPF: Practical Abuses of an In-Kernel Bytecode Runtime. DEFCON 27. slides ↩

  2. P. Hogan. Warping Reality: Creating and Countering the Next Generation of Linux Rootkits using eBPF. DEFCON 27. presentation ↩

  3. G. Fournier and S. Afchain. eBPF, I thought we were friends! DEFCON 29. slides ↩

  4. Kris Nóva. Boopkit. github ↩

Download Tool