You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
I change the /etc/passwd file for user privilege escalation. By changing the user id and group id of the user with cargo installed to 0. The user gains root privilege without sudo now. And the XDP program is successfully injected via cargo bpf tool. Don't know if this is a good way. At least, it works without much suffering. :)
I work on WSL2 and it has support eBPF programs since version
5.10.74.3-microsoft-standard-WSL2
.As the
cargo-bpf
doc said:But my
cargo
is installed with rustup, which installs cargo in my user home. Therefore, I got errorsudo cargo: command not found
.I tried with
sudo -E bash -c "cargo bpf load -i eth0 target/bpf/programs/block_http.elf"
. But the error is the same.I also tried use
ip
to load xdp programs, as what is recommended in XDP tutorialHowever, it reminded me the elf file from redbpf did not has a xdp section and
PTR *mut xdp_md type_id=2 Invalid name
:The text was updated successfully, but these errors were encountered: