Editing SPU Isolated Modules Reverse Engineering
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
*<span style="text-decoration: line-through;">http://git.fail0verflow.com/?p=anergistic.git</span> | *<span style="text-decoration: line-through;">http://git.fail0verflow.com/?p=anergistic.git</span> | ||
=== | === usage === | ||
anergistic can be launched in two different modes, one that '''only emulates''' (runs) the program through the SPU and the the other that lets you '''debug''' the process through gdb | anergistic can be launched in two different modes, one that '''only emulates''' (runs) the program through the SPU and the the other that lets you '''debug''' the process through gdb | ||
Line 17: | Line 17: | ||
==== only emulate ==== | ==== only emulate ==== | ||
{{keyboard|content= | {{keyboard|content=./anergistic spu_elf_name.elf}} | ||
this mode runs an elf with all the parameters and actions defined on main.c, channel.c a | this mode runs an elf with all the parameters and actions defined on main.c, channel.c a | ||
==== debug ==== | ==== debug ==== | ||
terminal 1 | terminal 1 | ||
{{keyboard|content= | {{keyboard|content=./anergistic -g1234 spu_elf_name.elf}} | ||
simulate debug server in the local host on port 1234 | simulate debug server in the local host on port 1234 | ||
terminal 2 | terminal 2 | ||
{{keyboard|content= | {{keyboard|content=spu-gdb spu_elf_name.elf | ||
spu-gdb spu_elf_name.elf | (gdb)target remote :1234}} | ||
(gdb)target remote :1234 | |||
connect to the local host on port 1234 | connect to the local host on port 1234 | ||
Line 48: | Line 46: | ||
=== Customizations === | === Customizations === | ||
see example below | |||
'''Running in aim_spu_module anergistic''' | '''Running in aim_spu_module anergistic''' | ||
Line 54: | Line 52: | ||
=== Problems === | === Problems === | ||
==== Connection | ====Connection proble==== | ||
when in debugger mode | when in debugger mode | ||
<pre> | <pre> | ||
Line 62: | Line 59: | ||
recv failed: Success | recv failed: Success | ||
</pre> | </pre> | ||
====Solution==== | |||
use spu-gdb | |||
=== | === Tools === | ||
[http://pastie.org/2810870 gnuify_ida.pl][http://paste.ubuntu.com/25615421/ mirror] | [http://pastie.org/2810870 gnuify_ida.pl][http://paste.ubuntu.com/25615421/ mirror] | ||
Use this to convert IDA disassembly into a format suitable for GNU AS. Literals in IDA are unsigned while AS expects signed literals. Conversion of literals is a work in progress. | Use this to convert IDA disassembly into a format suitable for GNU AS. Literals in IDA are unsigned while AS expects signed literals. Conversion of literals is a work in progress. | ||
== aim_spu_module == | == aim_spu_module == | ||
It is used to retrieve the device type, device id, open psid and the pscode from the EID0 data that is passed in. | |||
=== Debug messages === | === Debug messages === | ||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" | Address !! rowspan="2" | Message | ! colspan="2" | Address !! rowspan="2" | Message | ||
Line 115: | Line 85: | ||
| 0x3790 || 0x3610 || "(spu) PU DMA area size is not equall to AIM_DMA_SIZE\n" | | 0x3790 || 0x3610 || "(spu) PU DMA area size is not equall to AIM_DMA_SIZE\n" | ||
|} | |} | ||
This messages are DMAed to the ppu if a debug output address is specified. | |||
=== Data === | === Data === | ||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" | Address !! rowspan="2" | Message | ! colspan="2" | Address !! rowspan="2" | Message | ||
Line 135: | Line 104: | ||
=== Functions === | === Functions === | ||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" | Address !! rowspan="2" | Name !! rowspan="2" | Parameters !! rowspan="2" | Info | ! colspan="2" | Address !! rowspan="2" | Name !! rowspan="2" | Parameters !! rowspan="2" | Info | ||
Line 171: | Line 139: | ||
| 0x3168 || || write_tag_mask_bit || mask_bit:$4 || Used to set a specific bit in MFC_WrTagMask. | | 0x3168 || || write_tag_mask_bit || mask_bit:$4 || Used to set a specific bit in MFC_WrTagMask. | ||
|} | |} | ||
==== Disasm ==== | ==== Disasm ==== | ||
The complete disassembly is available at [http://pastebin.com/7vArGweJ]. | |||
== Decrypting EID == | ==Decrypting EID== | ||
=== Dumper iso.self === | === Dumper iso.self === | ||
=== Dumper Payload === | === Dumper Payload === | ||
* <span style="text-decoration: line-through;">http://pastie.org/pastes/2101977</span> | |||
* http://paste.ubuntu.com/25615310/ | |||
=== Running in aim_spu_module anergistic === | |||
//Partial code modified to run aim_spu_module | |||
* <span style="text-decoration: line-through;">http://pastie.org/2000330 [http://www.ps3devwiki.com/files/devtools/anergistic/#2000330-Pastie.txt]</span> | |||
=== Running aim_spu_module | * http://paste.ubuntu.com/25615344/ | ||
* | |||
* | |||
== isoldr == | == isoldr == | ||
loads, decrypts, runs isolated modules, and creates through aes the required key in LS 0x0 | |||
=== Debug messages === | === Debug messages === | ||
This module doesnt contain debug messages | |||
This module | |||
=== Data === | === Data === | ||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" | Address !! rowspan="2" | Message | ! colspan="2" | Address !! rowspan="2" | Message | ||
Line 216: | Line 180: | ||
=== Functions === | === Functions === | ||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" | Address !! rowspan="2" | Name !! rowspan="2" | Parameters !! rowspan="2" | Info | ! colspan="2" | Address !! rowspan="2" | Name !! rowspan="2" | Parameters !! rowspan="2" | Info | ||
Line 271: | Line 234: | ||
|} | |} | ||
from isoldr 3.41 iirc -> http://pastie.org/2774207 [http://paste.ubuntu.com/25615363/ mirror] //offsets relative to segment start | |||
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> | {{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> |