You are not logged in.
Hello everyone
I wonder what I do wrong, I simply cannot chroot to prepared jail.
This is how the jail directory structure looks like:
.
├── bin
│ ├── bash
│ ├── cat
│ ├── chmod
│ ├── ls
│ ├── ping
│ ├── scp
│ ├── sh
│ ├── ssh
│ ├── touch
│ └── whoami
├── etc
│ └── resolv.conf
└── usr
├── lib
│ ├── libcap.so.2
│ ├── libcom_err.so.2
│ ├── libcrypto.so.1.1
│ ├── libc.so.6
│ ├── libdl.so.2
│ ├── libgssapi_krb5.so.2
│ ├── libidn2.so.0
│ ├── libk5crypto.so.3
│ ├── libkeyutils.so.1
│ ├── libkrb5.so.3
│ ├── libkrb5support.so.0
│ ├── libldns.so.3
│ ├── libncursesw.so.6
│ ├── libpthread.so.0
│ ├── libreadline.so.8
│ ├── libresolv.so.2
│ ├── libssl.so.1.1
│ ├── libunistring.so.2
│ └── libz.so.1
└── lib64
└── ld-linux-x86-64.so.2
Every single binary dependency has been checked automatically and manually several times.
When I try to chroot into this directory via
sudo chroot /absolute/path/to/jail/dir /bin/bash
It throws me:
chroot: failed to run command ‘/bin/bash’: No such file or directory
Thanks in advance.
Last edited by wh0@m1r007 (2020-09-26 17:40:08)
Offline
Aren't you supposed to use arch-chroot instead of chroot?
https://wiki.archlinux.org/index.php/Chroot
Edit: I see what you're trying to do. Is the directory a separate mount point?
Last edited by d_fajardo (2020-09-26 19:34:51)
Offline
Edit: I see what you're trying to do. Is the directory a separate mount point?
yes
For example, my regular home directory
/home/user
My chroot jail path
/home/user/chrootjail
Offline
Upd: I've lifted Virtualbox with Ubuntu and it worked as it was initially expected with 0 problems, but it doesn't work in my main machine which runs Arch. Weird.
Offline
The executables and libraries in the chroot are from Arch?
Offline
Can we see
uname -m
file /full/path/to/chroot/bin/bash
ldd /full/path/to/chroot/bin/bash
And as a side note I would observe that your "jail" should not be regarded as secure: https://deepsec.net/docs/Slides/2015/Ch … Balazs.pdf
Offline