From owner-freebsd-questions@FreeBSD.ORG Tue Apr 5 11:38:38 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B05C16A518 for ; Tue, 5 Apr 2005 11:38:38 +0000 (GMT) Received: from limicola.its.uu.se (limicola.its.uu.se [130.238.7.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE1643D2D for ; Tue, 5 Apr 2005 11:38:37 +0000 (GMT) (envelope-from ante@Update.UU.SE) Received: by limicola.its.uu.se (Postfix, from userid 205) id 36CC0495F; Tue, 5 Apr 2005 13:38:35 +0200 (MSZ) Received: from limicola.its.uu.se(127.0.0.1) by limicola.its.uu.se via virus-scan id s206860; Tue, 5 Apr 05 13:38:28 +0200 Received: from Psilocybe.Update.UU.SE (Psilocybe.Update.UU.SE [130.238.19.25]) by limicola.its.uu.se (Postfix) with ESMTP id AF6CF48B6 for ; Tue, 5 Apr 2005 13:38:28 +0200 (MSZ) Received: by Psilocybe.Update.UU.SE (Postfix, from userid 30086) id A1FDF38016; Tue, 5 Apr 2005 13:38:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by Psilocybe.Update.UU.SE (Postfix) with ESMTP id 9CD425C002 for ; Tue, 5 Apr 2005 13:38:28 +0200 (CEST) Date: Tue, 5 Apr 2005 13:38:28 +0200 (CEST) From: Andreas Davour To: freebsd-questions@freebsd.org In-Reply-To: <1183736361.20050405031743@wanadoo.fr> Message-ID: References: <1183736361.20050405031743@wanadoo.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: Securely allowing just one application via telnet X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 11:38:38 -0000 On Tue, 5 Apr 2005, Anthony Atkielski wrote: > If I want to allow external users to log on under only one permissible > username, which immediately and unconditionally executes only one > program (no shell access), via telnet, what is the most secure way to > set this up? I've always understood telnet to be somewhat of a > Pandora's box for security, but I don't know if that applies to the > protocol itself, or to telnetd, or if it just refers to the many dangers > of shell access, or what. If there is a way to secure this type of > access, I'd like to try it on my test server (I won't risk the > production server, of course), as an exercise in setting up custom > environments. > > Any suggestions on how best to do this securely? > > If a specific user is restricted to a specific program at login (via > /etc/passwd), is there _any_ way he can sneak out to a shell, assuming > that the program he is forced to run does _not_ provide shellout access? Sure there is. If there is any possibility of a buffer overflow error in that one program you let your users run, or "login" for that matter. But, running the program as a login shell could at least minimize the possibilities I guess. Not that I've tried it myself. Go read about chroot and jail in the manpages and you'll think of something. /andreas -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?