From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Golden_Miller83@protonmail.ch Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 9d15021a for ; Fri, 22 Jun 2018 22:08:23 +0000 (UTC) Received: from mail3.protonmail.ch (mail3.protonmail.ch [185.70.40.25]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id cd13d8c9 for ; Fri, 22 Jun 2018 22:08:22 +0000 (UTC) Date: Fri, 22 Jun 2018 18:13:22 -0400 To: Lonnie Abelbeck From: Jordan Glover Subject: Re: PostUp/PreUp/PostDown/PreDown Dangerous? Message-ID: In-Reply-To: <296DF757-2B21-4F54-9444-1EEBD4A40BEA@lonnie.abelbeck.com> References: <296DF757-2B21-4F54-9444-1EEBD4A40BEA@lonnie.abelbeck.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "baines.jacob@gmail.com" , WireGuard mailing list Reply-To: Jordan Glover List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On June 22, 2018 9:26 PM, Lonnie Abelbeck wrote= : > How about not supporting direct execution of commands in the config [Inte= rface] section but rather support an optional path to where a fixed command= (ex. wireguard.script) is found... >=20 >=20 > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= --------------------------------------- >=20 > ActionScriptDir =3D /usr/local/bin > -------------------------------- >=20 > Then instead of executing the PostUp/PostDown/PreUp/PreDown data, the wg-= quick script would call: >=20 >=20 > -------------------------------------------------------------------------= ---------------------------- >=20 > /usr/local/bin/wireguard.script PRE_UP|PRE_DOWN|POST_UP|POST_DOWN "$INTER= FACE" > -------------------------------------------------------------------------= ----- >=20 > 1. When called, the first argument would be one of: PRE_UP|PRE_DOWN|POST= _UP|POST_DOWN > 2. When called, the second argument would be the wireguard interface. > 3. If ActionScriptDir is not defined, then wireguard.script is not calle= d. > =20 > This requires an extra step to be taken to create a wireguard.script = file with execute permissions and possibly require specific ownership. > =20 > Lonnie > =20 But attacker will helpfully provide you customized 'wireguard.script' as w= ell and even tell you how to use it by setting 'chmod 4777 wireguard.script'. Jordan