Re: How to protect a file from debugging

Tavis Ormandy
2007-06-11T09:16:43Z

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.
-------------------------------------------------------