h3xduck / TripleCross

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makefile 102row -lbpf? how do i install it

kay6666 opened this issue · comments

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

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

sudo apt install libbpf-dev

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

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