public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: "MAUPERTUIS, PHILIPPE" <philippe.maupertuis@equensworldline.com>
Subject: Re: Matching SSHD information in audit logs
Date: Tue, 17 Dec 2019 09:20:41 -0500	[thread overview]
Message-ID: <2177815.HFh0nK17a1@x2> (raw)
In-Reply-To: <5F4EE10832231F4F921A255C1D95429822CB57@DEERLM99EX7MSX.ww931.my-it-solutions.net>

On Tuesday, December 17, 2019 5:57:53 AM EST MAUPERTUIS, PHILIPPE wrote:
> Hi,
> When setting the SSHD log level to verbose as recommended by the CIS, I get
> the following in the secure log : Dec 17 11:32:29 myserver sshd[8456]:
> Connection from xx.xx.xx.xx port 44090 on xx.xx.xx.xx port 22 Dec 17
> 11:32:30 myserver sshd[8456]: Accepted key RSA SHA256: qhpzQKKbwaX8 found
> at /usr/bin/sss_ssh_authorizedkeys:1 Dec 17 11:32:30 myserver sshd[8456]:
> Postponed publickey for myuser from xx.xx.xx.xx port 44090 ssh2 [preauth]
> Dec 17 11:32:30 myserver sshd[8456]: Accepted key RSA SHA256: qhpzQKKbwaX8
> found at /usr/bin/sss_ssh_authorizedkeys:1 Dec 17 11:32:30 myserver
> sshd[8456]: Accepted publickey for myuser from xx.xx.xx.xx port 44090
> ssh2: RSA SHA256: qhpzQKKbwaX8 Dec 17 11:32:30 myserver sshd[8456]:
> pam_unix(sshd:session): session opened for user myuser by (uid=0) Dec 17
> 11:32:31 myserver sshd[8456]: User child is on pid 8460
> Dec 17 11:32:31 myserver sshd[8460]: Starting session: shell on pts/4 for
> myuser from xx.xx.xx.xx port 44090 id 0
> 
> What are the corresponding events in audit ?

I don't think anyone has ever tried to map between syslog and audit. I also 
think that CIS maybe doesn't understand audit and how it works. For quite 
some time, there has been a requirement to log any key lifecycle in the audit 
logs. This means that the DH key exchange and the session keys get logged 
when they are created and when they are destroyed. Also, pam logs the session 
beginning and end. And sshd logs any keys that it accepts. So, I think the 
information is there if one wanted or needed to map between them. But it 
should be unnecessary. I'm not sure what CIS is looking for in syslog. 
Because if there is something important in syslog that is not in the audit 
logs, I'd like to know what it is.


> My main concern is with the bold line which indicates how the public key
> was granted

That should also be in the audit logs. 

 
> Could you point me to a documentation showing which events a ssh login
> would generate ?

To my knowledge, there is no document that singles out what a sshd login 
should look like. There are documents that explain what the record type are. 
And you should be able to isolate them by ausearch -x sshd.

-Steve

  reply	other threads:[~2019-12-17 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 10:57 Matching SSHD information in audit logs MAUPERTUIS, PHILIPPE
2019-12-17 14:20 ` Steve Grubb [this message]
2019-12-17 17:16   ` MAUPERTUIS, PHILIPPE
2019-12-17 22:24     ` Steve Grubb

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=2177815.HFh0nK17a1@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=philippe.maupertuis@equensworldline.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