From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: Question about excluding rules Date: Thu, 20 Feb 2020 19:27:34 -0500 Message-ID: <3341724.7X2qyikPX2@x2> References: <2400991.fjeXDc8RHV@x2> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Moshe Rechtman Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com Hello, On Thursday, February 20, 2020 7:04:37 PM EST Moshe Rechtman wrote: > Those particular logs generated by a third party monitoring application > named Microfocus, which keeps on running "ps -auxwwww" command and filling > up quickly the audit log. It looks like this is a daemon since auid is -1. So, I'd suggest that the rule be something like: -a exit,always -F arch=b64 -F euid=0 -F auid!=unset -S execve -k rootact This will not filter just that one item, it will filter all execution by all daemons. -Steve > > On Thursday, February 20, 2020 6:36:46 PM EST Moshe Rechtman wrote: > > > $ cat audit.rules > > > > > > # This file contains the auditctl rules that are loaded > > > # whenever the audit daemon is started via the initscripts. > > > # The rules are simply the parameters that would be passed > > > # to auditctl. > > > > > > # First rule - delete all > > > -D > > > > > > # Increase the buffers to survive stress events. > > > # Make this bigger for busy systems > > > -b 320 > > > > > > # Feel free to add below this line. See auditctl man page > > > > > > -a exit,always -F arch=b64 -F euid=0 -S execve -k rootact > > > -a exit,always -F arch=b32 -F euid=0 -S execve -k rootact > > > -a exit,always -F arch=b64 -F euid>=500 -S execve -k useract > > > -a exit,always -F arch=b32 -F euid>=500 -S execve -k useract > > > > > > > > > Audit start working as expected. Now customer is asking to > > > exclude/ignore the following from audit logs: > > > > > > type=SYSCALL msg=audit(1581664357.597:257516): arch=c000003e > > > syscall=59 success=yes exit=0 a0=3869161ea3 a1=7ffd15530c20 > > > a2=7ffd15534348 a3=3869617240 items=2 ppid=3350 pid=59266 > > > auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 > > > fsgid=0 tty=(none) ses=4294967295 comm="sh" exe="/bin/bash" > > > key="rootact" > > > type=EXECVE msg=audit(1581664357.597:257516): argc=3 a0="sh" a1="-c" > > > a2=2F62696E2F70732061757877777777 > > > type=CWD msg=audit(1581664357.597:257516): > > > cwd="/opt/microfocus/Discovery/bin" type=PATH > > > msg=audit(1581664357.597:257516): item=0 name="/bin/sh" inode=398 > > > dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > type=PATH msg=audit(1581664357.597:257516): item=1 name=(null) > > > inode=4481 dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > > > > ype=SYSCALL msg=audit(1581664357.601:257517): arch=c000003e syscall=59 > > > success=yes exit=0 a0=155c2f0 a1=155b8d0 a2=155b460 a3=18 items=2 > > > ppid=3350 pid=59266 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 > > > egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ps" > > > exe="/bin/ps" key="rootact" > > > type=EXECVE msg=audit(1581664357.601:257517): argc=2 a0="/bin/ps" > > > a1="auxwwww" type=CWD msg=audit(1581664357.601:257517): > > > cwd="/opt/microfocus/Discovery/bin" type=PATH > > > msg=audit(1581664357.601:257517): item=0 name="/bin/ps" inode=1451 > > > dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > type=PATH msg=audit(1581664357.601:257517): item=1 name=(null) > > > inode=4481 dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > > > > What would be the best way to exclude such audit? > > > Your help would be much appreciated. > > > > What's objectionable about these events? The fact that its got a key says > > they think they wanted it. > > > > -Steve 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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 C18C3C11D00 for ; Fri, 21 Feb 2020 00:28:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78EE5206EF for ; Fri, 21 Feb 2020 00:28:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BEL1RZM6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78EE5206EF Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-audit-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582244897; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=L5g8qrmUuxyziLX0UTdbj+0nynm4yik766sNL9yoBBc=; b=BEL1RZM65Boley/BGX7op9QKMwTFxbI4IKkjzI0QWVH9UHIejx+rnSQYvHrD96LhlOf0fV qlpDmBdqz50xbzDkfuhvptFnbHBUczMEOSLjGdIvclFAMQ8CWt1fgD+T2ynOGdkHiVflMM lhXofqJQN0DZpLCep9pdxkkD7LpCM68= 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-189-wUZVSPrUOrm_RvMBa4UqPg-1; Thu, 20 Feb 2020 19:28:15 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE1E3107ACC4; Fri, 21 Feb 2020 00:28:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FDA919486; Fri, 21 Feb 2020 00:28:11 +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 BEE9235B1A; Fri, 21 Feb 2020 00:28:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01L0Reul025661 for ; Thu, 20 Feb 2020 19:27:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0FC1760C99; Fri, 21 Feb 2020 00:27:40 +0000 (UTC) Received: from x2.localnet (ovpn-116-254.phx2.redhat.com [10.3.116.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB96B60C63; Fri, 21 Feb 2020 00:27:34 +0000 (UTC) From: Steve Grubb To: Moshe Rechtman Subject: Re: Question about excluding rules Date: Thu, 20 Feb 2020 19:27:34 -0500 Message-ID: <3341724.7X2qyikPX2@x2> Organization: Red Hat In-Reply-To: References: <2400991.fjeXDc8RHV@x2> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.84 on 10.5.11.23 X-MC-Unique: wUZVSPrUOrm_RvMBa4UqPg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <20200221002734.kEsCu4aJq39cK5Jfqp9xW5V4R1FmZMJ7WD0lynYGuVs@z> Hello, On Thursday, February 20, 2020 7:04:37 PM EST Moshe Rechtman wrote: > Those particular logs generated by a third party monitoring application > named Microfocus, which keeps on running "ps -auxwwww" command and filling > up quickly the audit log. It looks like this is a daemon since auid is -1. So, I'd suggest that the rule be something like: -a exit,always -F arch=b64 -F euid=0 -F auid!=unset -S execve -k rootact This will not filter just that one item, it will filter all execution by all daemons. -Steve > > On Thursday, February 20, 2020 6:36:46 PM EST Moshe Rechtman wrote: > > > $ cat audit.rules > > > > > > # This file contains the auditctl rules that are loaded > > > # whenever the audit daemon is started via the initscripts. > > > # The rules are simply the parameters that would be passed > > > # to auditctl. > > > > > > # First rule - delete all > > > -D > > > > > > # Increase the buffers to survive stress events. > > > # Make this bigger for busy systems > > > -b 320 > > > > > > # Feel free to add below this line. See auditctl man page > > > > > > -a exit,always -F arch=b64 -F euid=0 -S execve -k rootact > > > -a exit,always -F arch=b32 -F euid=0 -S execve -k rootact > > > -a exit,always -F arch=b64 -F euid>=500 -S execve -k useract > > > -a exit,always -F arch=b32 -F euid>=500 -S execve -k useract > > > > > > > > > Audit start working as expected. Now customer is asking to > > > exclude/ignore the following from audit logs: > > > > > > type=SYSCALL msg=audit(1581664357.597:257516): arch=c000003e > > > syscall=59 success=yes exit=0 a0=3869161ea3 a1=7ffd15530c20 > > > a2=7ffd15534348 a3=3869617240 items=2 ppid=3350 pid=59266 > > > auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 > > > fsgid=0 tty=(none) ses=4294967295 comm="sh" exe="/bin/bash" > > > key="rootact" > > > type=EXECVE msg=audit(1581664357.597:257516): argc=3 a0="sh" a1="-c" > > > a2=2F62696E2F70732061757877777777 > > > type=CWD msg=audit(1581664357.597:257516): > > > cwd="/opt/microfocus/Discovery/bin" type=PATH > > > msg=audit(1581664357.597:257516): item=0 name="/bin/sh" inode=398 > > > dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > type=PATH msg=audit(1581664357.597:257516): item=1 name=(null) > > > inode=4481 dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > > > > ype=SYSCALL msg=audit(1581664357.601:257517): arch=c000003e syscall=59 > > > success=yes exit=0 a0=155c2f0 a1=155b8d0 a2=155b460 a3=18 items=2 > > > ppid=3350 pid=59266 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 > > > egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ps" > > > exe="/bin/ps" key="rootact" > > > type=EXECVE msg=audit(1581664357.601:257517): argc=2 a0="/bin/ps" > > > a1="auxwwww" type=CWD msg=audit(1581664357.601:257517): > > > cwd="/opt/microfocus/Discovery/bin" type=PATH > > > msg=audit(1581664357.601:257517): item=0 name="/bin/ps" inode=1451 > > > dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > type=PATH msg=audit(1581664357.601:257517): item=1 name=(null) > > > inode=4481 dev=fd:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 > > > nametype=NORMAL > > > > > > What would be the best way to exclude such audit? > > > Your help would be much appreciated. > > > > What's objectionable about these events? The fact that its got a key says > > they think they wanted it. > > > > -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit