From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: openssh: privilege separation no longer supported on Cygwin?
Date: Mon, 29 May 2017 11:39:00 -0000 [thread overview]
Message-ID: <20e2702ca3837f5d54c558f8e786c717@xs4all.nl> (raw)
In-Reply-To: <37b863f6-ce5c-ef13-569f-8044fe485075@gmail.com>
On 2017-05-29 10:39, Marco Atzeri wrote:
> On 29/05/2017 07:23, Houder wrote:
[snip]
>> ... because, that is, I think, what I am seeing:
>>
>> - the userid of child sshd is still 'cyg_server' ...
>> - and I get an elevated shell when I login ...
>>
>> Not what I expected ...
>>
>> Gr. Henri
>>
>
> Hi Houder,
> please read the last Announcement
>
> https://sourceware.org/ml/cygwin-announce/2017-03/msg00028.html
[snip]
> It seems you misunderstood the communication:
> - the possibility to NOT use "privilege separation" is deprecated
> - "privilege separation" will became mandatory
Hi Marco,
Sorry for the misunderstanding. Yes, to my knowledge, PS, privilege
separation, is now mandatory (using a new mechanism under Linux [1]).
[1] sandboxing?
Because of PS, I expect to see an UNprivileged sshd process talking
to the user process (where the ssh command has been executed).
But above all, I expect an UNelevated shell when I login in ...
However, what I get after login (after providing my credentials) is
an ELEVATED shell (yes, Administrators is part of the group set).
Now I wonder if this happens because I do NOT observe PS.
Look below, please ... After executing the ssh command, ssh asks for
my credentials ... in stead of providing my credentials, I execute
the ps command in a second terminal. To my surprise, the grandchild
of the listener is executed using "cyg_server" and not "sshd" ...
Currently, I am looking at:
https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview
Regards,
Henri
-----
- pre-authentication:
Shell 1:
64-@@ ssh -p 222 -l Henri 192.168.178.15
Enter passphrase for key '/home/Henri/.ssh/id_rsa': <==== passphrase not
yet entered
Shell 2: (observer)
64-@@# ps -af
UID PID PPID TTY STIME COMMAND
Henri 2308 4356 pty0 11:01:41 /usr/bin/ssh
Henri 5092 176 pty1 11:01:58 /usr/bin/ps
Henri 4356 3744 pty0 10:57:56 /usr/bin/bash
Henri 3744 1 ? 10:57:50 /usr/bin/mintty-273
Henri 176 4604 pty1 10:58:21 /usr/bin/bash
cyg_serv 4992 2476 ? 11:01:03 /usr/sbin/sshd
privileged listener
cyg_serv 2476 1 ? 11:01:03 /usr/bin/cygrunsrv
Henri 4604 1 ? 10:58:21 /usr/bin/mintty-273
cyg_serv 1496 3032 ? 11:01:42 /usr/sbin/sshd
should be using sshd as userid
cyg_serv 3032 4992 ? 11:01:42 /usr/sbin/sshd
privileged monitor (child of listener)
- post-authentication:
Shell 1:
64-@@ ssh -p 222 -l Henri 192.168.178.15
Enter passphrase for key '/home/Henri/.ssh/id_rsa': <==== passphrase has
been entered
Last login: Mon May 29 10:07:00 2017 from 192.168.178.15
64-@@# <===== ///// PROBLEM: this shell is ELEVATED /////
Shell 2: (observer)
64-@@# ps -af
UID PID PPID TTY STIME COMMAND
Henri 2496 3032 pty3 11:02:31 /usr/bin/bash
remote shell (but it is an elevated shell! ?????)
Henri 2308 4356 pty0 11:01:41 /usr/bin/ssh
Henri 4356 3744 pty0 10:57:56 /usr/bin/bash
Henri 3744 1 ? 10:57:50 /usr/bin/mintty-273
Henri 176 4604 pty1 10:58:21 /usr/bin/bash
cyg_serv 4992 2476 ? 11:01:03 /usr/sbin/sshd
privileged listener
Henri 4996 176 pty1 11:06:05 /usr/bin/ps
cyg_serv 2476 1 ? 11:01:03 /usr/bin/cygrunsrv
Henri 4604 1 ? 10:58:21 /usr/bin/mintty-273
cyg_serv 3032 4992 ? 11:01:42 /usr/sbin/sshd
privileged monitor (child of listener)
=====
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2017-05-29 9:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 6:40 Houder
2017-05-29 9:22 ` Marco Atzeri
2017-05-29 11:39 ` Houder [this message]
2017-05-29 11:44 ` openssh: privilege separation no longer supported on Cygwin? -- example only Houder
2017-05-29 14:29 ` openssh: privilege separation no longer supported on Cygwin? Houder
2017-05-29 17:45 ` openssh: privilege separation no longer supported on Cygwin? SURPRISE! Houder
2017-05-29 20:30 ` Andrey Repin
2017-05-30 3:49 ` Houder
2017-05-30 16:16 ` Houder
2017-05-31 4:58 ` Larry Hall (Cygwin)
2017-05-31 10:51 ` Houder
2017-05-31 14:46 ` cyg Simple
2017-05-31 14:57 ` Houder
2017-05-31 14:59 ` openssh: privilege separation no longer supported on Cygwin? SURPRISE! -- minor correction Houder
2017-05-31 16:34 ` openssh: privilege separation no longer supported on Cygwin? SURPRISE! cyg Simple
2017-05-31 19:52 ` Houder
2017-05-31 20:16 ` cyg Simple
2017-06-01 2:27 ` Larry Hall (Cygwin)
2017-05-31 20:20 ` openssh: privilege separation no longer supported on Cygwin? Marco Atzeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20e2702ca3837f5d54c558f8e786c717@xs4all.nl \
--to=houder@xs4all.nl \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).