126w ago - Today Spanish PlayStation 3 developer JaicraB has explained the Cobra USB JIG protection RTOC trick implemented for the PS3 against cloning the device.
To quote, roughly translated: Flynn sent me this text explaining this protective carrying the Cobra, I hope it will open the eyes of those interested in reversing the dumps.
EXPLAIN RTOC COBRA TRICK
The JIG Cobra has several protective measures to ensure that your code could not be used correctly even if your code could be dumped.
This trick RTOC in the registry is the first used for this purpose in addition to hinder analysis.
Registration is initially RTOC stored in the battery to keep the RTOC of lv2 and power it back later:
# =============== S U B R U T I O N E
cobra_syscall_sm_shutdown_hook: # CODE XREF: j syscall_379
. Arg_20 September, 0x20
. Arg_28 September, 0x28
. Arg_30 September, 0x30
. Arg_38 September, 0x38
. Arg_40 September, 0x40
std% r0, arg_20 (% sp)
std% RTOC, arg_28 (% sp)
At this point we have to explain that the OFFSET DELTA. DELTA OFFSET is a method used in the x86 in its original moments in the creation of computer viruses, to calculate the memory address in which we are in the sea of bytes in RAM.
In the original time a computer virus when I did not know where he was pulled into an executable,
depending on the executable it could be an initial site or another, for it was invented DELTA OFFSET.
DELTA OFFSET can be used in any system, the procedure is:
Using the record that indicates the current execution address (or the next depending on the system)
Reducing the size of the previous code we use the value obtained from the registry.
Knowing this, and taking for example the x86 processor where the EIP register can not be read directly invented the trick make a call to a "subfunction" which is simply the following line to the call:
X86 call instruction saves the top of the stack the address of the next instruction to itself. Thus using pop draw from the top of the stack this value, and stored in eax for example, and having the memory address where we only subtract the above would be missing and we have the exact calculation.
The PowerPC can use this trick using the BL instruction is equivalent (LINK BRANCH), which jumps to a "subfunction" but before you save LR in the record the following address to BL.
At this point we see the trick used for the creation of the RTOC of charges at this time. If you look both r0 and RTOC are passed to 0:
li% r0, 0
RTOC li%, 0
Subsequently, given the value 0x11DE0 to RTOC:
RTOC oris%,% RTOC, 1
RTOC ori%,% RTOC, 0x1DE0
A r0 is given the value 0x920:
oris% r0,% r0, 0
ori% r0,% r0, 0x920
R0 is subtracted from the value of RTOC:
SUBF% r0,% r0,% RTOC
Unlike the PowerPC x86 LR register can be read directly with mflr instruction, we put in RTOC the value obtained by the delta offset:
To calculate the delta offset subtract final instructions executed before the delta offset, which were 4, or 16 bytes:
RTOC addi%,% RTOC,-0x10
Finally we add the value of r0 at the end of the delta offset RTOC, storing the result in the RTOC and this already takes RTOC suitable for this hook:
add% RTOC,% RTOC,% r0
It takes having the RTOC stored in the stack 3 arguments that the hook received:
You call the function of the charges where the first argument will check for command 0x8202 (a special command to the usual):
After making the necessary steps as charged, the battery recovers the original RTOC, like the arguments the hook received, it executes the original instruction that was overwritten in the syscall entry 379 (in this case) to have our hook, and call the original syscall lv2:
Upon returning to retrieve the original LR from the stack and returns to the prompt
ld% r0, arg_20 (% sp)
# End of function cobra_syscall_sm_shutdown_hook
Stay tuned for more PS3 Hacks and PS3 CFW news, follow us on Twitter and be sure to drop by the PS3 Hacks and PS3 Custom Firmware Forums for the latest PlayStation 3 scene updates and homebrew releases!
Hi cfwprophet, I see your back around. this is multiman for Cobra, this means it is not just deans work so he can't be held 100% responsible for it.
I think honestly dean is doing a great job with multiman and its just sour grapes. Are we talking about same application/coder?
I think his app is one of the best with the best features, and has some of the best after support around. I do not see loads of threads about any serious errors it has caused so i'm not sure why there is negativity on here towards dean.
Maybe he doesn't know these things, maybe he does know and doesn't want to share, I certainly won't be dissing him because of info he may or may not know or info he chooses to keep to himself for whatever reason he might choose. That is his right.
P.S. Have you seen all the improvments he has made to ps1 emulator hack since it came out? And you think he doesnt try to improve things, if that were true we would still be using multiman0001!!
anyway I'm sure if you know about some solution -offset thing to add- that will make these patched ISOs work i'm sure dean will implement it if you can explain a little more, What is this patch to these ISOs that make them different than normal ISOs, I haven't heard about them, maybe dean hasn't either?
Added download progress indication in XMMB/XBDM modes - Web column. An entry will show current download filename and percentage of completion.
Added TextViewer in File Manager (supported files colored in light blue). Supports viewing of ANSI/UTF plain text files.
TextViewer controls: L1/R1 - PageUp/PageDown, L2/R2 - zoom out/in (50%-250%), R3 - change font, UP/DOWN/LEFT/RIGHT - scroll/pan, L1/R1+SELECT - skip to start/end of file
Added support for browsing Video, Games, Favorites and Retro (ROMS/PS1/PS2/PSP) in "Coverflow" display mode. Change content mode with UP/DOWN.
Update of Cobra USB firmware, Cobra PSP Launcher and mmCM focused on improving the compatibility of the psp emulator.
Changelog of Cobra USB 4.4 and Cobra PSP Launcher 2.0:
Added specific support for the following 15 psp games that either crashed or had critical gameplay issues:
BLAZBLUE CONTINUUM SHIFT II
DJMAX PORTABLE 3
LEGO Pirates of the Caribbean The Video Game
LUNAR: SILVER STAR HARMONY
SMT: Persona 2: Innocent Sin
SOULCALIBUR: Broken Destiny
STAR OCEAN: First Departure
TEKKEN 6 (fixed random crashes)
The 3rd Birthday ((if you see a black screen at beginning, press buttons, it will work after that)
White Knight Chronicles: Origins
Z.H.P.: Unlosing Ranger VS Darkdeath Evilman
Added support to load prometheus patched psp isos.
Added an option for psp emulation. You can set it per game in multiman using "Game settings".
You can choose between auto, mode 1 and mode 2. By default, all games are set to auto, what causes mmCM to choose the apropiated setting from a database, but you can set the option manually.
Mode 1 and Mode 2 have different compatibility, some games that work in one of them won't work in the other one. Mode 2 is usually more compatible.
Changelog of mmCM 03.01.02:
Added support for three different modes to load PSP ISO files (Auto, Mode 1, Mode 2): "Game Settings" in XMMB/XBDM SIDE menu
Added support for lastGAME application - it will load the last game you played, without entering mmCM
lastGAME: Application which loads the last played PS1/PS2/PS3/PSP game (folder and ISO format) (separate application)
bdRESET : Application which resets all redirections and unmounts loaded ISO images (separate application)
Note: When you use "Last Played Game" application you will have to launch the PS1/PS2/PS3 game from the disc icon and the PSP game from the "PSP Launcher" icon
Related news from the Cobra Team: 05 - 01 - 2012
About the problems some users are having in 4.4... Some users have notified us that after update to cobra 4.4, their system freezes when starting the system with cobra inserted. In cobra 4.4, some internal changes were made, and cobra 4.4 is not longer compatible with some modified system files.
Users that have this issue likely flashed some unsupported modules in the system, either by themselves or done automatically by some program. In addition to cobra CFW 3.55 modules, Cobra firmware 4.4 officially give supports to the following commonly used modifications:
the modifications done by bitsbubba in bitsbubba NFW v3
replacement of vsh.self by reactpsn 2.0 one (only the one in the 3.55k folder)
Any other alteration to system modules may cause a hang since cobra 4.4. To fix this problem, access recovery menu in the ps3, without cobra inserted, and reflash Cobra USB CFW or the modificied CFW by bitsbubba NFW v3.
If you wish that we give support to some more modified modules, send us a message about it and we'll give support to them in next version.