Re: how an hacker can bypass a chrooted environement ?



On Sun, 14 May 2006, Norbert Francois wrote:

Thank you very much for your replies.

But there's smth I still don't understand. Few months ago I tried to install a jail chroot with "jail" (http://www.jmcresearch.com/projects/jail/howto.html). In the chrooted environement I didn't copy programs like "chroot" (itself), "mknod" or "mount" known to be dangerous... So the only way to bypass this chroot is to manually upload these tools ? If it is the case, the attacker has to inject a code opening a socket on the victim's computer, isn't it ?

Obviously, the mentioned chroot(2), mknod(2) and mount(2) aren't programs, but actual syscalls:

$ man 2 chroot
$ man 2 mknod
$ man 2 mount

Unless there are some mechanisms to enforce syscall execution limitation (like systrace or similar) in place, you are able to execute any syscall inside a chroot jail -- provided you have the required privileges, of course.

Take also a look at the differences between regular chroot and FreeBSD's jail, it might be of some interest to you:

http://en.wikipedia.org/wiki/Chroot_jail
http://en.wikipedia.org/wiki/FreeBSD_Jail

Hope this helps to clarify things a bit;)

Cheers,

--
Marco Ivaldi
Antifork Research, Inc. http://0xdeadbeef.info/
3B05 C9C5 A2DE C3D7 4233 0394 EF85 2008 DBFD B707


------------------------------------------------------------------------------
This List Sponsored by: Cenzic

Concerned about Web Application Security? Why not go with the #1 solution - Cenzic, the only one to win the Analyst's Choice Award from eWeek. As attacks through web applications continue to rise, you need to proactively protect your applications from hackers. Cenzic has the most comprehensive solutions to meet your application security penetration testing and vulnerability management needs. You have an option to go with a managed service (Cenzic ClickToSecure) or an enterprise software (Cenzic Hailstorm). Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. Contact us at request@xxxxxxxxxx for details.
------------------------------------------------------------------------------



Relevant Pages

  • Re: FTP guest access chroot not working
    ... the "root" dir for the chroot is /home/someguy/ftp ... # chroot ftp users ... cannot get out of that jail. ... if you created a symlink inside the jail that points to some real ...
    (comp.unix.sco.misc)
  • Re: /devices jailbreak
    ... however as duplicating device special files does /not/ ... processes in a chroot env will ... duplicates in the chrootjail ultimately lead to the same actual ... But that path will be in the chrootjail, as far as the jailed process ...
    (comp.unix.solaris)
  • Re: /devices jailbreak
    ... processes in a chroot env will ... outside the chroot environment will of course report the device paths ... within the jail as a normal user with the restricted Korn ... directory tree, as expected, except for a couple /devices files ...
    (comp.unix.solaris)
  • Re: /devices jailbreak
    ... however as duplicating device special files does /not/ ... processes in a chroot env will ... duplicates in the chrootjail ultimately lead to the same actual ... But that path will be in the chrootjail, as far as the jailed process ...
    (comp.unix.solaris)
  • Re: exiting chroot()
    ... I understand the need and desire for the chroot jail, ... >> If security is so slack as to let someone login as root to run something ...
    (comp.unix.programmer)

Quantcast