h3xduck / TripleCross

A Linux eBPF rootkit with a backdoor, C2, library injection, execution hijacking, persistence and stealth capabilities.
GNU General Public License v3.0
1.79k stars 221 forks source link

Makefile 102row -lbpf? how do i install it #43

Open kay6666 opened 2 years ago

kay6666 commented 2 years ago

102 :$(Q)$(CC) $(CFLAGS) $(INCLUDES) $^ -lelf -lbpf -lz -lssl -lcrypto -Wno-deprecated-declarations -o bin/$@ -ldl

root@iZmj7gheya94tuozzw8m0jZ:~/TripleCross/src# make all BINARY kit /usr/bin/ld: cannot find -lbpf: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:102: kit] Error 1

I get this error when I make, what is lbpf?
thanks for helping me

h3xduck commented 2 years ago

Hi, -lbpf is used by gcc for linking against libbpf. You may try installing libbpf in your system:

sudo apt install libbpf-dev

5stars217 commented 2 years ago

Hi @h3xduck. Thanks for providing this research, it's an excellent write up.

I'm having the same issue as kay6666 on ubunutu 20.04: ~/TripleCross/src$ make all BINARY kit /usr/bin/ld: cannot find -lbpf collect2: error: ld returned 1 exit status make: *** [Makefile:102: kit] Error 1

if I run $ sudo apt update sudo apt install libbpf-dev I get sudo apt install libbpf-dev Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libbpf-dev

In fact if I search for the package, it doesn't seem to exist anymore?

sudo apt search libbpf-dev Sorting... Done Full Text Search... Done

I also installed aptitude and tried the same thing. No luck.

if libbpf-dev has been merged into some other project, I couldn't find mention of it.

vr

h3xduck commented 2 years ago

Hi @5stars217, could you try with 21.04? That is the version we are supporting. In 20.04 the package may be called otherwise. In fact you will not only find that build error, but also others such as #42