LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-31-2004, 05:20 PM   #1
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
FYI: general paper about chrooting


I've just finished writing a general paper about chrooting. It can be found at http://www.linux-corner.net/linux/papers/chrooting.html - please post your comments on here!
 
Old 01-31-2004, 08:22 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Sorry I am not expert enough to comment on your paper on a technical level.
I had heard of a "chroot jail" before but, before reading your paper, had only a vague notion of what it was. Thank you for the very illuminating paper.
 
Old 02-01-2004, 06:00 AM   #3
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Original Poster
Rep: Reputation: 46
Well I am looking for information from people with all kinds of knowledge, so that's fine :-)
 
Old 02-02-2004, 02:45 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Nice doc Markus. Some remarks. I think you should add a piece on setting up a chroot jail, even if only a generic example. I mean, in my eyes the part isn't complete without it because it's the ultimate goal, right? (Yeah, yeah, I know. That'll mean you'll have to write about apps that can't be or are hard to chroot, Glibc, NSS, user/group auth, linkage, (root-owned) socket binding, linux_capabilities, etc etc, but IIRC you could collate nfo from docs (you) posted on LQ). I think it also would be good to list the ways to get out of a chroot (sXid apps, /proc, device or kernelmem access) or provide linkage, because it's an essential part of securing a chroot and chroots being set up for security, list some chroot SW (jail, compartiment?) or provide links.

//mental note, if you're talking about checking, don't forget about the top inode:
Code:
int main(int argc, char **argv) {
  struct stat x;

  if (stat("/", &x)) {
    printf("Unable to stat /");
    exit(EXIT_FAILURE);
  }

  if (x.st_ino==2) {
    printf("I am not chrooted or chrooted on a mountpoint\n");
  } else {
    printf("I am chrooted\n");
  }
  exit(EXIT_SUCCESS);
}
HF
 
Old 02-04-2004, 05:52 AM   #5
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Original Poster
Rep: Reputation: 46
Quote:
Originally posted by unSpawn
Nice doc Markus. Some remarks. I think you should add a piece on setting up a chroot jail, even if only a generic example. I mean, in my eyes the part isn't complete without it because it's the ultimate goal, right? (Yeah, yeah, I know. That'll mean you'll have to write about apps that can't be or are hard to chroot, Glibc, NSS, user/group auth, linkage, (root-owned) socket binding, linux_capabilities, etc etc, but IIRC you could collate nfo from docs (you) posted on LQ). I think it also would be good to list the ways to get out of a chroot (sXid apps, /proc, device or kernelmem access) or provide linkage, because it's an essential part of securing a chroot and chroots being set up for security, list some chroot SW (jail, compartiment?) or provide links.

//mental note, if you're talking about checking, don't forget about the top inode:
Code:
int main(int argc, char **argv) {
  struct stat x;

  if (stat("/", &x)) {
    printf("Unable to stat /");
    exit(EXIT_FAILURE);
  }

  if (x.st_ino==2) {
    printf("I am not chrooted or chrooted on a mountpoint\n");
  } else {
    printf("I am chrooted\n");
  }
  exit(EXIT_SUCCESS);
}
HF
First of all: THANK YOU VERY MUCH FOR YOUR FEEDBACK!

Well I thought to have the paper without a complete example (since the how to chroot part is more or less an "example" of the steps involved). I more thought about adding another service setup tutorial keeping chrooting in mind and relying on the basics of that paper.

About breaking chroots, there is a link to that at the FAQ area ... do you have any other links to be added and expand it? :-)
 
Old 02-18-2004, 06:18 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
do you have any other links to be added and expand it?
Checked out the LQ FAQ: Security references, post #4? :-]
 
Old 02-21-2004, 01:41 PM   #7
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 339

Rep: Reputation: 32
Thank you ....... Ive been looking for more up to date info like this........great work
and I agree with Berhanie and unSpawn about chroot jail....
 
  


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
chrooting nucleocide Linux - Software 2 08-08-2005 04:30 PM
FYI: webproxy (squid) setup tutorial (incl. chrooting and authentification) markus1982 Linux - Networking 0 03-20-2004 09:18 PM
FYI: mysql setup tutorial inl. chrooting markus1982 Linux - Security 0 03-07-2004 10:53 AM
request for questions for a general guide to chrooting markus1982 Linux - Security 5 01-29-2004 05:54 AM
FYI: general guide to chrooting markus1982 Linux - Security 2 06-21-2003 01:58 AM

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

All times are GMT -5. The time now is 12:59 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