Log in

View Full Version : Objective C


Shub-nigurrath
February 6th, 2008, 07:59
Hi anyone

could someone kindly point me to some reversing resource or general programming model whitepaper for Objective C (for OSX world).. I got only rubbish after a first search and not something really useful..except wiki

Daniel Pistelli
February 6th, 2008, 15:24
As far as I know: developer.apple.com

There's everything you need... However, I'm not a MAC programmer, so i might be wrong.

Ciao mate

mkfeldman
February 10th, 2008, 18:52
Hi

I started with:
http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html
and very very useful: the objc runtime header files in /usr/include/objc.
You can also download the runtime source if you want to dig deeper, I did it for curiosity but in 99.99% of the cases you don't need more than the header files.

After I read the above, it was be easy to understand disassembled code (in IDA for example) because the "selector" (passed to every objc_mgSend()) is just a pointer to the string method name.

two more links I enjoyed:

tracing:
http://www.dribin.org/dave/blog/archives/2006/04/22/tracing_objc/

debugging:
http://developer.apple.com/technotes/tn2004/tn2124.html

my biggest frustration was gdb interface, after those years doing ollydbg

good luck

scknight
March 19th, 2008, 19:25
http://www.codethecode.com/projects/class-dump/

class-dump is a great utility that will dump objective-c headers from the compiled app. This makes it great for figuring out the structure of programs. For a decent overview check this out.

http://www.phrack.com/issues.html?issue=63&id=16&mode=txt

It applies just as well to x86. GDB might not be as nice as Olly but it has knowledge of objective-c so once you dump the headers you can set breakpoints based on method names

Shub-nigurrath
March 26th, 2008, 18:35
interesting tools scknight,
unfortunately they seem to be only for live debugging on an OSX. I am most now working on iphone apps using a windows pc, then almost what I use are dead listings.

itsme
June 2nd, 2008, 14:06
i wrote an ida idc script to help name subroutines, using the RTTI that is always in objc executables:
http://nah6.com/~itsme/cvs-xdadevtools/ida/idcscripts/fixobjc.idc ("http://nah6.com/~itsme/cvs-xdadevtools/ida/idcscripts/fixobjc.idc")

there is a (not very active) mailinglist about this:
http://0x90.org/pipermail/xso/ ("http://0x90.org/pipermail/xso/")

and a blog post on openrce:
https://www.openrce.org/blog/view/1113 ("https://www.openrce.org/blog/view/1113")