Re: [OT] Debugger protection (was: Implementing Licensing ...)
Re: [OT] Debugger protection (was: Implementing Licensing ...)
- Subject: Re: [OT] Debugger protection (was: Implementing Licensing ...)
- From: Aurélien Hugelé <email@hidden>
- Date: Fri, 9 Apr 2004 10:20:16 +0200
i would like, (if nobody minds it ;) ) to recenter the thread on
*usable* piracy protection (the dynamic change of running code is far
above my knowledge :P ).
The protection Apple use for its own software seems very good : look at
this. from cocoaDev :
>
.. another way to thwart would-be thieves would be to apply simple
>
anti-debugging and anti-reverse engineering to your code... Apple has
>
even, conveniently enough, provided some simple protections for you.
>
>
for example: launch iTunes (or DVD player). Attempt to attach gdb to
>
the running iTunes/DVD Player process. Try to launch iTunes or DVD
>
Player from gdb.
>
>
here's your hint (from xnu-517/bsd/kern/mach_process.c):
>
>
>
if (uap->req == PT_DENY_ATTACH) {
>
if (ISSET(p->p_flag, P_TRACED)) {
>
exit1(p, W_EXITCODE(ENOTSUP, 0),
>
retval);
>
/* drop funnel before we return */
>
thread_funnel_set(kernel_flock, FALSE);
>
thread_exception_return();
>
/* NOTREACHED */
>
}
>
SET(p->p_flag, P_NOATTACH);
>
>
return(0);
>
}
>
....
>
if (ISSET(t->p_flag, P_NOATTACH)) {
>
psignal(p, SIGSEGV);
>
return (EBUSY);
>
}
>
>
>
Now this is still trivial to work around, but still... it's
>
interesting that Apple implemented this little roadblock in their
>
applications to prevent others from reverse engineering them.... those
>
eager for more fun can try launching iTunes for Windows with SoftICE?
>
(or windbg, pick your favorite debugger...) running....
this is not from me but from anonymous developper on cocoaDev....
nobody replied to its post which seems really powerful (
http://www.cocoadev.com/index.pl?CocoaInsecurity and
http://www.cocoadev.com/index.pl?CocoaInsecurityFollowUp )
i tried to run gdb on DVDPlayer and on itunes : Apple achieve to make
GDB crash ! Omni succeed too (it is different, gdb does not crash but
hangs !)
i m not a specialist at all, but since our products are very near
release, if someone could explain us *simply* (is it even possible ???)
how to use the code above to protect our software from GDB, it would
help a lot of people !
thanks to all
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.