From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24628 invoked by alias); 11 Jun 2007 09:16:43 -0000 Received: (qmail 24618 invoked by uid 22791); 11 Jun 2007 09:16:42 -0000 X-Spam-Check-By: sourceware.org Received: from mx.freeshell.ORG (HELO sdf.lonestar.org) (192.94.73.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Jun 2007 09:16:40 +0000 Received: from sdf.lonestar.org (IDENT:taviso@vinland.freeshell.org [192.94.73.6]) by sdf.lonestar.org (8.14.1/8.13.8) with ESMTP id l5B9GVRh017651; Mon, 11 Jun 2007 09:16:31 GMT Received: from localhost (localhost [[UNIX: localhost]]) by sdf.lonestar.org (8.14.1/8.12.8/Submit) id l5B9GUvX015038; Mon, 11 Jun 2007 09:16:30 GMT Date: Mon, 11 Jun 2007 09:16:00 -0000 From: Tavis Ormandy To: Oliver Welter Cc: gdb@sourceware.org Subject: Re: How to protect a file from debugging Message-ID: <20070611091627.GB8386@sdf.lonestar.org> References: <466D04E1.4010905@oliwel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <466D04E1.4010905@oliwel.de> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00069.txt.bz2 On Mon, Jun 11, 2007 at 10:16:33AM +0200, Oliver Welter wrote: > Hi List, > > sorry if this is a stupid question but I am not very familiar with gdb ;) > > I am planing a security application and gdb is causing some "troubles". > > Can someone point me to some infos or shortly explain me if there is a > way to protect a program from attaching to it? I must either prevent gdb > (or similar software) from attaching to a process or at least detect > the attach and send a terminate signal to the application. > The short answer is no, any tricks you attempt to use to prevent ptrace() can be defeated (some more easily than others), however if you explain what the "troubles" are there may be a better solution. Thanks, Tavis. -- ------------------------------------- taviso@sdf.lonestar.org | finger me for my pgp key. -------------------------------------------------------