PS3 + IDA Tutorial

Posted by Slynk | Posted in | Posted on 9:42 PM

First off, I will not help you obtain a copy of IDA. Go buy it.

http://www.mediafire.com/?kb3s14zi6hramrx

Extract the contents into your IDA folder. I don't take credit for these plugins and loaders.

Loading a File

There are two file types I'll teach you to load. SPU and ELF files.

SPU files can only loaded in IDA 32bit mode. When you load IDA choose "Go" and drag the file onto IDA. Make sure elf is highlighted at the top. In processor type, choose "IBM SPU Cell Processor: spu." Click set. Click OK. "Undefined or unknown...blabla" yes. You should be good to go.

Elf files can be loaded in either 32 or 64 bit mode. When you load IDA choose "Go" and drag the file onto IDA. Make sure PlayStation 3 ELF is highlighted at the top. Don't mess with the processor type. Kernel option 1 check "Create function if data xref data-> code32 exists.

Optional: I don't know what these do but I turn them on anyways XD In kernel option 2 choose "Coagulate data segments in the final pass", "Perform 'no-return' analysis", and "Perform full stack pointer analysis."

Click OK. Sometimes you get a better result from running the analyze_self script. (File->IDC File->C:/Program Files/IDA/idc/analyze_self.idc) Hit yes, copy the TOC Address it shows you and click OK. Go to Options->General->Analysis->Processor specific analysis options. Type the TOC address in (I use 0: instead of 0x to be safe. No clue if it makes a difference.) While you're at it click "Create subi instructions. Click OK. Click Reanalyze Program. Click OK. And wait.

You'll know when a script is done because at the bottom left it's say "AU: idle".

IDA Basics

Just a few things. The program is expansive and I'd love to get to know more about it but here's a few things I know. Hex view and IDA view are connected. That means if you find a string in hex view, you can see it in IDA view. This won't show you magically where it's used at but sometimes, that string is xrefed. If under the string you see "# DATA XREF: " you can right click the ":off_XXXX" at the end, and choose XREF To or From. To, will give you a graph of any functions that have a call "to" that offset. From give's a graph of offset's called "from" that offset (mostly only useful for viewing a graph of where all a function leads to.)

In IDA view, you can search for either an immediate value, a string, or a byte sequence. I've never "not" checked "find all occurrences." Don't know why you wouldn't want to. It'll return a list of occurrences in its own window.

If you're lucky, the file you scanned will have some of the functions named (something other than sub_, nullsub_, or start). These are known functions that are defined in the ps3 sdk.

When exiting, always make sure, unless you WANT to re analyze the whole file again, to choose one of the Pack database options and Collect garbage.

Comments (11)

CAN YOU QA FLAG MY CONSOUL PLZ? KTHX

i will just send me you console and 300 euros =P

http://users.pullman.com/fjstevens/tokens/cec/CECimages/SuperTokenPlain.jpg

Just for you. ;)

I hear there is a CFW 3.65 you are working on. It also makes the PS3 possible to hack the NASA space station. I am very interested and would like for you to release it to the public. Or you could just release it to the l33t users over at NextGenUpdate. :P

is it true tht you can qa flagg ofw 3.61

could you explain what does the word IDA stand for?

No, you can't qa flag a 3.6+ ofw console. At least not with the current keys and algorithm.

I *think* IDA stands for interactive disassembler: http://www.hex-rays.com/idapro/

I followed your description, trying to load an unself'd .sprx into IDA for analysis. Depending on which mode I use (32 bit or 64 bit), IDA either reports that the file doesn't contain any instructions or data (and I end up with a single 0xFFFFFFFF as contents) or claims to load the file into the database but never finishes (i.e. displays this dialog for hours and hours and ...).

I tried with different .sprx files from different versions of the firmware. The unself'd ELFs look alright to me in a hex editor, but IDA won't load anything. Is any special version of IDA required? Which one works? Anything else I can try to make things work?

To load .sprx files just load the file as an elf, not ps3 loader. Then use analyze_sprx.idc

Thanks! This works -- at least for a couple of .sprx files, not all.

9 years after...

Post a Comment