LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-29-2014, 06:42 PM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
chroot


Some one care to explain please

I have set up vsftpd OK, seems to work

when I log in as a normal user I can still surf through the system with WinSCP and I'm able to see the the folders like /etc and so on

I've added the lines
Code:
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
let me get this straight, if I add a user to the vsftpd.chroot_list, user is still able to surf the filing system ?

if I dont add a user to the vsftpd.chroot_list, user cant not surf the filing system is that correct ?

I'm going by what this person said on post 17
http://www.cyberciti.biz/tips/vsftp-...directory.html

TT
 
Old 04-30-2014, 03:30 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
WinSCP is making an SSH connection and is not affected by the vsftpd configuration. Consulting your (empty) vsftpd logs should confirm this. It sounds like you need to look at your sshd instead.
 
Old 04-30-2014, 07:28 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
And it is never really proper to assume that a user cannot by some means escape from a "chroot jail." The term is really a misnomer. If you need to protect something, you need to protect it, and you need to protect it. You can't do that successfully just by trying to hide it.
 
Old 04-30-2014, 04:01 PM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by sundialsvcs View Post
And it is never really proper to assume that a user cannot by some means escape from a "chroot jail." The term is really a misnomer. If you need to protect something, you need to protect it, and you need to protect it. You can't do that successfully just by trying to hide it.
Can you show any methods for a non-root user to escape from a properly-created chroot?
 
Old 04-30-2014, 04:04 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
You can find information like that on pen-testing and other 'security' related sites. Your question is leading toward hacking / cracking and it is frowned upon here.

But as a general answer, yes. It is completely possible to 'break out' of a jail. This is mostly by mis-configuration, or over-privileged users, or permissions problems. You should read up on proper jail set up to avoid common pitfalls, and set up monitoring and auditing on usage to detect problems before they spiral out of control.

Last edited by szboardstretcher; 04-30-2014 at 04:06 PM.
 
Old 04-30-2014, 08:14 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by linosaurusroot View Post
Can you show any methods for a non-root user to escape from a properly-created chroot?
Most of them involve a bug.

There are a number of commands that won't work in a jail - Things that have to access process table, things that access certain device functions. Most of the ones that don't work need access to kernel memory. If that IS provided, then a successful hack of root within the jail can break out by altering kernel memory, altering the chroot /dev table and adding a device to access the real root partition. Bugs in the device drivers can also be used to break out.

A fairly old document on the use of chroot: http://www.bpfh.net/simes/computing/chroot-break.html
 
Old 04-30-2014, 09:24 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
In a strict sense, one shouldn't have allowed any access outside the ftp directory. Use other means to access system remotely to access more sensitive mount points.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] chroot ---> su vs. login inside of a chroot greatbear Linux - Virtualization and Cloud 1 08-27-2013 04:13 AM
Chroot in shell scripts: Ensuring that subsequent commands execute within the chroot Kenny_Strawn Programming 2 05-21-2012 12:25 PM
[SOLVED] in chroot compiled programs do not work in chroot graphit Linux From Scratch 2 04-11-2010 03:04 AM
chroot to run hd-installed distro's programs from chroot in live distro? silencestone Linux - Software 0 10-12-2007 06:29 AM
mount command not working in chroot. and now chroot not working mohit.jain Linux From Scratch 5 07-14-2006 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration