chroot, mount --bind, and binfmt_misc without privilege/setup for Linux, https://proot-me.github.io
oxr463 on master
Add link to usage survey [skip… (compare)
oxr463 on master
Add: faccess2(2) syscall Remove extra tab for PR_faccess… (compare)
admin1@hpcadmin:/tmp/tmp.CCJUwj1ek1$ /nix/store/cmfg6pb6v18f5g1wnskl18dzpccmlwy0-util-linux-2.38.1-bin/bin/unshare -r --map-auto -pfn --mount-proc=/proc /nix/store/3z8i6cz460k36xm7qgvf48ijhi027gjy-proot-5.3.1/bin/proot -b etc/passwd:/etc/passwd -b log:/var/log bash
root@hpcadmin:/tmp/tmp.CCJUwj1ek1# ls -alh /etc/passwd
-rw-r--r-- 1 root root 62 okt 25 22:41 /etc/passwd
root@hpcadmin:/tmp/tmp.CCJUwj1ek1# id
uid=0(root) gid=0(root) groups=0(root),65534(nogroup)
root@hpcadmin:/tmp/tmp.CCJUwj1ek1# su test
$ id
uid=1000 gid=100(users) groups=100(users)
$ ls -alh /etc | grep passwd
ls: cannot access '/etc/passwd': Permission denied
-????????? ? ? ? ? ? passwd
proot info: vpid 9: got event 7057f
proot info: vpid 9: sysenter start: statx(0xffffff9c, 0x7ffd2546a601, 0x100, 0x25e, 0x7ffd25469c90, 0xb) = 0xffffffffffffffda [0x7ffd25469c88, 0]
proot info: vpid 9: translate("/" + "/etc/passwd")
proot info: vpid 9: -> "/tmp/tmp.CCJUwj1ek1/etc/passwd"
proot info: vpid 9: sysenter end: statx(0xffffff9c, 0x7ffd25469be8, 0x100, 0x25e, 0x7ffd25469c90, 0xb) = 0xffffffffffffffda [0x7ffd25469c88, 0]
proot info: vpid 9: restarted using 7, signal 0
--seccomp-bpf
Try to enable use of seccomp-bpf (see seccomp(2)) to have ptrace(2)-stops only when system calls that are being traced occur in the traced processes. This option has no effect unless -f/--follow-forks is also
specified. --seccomp-bpf is also not applicable to processes attached using -p/--attach option. An attempt to enable system calls filtering using seccomp-bpf may fail for various reasons, e.g. there are too many
system calls to filter, the seccomp API is not available, or strace itself is being traced. In cases when seccomp-bpf filter setup failed, strace proceeds as usual and stops traced processes on every system call.