Boopkit: eBPF backdoor (TCP) for spawning reverse shells
github.com
github.com
- Bad-bpf: https://github.com/pathtofile/bad-bpf
- Offensive BPF: https://embracethered.com/blog/posts/2021/offensive-bpf/
- Ebpf, I thought we were friends: https://m.youtube.com/watch?v=5zixNDolLrg
> I assume this goes without saying but obviously this isn't going to go root any old TCP server folks. You need to have root on a box first, install the rootkit, and then its effectively a backdoor. This isn't going to go pop TCP servers in the wild. Also important to call out that any networking equipment worth its weight is going to block these malicious packets long before they reach the host.
> Its a demo. Let's simmer down everyone.
This is a research project that demonstrates how to access a system in unconventional ways. This allows a user with previously privileged access to install boopkit so they can access with the same privileges again in the future without SSH or other conventional methods.
Never heard about eBPF before. Since then I've read up on eBPF and its use in low-latency engineering, which I found fascinating. And now I see your post here.
Such a small world!!
You may be thinking of privilege escalation vulnerabilities which allow you to run things at a higher privilege level than you are supposed to have. i.e. Running something as root if you are only supposed to be able to run things as a normal user. In a way a backdoor is a privilege escalation vulnerability that you deliberately put into a system.
Next steps are BPF pinning and probably a few userspace hiding tactics. Constraints for the project is that I will not use a kernel module or LD Preload. Additionally I’m going to have sets of triggers in addition to a bad IPv4 checksum. Most modern network equipment will drop the malformed packet long before it reaches a target with a bad checksum.
Other ideas are encapsulating RCE over IPv6 (there are 24 bytes available) and using SYNACK retries and TCP RST to also trigger the reverse protocol.
We can also probably slim compile time and runtime dependencies down if we lose the hacky double ncat protocol thing I have going on and just open up a reverse socket directly. Which means we should also have the remote not run as root for obvious reasons.
I have a lot of ideas, as our friends in Ukraine tell me their needs I’ll be posting more research to the repository to aid them as much as possible.