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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 228E0C43331 for ; Fri, 27 Mar 2020 13:41:03 +0000 (UTC) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6D7A206F2 for ; Fri, 27 Mar 2020 13:41:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MsXx+fDp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6D7A206F2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.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=1585316461; 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=I5CihFHsSqmBrguCTsTwHq8exLrNFreXYKI36Nq5yqk=; b=MsXx+fDpb/aKawA7b9cNpofWy72YqRwAmkxUY0Iw+YlMULJB5DdzwBW7z/gq7vtdepUhpi Wxipn37UkULJBd1Nc+9LtyyzxowPsqr0l4ra1Q5PosAVtKLhXq75ZwEfIIx46WiSrQ2LYm wGwp77MJGJyr7dmUD5wI3fzwhFi2vl4= 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-352-LUJClPceNli9-daeBvc5xA-1; Fri, 27 Mar 2020 09:40:58 -0400 X-MC-Unique: LUJClPceNli9-daeBvc5xA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3AA91935798; Fri, 27 Mar 2020 13:40:53 +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 00CDAA0A98; Fri, 27 Mar 2020 13:40:52 +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 6F3BB18089C8; Fri, 27 Mar 2020 13:40:50 +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 02RDemZd006110 for ; Fri, 27 Mar 2020 09:40:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3FE6C10551A6; Fri, 27 Mar 2020 13:40:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BE1B1055194 for ; Fri, 27 Mar 2020 13:40:46 +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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2417B8FF66B for ; Fri, 27 Mar 2020 13:40:46 +0000 (UTC) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-W-7opFf-NT6xB7OeQ-h61Q-1; Fri, 27 Mar 2020 09:40:43 -0400 X-MC-Unique: W-7opFf-NT6xB7OeQ-h61Q-1 Received: by mail-ed1-f50.google.com with SMTP id v1so11141668edq.8 for ; Fri, 27 Mar 2020 06:40:42 -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=m7u0IIxVGRI1FMLqDdAgtDukqCelpTSFp2qsxx7fa8c=; b=IepJkm706FBeaKqkt97bHN2aDMq6ZJAU8wioPSvx+CuytiKp6f4DY+52SFaZspuhTO 9Rk2lqJSGKi1HAol/BG8MdJrgQ2k35TmYcQ+5g3CHjNRn7ljpa+TsnDi3eX+Qg8Uabbs QowO8v0mNOUHh+kI9fYUtezMlrB4Rw5rWLBGK67lmjO8I5RhTbqeHmsf9vOr5yibxEJU SIF6EJA4TrMZJ916B3oP4ftTSGOeYOOnkxj+4eL03H4vwsvjFRxY78b8pjBRvB1j52K0 yijzhtDyyHdWoAtM0/OzVs67leJeHmkg7O0OvgS1gj/irY0pbPwyf3Eb4CkMZbwsn+oe v3uQ== X-Gm-Message-State: ANhLgQ3rPxDpYpjh+VBW5E0C+/seaIHBYszzNXawPN9omhewHVW7ZX2X PdwcgvjHhbcZYqG0iLHLlxNPvZZLS6bLkwahF3w3 X-Google-Smtp-Source: ADFU+vvJPFoczP3xgQDPBPoQclvMeqOcezALhTyCzCdY1wX9ZVIL34as0lPSahcwxx/Ffgivj6hhN0t/gz6wDnblQdc= X-Received: by 2002:a17:906:4b52:: with SMTP id j18mr12807637ejv.272.1585316441969; Fri, 27 Mar 2020 06:40:41 -0700 (PDT) MIME-Version: 1.0 References: <5F4EE10832231F4F921A255C1D95429807639D60@DEERLM99EX7MSX.ww931.my-it-solutions.net> In-Reply-To: <5F4EE10832231F4F921A255C1D95429807639D60@DEERLM99EX7MSX.ww931.my-it-solutions.net> From: Paul Moore Date: Fri, 27 Mar 2020 09:40:30 -0400 Message-ID: Subject: Re: Full shell access or sudo command To: "MAUPERTUIS, PHILIPPE" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02RDemZd006110 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Mar 27, 2020 at 5:18 AM MAUPERTUIS, PHILIPPE wrote: > > Hi, > > Our sysadmins are able to use sudo to take a root shell and do whatever they want. > > On the contrary, application managers for example have only a limited set of sudo scripts and commands > > Is it possible to find if a given audit message (for example due to a watch on a file) has been issued in the context of sudo or a shell? > > My goal is to be able to search for potential sudo abuse through misconfiguration. I'm sure others will have suggestions, probably better than mine, but I would think that putting a watch on the sudo binary and paying careful attention to the login UID ("auid" field) and session ("ses" field) could be helpful. -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit