From owner-freebsd-security@freebsd.org Mon Mar 12 11:05:30 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 5C6ECF36F88 for ; Mon, 12 Mar 2018 11:05:30 +0000 (UTC) (envelope-from spankthespam@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (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 E6C5C75592 for ; Mon, 12 Mar 2018 11:05:29 +0000 (UTC) (envelope-from spankthespam@gmail.com) Received: by mail-qk0-x234.google.com with SMTP id s78so1309899qkl.8 for ; Mon, 12 Mar 2018 04:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/GwropXG5AK+V5zloPYnjWI63aCMVq7BzYBYIKEKVfQ=; b=tBdTVNuFym49o6wjZd07B/qs14lqqjLNDMNSv7cx3l+7EGwYU0RhsiLl9uOwzpH7ZB bQyVzwUnuDvUqwVlzQrIb4ovBOr/Biy0VfUSn3HOh+fme7vLG4kuKLULcZrh/ZSQAadZ iOi1K9/2RLclU9VVqwGdSthxfXiVWOqDdgjxwn5B/AKpLMGoYzSGrbM9OdyNmMGE1Agp BK5TujogQZsPbVozA8NZ9N9UYD1eMqUcRzO6YdgHri1tj2pjjcArMNaZ3P9/ld/UJeVH VNPGJYLMcztH+mqTlGUpZQIAW8bh0VuJ5HC5Plm2w7YN5/HyWHyYyaEba9NG12AZNo54 5Wsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/GwropXG5AK+V5zloPYnjWI63aCMVq7BzYBYIKEKVfQ=; b=hF0rafIUOtOnBKo9fvhdDbcWzrXrCcHCBzBUWnELAm47TzBkbB5rj+VQdBfe4InB71 cQG83fPPqrNy3XbXB0vOa/Mfz3sSnrhL+j1KAB0PmFnULBIdO/HE9gOEDkMJbF1omAhk HMz3Yby2IaJF1JjJis2HuIZ/r0916yDaK6tY8FoEd7u0dO2iqC4EgBllXdZ+Bo8d3kE5 pDbH8+Oqe3LMDWnJKG27R+y54LMXgdpOzAbVG8Orilwo5FKW7J2Smowl5dsrX58ga6VM SL2+flm+pEXZPMmjByQjPMzG1nFmB+SJFIsQR0Q8zm3+fHVonvlCUOiLx9gt9Mk/1/zU cx+A== X-Gm-Message-State: AElRT7Gonueg+wIPw+EMU6uP9qfW11ec0kR/YX07yS2md8G815xlhVX/ n3xkMUZifGj9PwjdsRoLglfVxcn2tcW9zS7hwLY= X-Google-Smtp-Source: AG47ELuDEn04an3f0uL+MTBTwXrc/5P6oiVk5TDOZ6CqZNgSqHdxqO8E3aSeArninIREUyND2Ud2DJVXzJLaQPzsIXg= X-Received: by 10.55.111.66 with SMTP id k63mr10988902qkc.25.1520852729553; Mon, 12 Mar 2018 04:05:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.42.87 with HTTP; Mon, 12 Mar 2018 04:05:29 -0700 (PDT) In-Reply-To: <20180312031746.GB7114@cps-macbook-pro.lan> References: <20180312031746.GB7114@cps-macbook-pro.lan> From: Big Lebowski Date: Mon, 12 Mar 2018 11:05:29 +0000 Message-ID: Subject: Re: auditing users within a jail To: Christian Peron Cc: Eitan Adler , "freebsd-security@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 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: Mon, 12 Mar 2018 11:05:30 -0000 On Mon, Mar 12, 2018 at 3:17 AM, Christian Peron wrote: > Hi Eitan, > > IIRC the short version is the audit related syscalls are currently > disabled in > jails. This means that a jailed process can not set audit configurations > for > themselves (or child processes). This also means things like auditd(8) > wont work. > > However, it is possible for processes in jails to produce audit records. > The processes just need an audit mask. Since audit masks (configurations) > are inherited across forks, you could set a global audit configuration for > the > jail using the following tool (or something like it): > > https://github.com/csjayp/setaudit (I just dropped it on to github) > > We could hack on it to make it more friendly for jails etc.. but this > should > get you going in the right direction. With a bit of work, it could be > possible > to "virtualize" the core audit objects so we could have functional per jail > auditing configurations, but certain care needs to be taken to ensure it > couldn't > override the config in the host (et al). > I suppose this could/should be added to the docs? :)