From owner-freebsd-security@freebsd.org Sun Mar 11 09:12:25 2018 Return-Path: Delivered-To: freebsd-security@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51DD5F3C63C for ; Sun, 11 Mar 2018 09:12:25 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E919A81DF1 for ; Sun, 11 Mar 2018 09:12:24 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22b.google.com with SMTP id w12so3595681ywa.8 for ; Sun, 11 Mar 2018 01:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to; bh=kxAsz8M2W1R1SJpNaRUlqiyBgwklbIhYwSJERFLBTH0=; b=qiU1q/o3zRcpbiOuKhC34tz0uIHW2CcaVfX1lZINnuyxzcVcDVe8B0sS72awZR10oU PXaGX8N4pmfmITUfbsg9boeFn6zHqaXoyyStim88fjSjx8IHK3vG5CXJEf+c07qFYkl9 4znf/KOXjA0RRUDDiNJUOOHxdVJ/7qBWpfdDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kxAsz8M2W1R1SJpNaRUlqiyBgwklbIhYwSJERFLBTH0=; b=j9BImI3xveE8jDgC3C3pt2/G5/7SyiAw+QehXuY7wzViUKB5EJaLNUVxvKG+1XJKyu 1t0wl+QDsP0h8BLd6g+CIwQw3Pp2bjZu4nS30cusmGOABHLySdsffUit9lxQJVWV3+lp Zz124tVIgM5jGSPCKSm0A1VAVs1qQ9s37eh/RdNiM0lRXP4ag8saR3ofprvo4CuhY42P EqkcQ7ntYcLpbtBUk2NphKVA1WZOqSbtI3hKpc/FJO8rAqHwJsewywO+cJC8Zr8R0Uok eGWoAYadd4L0Co9eufCnVmGd3GEv/z4L74i3H3EEPggPIYdSSY8prtYsk6gwvs8AhoVk P8ng== X-Gm-Message-State: AElRT7EMnOKvoI+8O0nUKBJbHjSmvmynYPolGSa3qyqDf59Kid7YSoGH AAojCBvVWaYsH5iLiOwPw/er0achyPh06yqKYe1jSjAC X-Google-Smtp-Source: AG47ELuEylm5MSqgub6gnk32X/dbnaPIRlDkFIa2rp0b6sRImcFtQhc7We5kPubkSrYoShD3AThR4IawbZkPJY7b8XI= X-Received: by 10.129.110.86 with SMTP id j83mr2449033ywc.19.1520759544113; Sun, 11 Mar 2018 01:12:24 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:23d2:0:0:0:0:0 with HTTP; Sun, 11 Mar 2018 01:11:53 -0800 (PST) From: Eitan Adler Date: Sun, 11 Mar 2018 01:11:53 -0800 Message-ID: Subject: auditing users within a jail To: "freebsd-security@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 09:12:25 -0000 )Hi all, I am fairly new to using the auditd framework. I'd like to set up some basic auditing for one of my FreeBSD boxes. The setup is fairly simple: - host - has "eax" and "root" - bastion jail - has "bastion" and "root" I have the following audit_user file: root:lo:no,ad:no,aa,+fd,+ex bastion:ex,fw,fm,fc,fd,pc,nt,ip,ad,lo:no,aa audit_control: dir:/var/audit dist:on flags:lo,aa minfree:5 naflags:lo,aa policy:cnt,argv filesz:2M expire-after:10M The auditd service is running on the host (as pid 68828) however running "praudit /dev/auditpipe" shows no output when accessing the bastion user on the jail. This makes sense, however trying to run auditd in the jail shows this error: root@bastion:~ # /usr/sbin/auditd -d auditd[27548]: starting... auditd[27548]: Error opening trigger messaging mechanism I know I'm doing something wrong but the overall configuration confuses me. (a) What do I need to do to get auditing of the bastion user from (a1) within the jail and (a2) from the host (b) Is the auditing setup above reasonable? Am I missing obvious events or capturing things which utterly routine? (c) Why does praudit /dev/auditpipe show nothing but "praudit /var/audit/current" show some events? Thanks! -- Eitan Adler