This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to protect a file from debugging
- From: Tavis Ormandy <taviso at sdf dot lonestar dot org>
- To: Oliver Welter <mail at oliwel dot de>
- Cc: gdb at sourceware dot org
- Date: Mon, 11 Jun 2007 10:16:27 +0100
- Subject: Re: How to protect a file from debugging
- References: <466D04E1.4010905@oliwel.de>
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.
-------------------------------------------------------