LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-21-2004, 12:59 AM   #1
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
kernel level restricted ports?


I heard somewhere that a 'security feature' in the kernel prevented non root programs from binding to ports below 1024 (or some number close to that), to me that seems like a rather insecure way of organizing things because that means that all your public services will be root controled ready for some hacker with a buffer overflow to format your hard drive using root's priv's.

my question; is there a kernel patch or some command toward the proc filesystem that can change this so that normal user programs can use lower numbered ports (ie; 80)

if everything I said is incorrect, please do point and laugh.
 
Old 06-24-2004, 05:31 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
to me that seems like a rather insecure way of organizing things because that means that all your public services will be root controled ready for some hacker with a buffer overflow to format your hard drive using root's priv's.
Lotsa daemons allow you to configure (or compile) them to run under an account with less privileges after binding to a privileged port. Take for instance Apache. The "parent" process runs a root, which allows it to bind to a "low" port, and then creates some child processes that run with less privileges. Those child processes only task is to serve pages, the parent doesn't interact with them in any way and so cannot be (easily) compromised. Processes that don't have process separation or posess a risk in other ways can be chrooted or ran inside UML. A chroot means that even if the daemon was told to perform some unholy action that allowed an attacker to execute commands with the id of the process, it would be contained inside a "jail" that, if configured well, can't be broken out of (easily). (Please check out the LQ FAQ: Security references, hardening.) UML means running Linux inside Linux. A more versatile way of restricting processes from harming the system.


my question; is there a kernel patch or some command toward the proc filesystem that can change this so that normal user programs can use lower numbered ports (ie; 80)


if everything I said is incorrect, please do point and laugh.
Like I've said times and times before,
in my humble opinions there are no stupid questions.
The only thing that's stupid is *not* asking.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Help for kernel level project op4_u Linux - Software 2 09-29-2004 02:50 AM
"Other ports" not available in Security Level configuration tool CUNextTime Red Hat 3 03-11-2004 11:47 AM
how packets handled at kernel level valib4u Programming 5 09-14-2003 03:58 AM
routing at kernel level ramu_ak Linux - Networking 0 08-17-2003 07:40 AM
having users setting up server on restricted ports GŠutama Linux - Networking 6 06-15-2003 01:20 PM

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

All times are GMT -5. The time now is 03:03 PM.

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