From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A5CC07E99 for ; Fri, 9 Jul 2021 12:06:44 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1C4F613C8 for ; Fri, 9 Jul 2021 12:06:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1C4F613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-45-R0aPoh2LMY2gP3L7cIqLtQ-1; Fri, 09 Jul 2021 08:06:41 -0400 X-MC-Unique: R0aPoh2LMY2gP3L7cIqLtQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E55A19F92A; Fri, 9 Jul 2021 12:06:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CCA760864; Fri, 9 Jul 2021 12:06:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D42221832E6F; Fri, 9 Jul 2021 12:06:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 169C6Wfs023163 for ; Fri, 9 Jul 2021 08:06:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 764CF1049465; Fri, 9 Jul 2021 12:06:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71BCB1043DFE for ; Fri, 9 Jul 2021 12:06:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0ABA1078461 for ; Fri, 9 Jul 2021 12:06:29 +0000 (UTC) Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-93-l4rO3WxLO8aS2MdmijL-mw-1; Fri, 09 Jul 2021 08:06:25 -0400 X-MC-Unique: l4rO3WxLO8aS2MdmijL-mw-1 Received: by mail-ua1-f47.google.com with SMTP id v22so3476079uaj.13; Fri, 09 Jul 2021 05:06:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=erHrx53RTNdGxP0TzTO6qZbMJUUuJ63CUKEqKTYr/Vo=; b=GwPvRq+9OaJk733iK5qz42bxwO7RbgjDHjASQeWXQbs8V1fnfl7p3likVfuhvpe9rg mcUdN6YUQ8hCiEFWp46P9t5t82bRw7XpKi7RvJAaYDpjP6pZfNoGfOKoODBmOAPYp+rX m/W45MZj9Q01D7F5Il6lkLexSJZgYkJbcdTRjRRj2hxEX+4dT3E7pHzA5u5BCdCsu6ev PVq3y2qZkvZqHP3MN0NCkio6KGHt08OdoIw3x1DtTsr4ZFExa/fCT1b4HM9Fex7WgGHJ Grs157ztHKEtH7TI5/GGnfHX8LxWoMPWLrS15/IHL71P8jM7m/rc6ba4botA5m0AJgRA SN4A== X-Gm-Message-State: AOAM530BZPqoRWnuH4VFF6AW8Of6O7apd1H864ZbuLg0tgf+3dms4EBZ tCbtPbSQZggDqnggd/UgwF5PM/xfqzRfOr5seOVHrkPs X-Google-Smtp-Source: ABdhPJzf6O84oDEsOzVpzp9VgkCcX6YlNsqOaz6tmxL3t87DzLUSlBM/7xKiQ8DleK2gcnenCCHH3bA0CYaMBeFmzKQ= X-Received: by 2002:ab0:2a59:: with SMTP id p25mr37441278uar.81.1625832384200; Fri, 09 Jul 2021 05:06:24 -0700 (PDT) MIME-Version: 1.0 References: <0a5e0f1b52c5454cb7f31cb27ead857a@APLEX10.dom1.jhuapl.edu> <2069430.irdbgypaU6@x2> <20210709004635.GD2655937@madcap2.tricolour.ca> In-Reply-To: <20210709004635.GD2655937@madcap2.tricolour.ca> From: "warron.french" Date: Fri, 9 Jul 2021 08:06:13 -0400 Message-ID: Subject: Re: The format of password change audit events seems to have changed, Can you confirm the correct record type ? To: Richard Guy Briggs X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: linux-audit@redhat.com Cc: "Linux-audit@redhat.com" X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="===============2657608026768849318==" --===============2657608026768849318== Content-Type: multipart/alternative; boundary="000000000000b9842705c6af9917" --000000000000b9842705c6af9917 Content-Type: text/plain; charset="UTF-8" Got it, thanks! -------------------------- Warron French On Thu, Jul 8, 2021 at 8:46 PM Richard Guy Briggs wrote: > On 2021-07-08 18:53, warron.french wrote: > > This is an interesting topic. > > > > Please, can you tell me what audit rule you are using that generates such > > records about root's (*or any other account's) password change?* > > This is a built-in to the userspace password management tools and not a > kernel-triggered rule. > > You could duplicate the effort by monitoring /etc/shadow for writes if > you are really paranoid about those tools being subverted. > > > Sincerely, thank you. > > -------------------------- > > Warron French > > > > On Thu, Jul 8, 2021 at 3:27 PM Steve Grubb wrote: > > > On Thursday, July 8, 2021 2:19:54 PM EDT Wieprecht, Karen M. wrote: > > > > I've noticed that the messages I'm searching for in splunk to show > root > > > > password changes no longer seem to be in the same format. Most of > our > > > > systems run RHEL7 release 7.9, and I believe this is a recent change > > > > (I've only noticed this problem in the past 3 months or so?), but we > do > > > > have an older 7.5 system, so I was able to use that to compare > against > > > > the 7.5 to identify what's changed. I wanted to confirm which > record > > > I > > > > should be using now since there are several that get generated now > > > > > > > > The key differences seem to be in the message generated and the > keyname > > > > being used for the account being targeted, but I wanted to confirm > that > > > > there isn't some other record I should be looking at to verify that > the > > > > root password was changed in the required timeframe since I see > several > > > > records being generated from a password change, none of which include > > > > anything as conclusive as the old message that showed the operation > as a > > > > "password change". Here are some fo the fields I'm looking at: > > > > > > > > type=USER_CHAUTHOK > > > > exe=/usr/bin/passwd > > > > [acct targeted for the passwd change]: > > > > id=root (old format) > > > > acct=root (latest format) > > > > msg > > > > msg='op=change password (old format) > > > > msg='op=PAM:chauthok (latest format) > > > > > > > > If you can confirm whether this is the info I should be using now to > > > > confirm password changes, that would be much appreciated. > > > > > > I don't have a RHEL 7.9 machine to compare against. I can set one up in > > > about > > > a week. On 7.6 the event looks like this: > > > > > > type=USER_CHAUTHTOK msg=audit(1625771196.574:162): pid=5113 uid=0 > > > auid=1000 > > > ses=1 subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 > > > msg='op=change > > > password id=1000 exe="/usr/bin/passwd" hostname=rhel7.3 addr=? > > > terminal=pts/0 > > > res=success' > > > > > > The problem is that "op= change passwd" has a space in it and will not > > > parse > > > right. I have been trying to correct instances of this so that things > > > parse > > > correctly. Not everyone runs their changes by me for comment. So, its > > > possible that the change was made to fix the space, but usually I > suggest > > > people add an underscore. > > > > > > I'll into it more next week. > > > > > > -Steve > > - RGB > > -- > Richard Guy Briggs > Sr. S/W Engineer, Kernel Security, Base Operating Systems > Remote, Ottawa, Red Hat Canada > IRC: rgb, SunRaycer > Voice: +1.647.777.2635, Internal: (81) 32635 > > --000000000000b9842705c6af9917 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Got it, thanks!=C2=A0
--------------------------
Warr= on French

=


On Thu, Jul 8, 2021 at 8:46 PM R= ichard Guy Briggs <rgb@redhat.com&= gt; wrote:
On 20= 21-07-08 18:53, warron.french wrote:
> This is an interesting topic.
>
> Please, can you tell me what audit rule you are using that generates s= uch
> records about root's (*or any other account's) password change= ?*

This is a built-in to the userspace password management tools and not a
kernel-triggered rule.

You could duplicate the effort by monitoring /etc/shadow for writes if
you are really paranoid about those tools being subverted.

> Sincerely, thank you.
> --------------------------
> Warron French
>
> On Thu, Jul 8, 2021 at 3:27 PM Steve Grubb <sgrubb@redhat.com> wrote:
> > On Thursday, July 8, 2021 2:19:54 PM EDT Wieprecht, Karen M. wrot= e:
> > > I've noticed that the messages I'm searching=C2=A0 f= or in splunk to show root
> > > password changes no longer seem to be in the same format.=C2= =A0 Most of our
> > > systems run RHEL7 release 7.9,=C2=A0 and I believe this is a= recent change
> > > (I've only noticed this problem in the past 3 months or = so?), but we do
> > > have an older 7.5 system, so=C2=A0 I was able to use that to= compare against
> > > the 7.5 to=C2=A0 identify what's changed.=C2=A0 =C2=A0 I= wanted to confirm which record
> > I
> > > should be using now since there are several that get generat= ed now
> > >
> > > The key differences seem to be in the message generated and = the keyname
> > > being used for the account being targeted,=C2=A0 but I wante= d to confirm that
> > > there isn't some other record I should be looking at to = verify that the
> > > root password was changed in the required timeframe since I = see several
> > > records being generated from a password change, none of whic= h include
> > > anything as conclusive as the old message that showed the op= eration as a
> > > "password change".=C2=A0 =C2=A0Here are some fo th= e fields I'm looking at:
> > >
> > > type=3DUSER_CHAUTHOK
> > > exe=3D/usr/bin/passwd
> > > [acct targeted for the passwd change]:
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0id=3Droot=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (old format)
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0acct=3Droot= =C2=A0 =C2=A0 =C2=A0 (latest format)
> > > msg
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg=3D'op=3Dcha= nge password=C2=A0 (old format)
> > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 msg=3D'op=3DPAM= :chauthok=C2=A0 =C2=A0 =C2=A0 (latest format)
> > >
> > > If you can=C2=A0 confirm whether this is the info I should b= e using now to
> > > confirm password changes, that would be much appreciated. > >
> > I don't have a RHEL 7.9 machine to compare against. I can set= one up in
> > about
> > a week. On 7.6 the event looks like this:
> >
> > type=3DUSER_CHAUTHTOK msg=3Daudit(1625771196.574:162): pid=3D5113= uid=3D0
> > auid=3D1000
> > ses=3D1 subj=3Dunconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023<= br> > > msg=3D'op=3Dchange
> > password id=3D1000 exe=3D"/usr/bin/passwd" hostname=3Dr= hel7.3 addr=3D?
> > terminal=3Dpts/0
> > res=3Dsuccess'
> >
> > The problem is that "op=3D change passwd" has a space i= n it and will not
> > parse
> > right. I have been trying to correct instances of this so that th= ings
> > parse
> > correctly. Not everyone runs their changes by me for comment. So,= its
> > possible that the change was made to fix the space, but usually I= suggest
> > people add an underscore.
> >
> > I'll into it more next week.
> >
> > -Steve

- RGB

--
Richard Guy Briggs <= rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

--000000000000b9842705c6af9917-- --===============2657608026768849318== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit --===============2657608026768849318==--