Re: When does Privilege Seperation work.

From: WarpKat (warpkat@nointegrity.org)
Date: 06/26/02


From: WarpKat <warpkat@nointegrity.org>
Date: Wed, 26 Jun 2002 19:21:46 GMT

On Wed, 26 Jun 2002 08:33:03 -0700, Jesper Dybdal wrote:

> It is used temporarily during authentication. If you run ps commands
> often enough (i.e., in a loop) while you log in using ssh, you will see
> a process running as sshd for a short while.
 
This is true.

This has been changed so that only 2500 lines or so run as root, and the
rest as "unprivelaged."

>From Theo on BugTraq@SecurityFocus.com:

"
Basically, OpenSSH sshd(8) is something like 27000 lines of code. A
lot of that runs as root. But when UsePrivilegeSeparation is enabled,
the daemon splits into two parts. A part containing about 2500 lines
of code remains as root, and the rest of the code is shoved into a
chroot-jail without any privs. This makes the daemon less vulnerable
to attack.
"

It's my assumption that the sshd itself retains root status during it's
running process, but the vulnerable code obtains the non-privelaged user
and is chrooted to /var/empty.

Someone may wish to clarify this.



Relevant Pages

  • Re: When does Privilege Seperation work.
    ... This has been changed so that only 2500 lines or so run as root, ... the daemon splits into two parts. ... chroot-jail without any privs. ... but the vulnerable code obtains the non-privelaged user ...
    (comp.security.ssh)
  • RE: OpenSSH Vulns (new?) Priv seperation
    ... > immune from at least one remote hole." ... lot of that runs as root. ... the daemon splits into two parts. ... chroot-jail without any privs. ...
    (Vuln-Dev)
  • RE: OpenSSH Vulns (new?) Priv seperation
    ... > immune from at least one remote hole." ... lot of that runs as root. ... the daemon splits into two parts. ... chroot-jail without any privs. ...
    (Vuln-Dev)
  • Re: OT? Are chroots immune to buffer overflows?
    ... Of course can buffer overflows be done with success, ... if you are root inside a chroot-jail you are root on the ... As 99.999% of the system binaries aren't available ...
    (Vuln-Dev)