Reputation: 6771
I have a program written in C, which runs chrooted, inside a jail, that makes some system calls e.g system ( "ls" )
. The problem is that the program does not execute the system calls when I run it inside the jail. I have included all the necessary libraries of the executable ( found them with ldd
bash command ), along with the bash executable ( /bin/bash
), and it's libraries ( also found with ldd
). It seems that something is missing. Does anyone have an idea about that?
Upvotes: 4
Views: 993
Reputation: 4495
That might work, but the purpose of having a chroot is generally to prevent attackers from being able to execute arbitrary shell commands. Once you have put /bin/sh into a chroot jail you've eliminated any purpose to having the chroot jail in the first place.
Upvotes: 0