You are viewing our Forum Archives. To view or take place in current topics click here.
Full Reset Glitch Tutorial|bad soldering tut| Xenon TUT
Posted:

Full Reset Glitch Tutorial|bad soldering tut| Xenon TUTPosted:

Nickxmodz
  • TTG Addict
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,509
Reputation Power: 133
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,509
Reputation Power: 133
[ Register or Signin to view external links. ]
Stickied by iPatobo.

What is a Reset Glitched console (RGH)




Introduction

Gli Gli wrote The software based approaches of running unsigned code on the 360 mostly don't work, it was designed to be secure from a software point of view.

The processor starts running code from ROM (1bl) , which then starts loading a RSA signed and RC4 crypted piece of code from NAND (CB).

CB then initialises the processor security engine, its task will be to do real time encryption and hash check of physical DRAM memory. From what we found, it's using AES128 for crypto and strong (Toeplitz ?) hashing. The crypto is different each boot because it is seeded at least from:
- A hash of the entire fuseset.
- The timebase counter value.
- A truly random value that comes from the hardware random number generator the processor embeds. on fats, that RNG could be electronically deactivated, but there's a check for "apparent randomness" (merely a count of 1 bits) in CB, it just waits for a seemingly proper random number.

CB can then run some kind of simple bytecode based software engine whose task will mainly be to initialise DRAM, CB can then load the next bootloader (CD) from NAND into it, and run it.

Basically, CD will load a base kernel from NAND, patch it and run it.

That kernel contains a small privileged piece of code (hypervisor), when the console runs, this is the only code that would have enough rights to run unsigned code.
In kernel versions 4532/4548, a critical flaw in it appeared, and all known 360 hacks needed to run one of those kernels and exploit that flaw to run unsigned code.
On current 360s, CD contains a hash of those 2 kernels and will stop the boot process if you try to load them.
The hypervisor is a relatively small piece of code to check for flaws and apparently no newer ones has any flaws that could allow running unsigned code.

On the other hand, tmbinc said the 360 wasn't designed to withstand certain hardware attacks such as the timing attack and "glitching".

Glitching here is basically the process of triggering processor bugs by electronical means.

This is the way we used to be able to run unsigned code.





Reset Glitch in a few words

Gli Gli wrote They found that by sending a tiny reset pulse to the processor while it is slowed down does not reset it but instead changes the way the code runs, it seems it's very efficient at making bootloaders memcmp functions always return "no differences". memcmp is often used to check the next bootloader SHA hash against a stored one, allowing it to run if they are the same. So we can put a bootloader that would fail hash check in NAND, glitch the previous one and that bootloader will run, allowing almost any code to run.





Details on the phat hack

Gli Gli wrote On fats, the bootloader we glitch is CB, so we can run the CD we want.

cjak found that by asserting the CPU_PLL_BYPASS signal, the CPU clock is slowed down a lot, there's a test point on the motherboard that's a fraction of CPU speed, it's 200Mhz when the dash runs, 66.6Mhz when the console boots, and 520Khz when that signal is asserted.

So it goes like that:
- We assert CPU_PLL_BYPASS around POST code 36 (hex).
- We wait for POST 39 start (POST 39 is the memcmp between stored hash and image hash), and start a counter.
- When that counter has reached a precise value (it's often around 62% of entire POST 39 length), we send a 100ns pulse on CPU_RESET.
- We wait some time and then we deassert CPU_PLL_BYPASS.
- The cpu speed goes back to normal, and with a bit of luck, instead of getting POST error AD, the boot process continues and CB runs our custom CD.

The NAND contains a zero-paired CB, our payload in a custom CD, and a modified SMC image.
A glitch being unreliable by nature, we use a modified SMC image that reboots infinitely (ie stock images reboot 5 times and then go RROD) until the console has booted properly.
In most cases, the glitch succeeds in less than 30 seconds from power on that way.





Details on the slim hack

The bootloader we glitch is CB_A, so we can run the CB_B we want.

On slims, we weren't able to find a motherboard track for CPU_PLL_BYPASS.
Our first idea was to remove the 27Mhz master 360 crystal and generate our own clock instead but it was a difficult modification and it didn't yield good results.
We then looked for other ways to slow the CPU clock down and found that the HANA chip had configurable PLL registers for the 100Mhz clock that feeds CPU and GPU differential pairs.
Apparently those registers are written by the SMC through an I2C bus.
I2C bus can be freely accessed, it's even available on a header (J2C3).
So the HANA chip will now become our weapon of choice to slow the CPU down (sorry tmbinc, you can't always be right, it isn't boring and it does sit on an interesting bus

So it goes like that:
- We send an i2c command to the HANA to slow down the CPU at POST code D8 .
- We wait for POST DA start (POST DA is the memcmp between stored hash and image hash), and start a counter.
- When that counter has reached a precise value, we send a 20ns pulse on CPU_RESET.
- We wait some time and then we send an i2c command to the HANA to restore regular CPU clock.
- The cpu speed goes back to normal, and with a bit of luck, instead of getting POST error F2, the boot process continues and CB_A runs our custom CB_B.

When CB_B starts, DRAM isn't initialised so we chose to only apply a few patches to it so that it can run any CD, the patches are:
- Always activate zero-paired mode, so that we can use a modified SMC image.
- Don't decrypt CD, instead expect a plaintext CD in NAND.
- Don't stop the boot process if CD hash isn't good.

CB_B is RC4 crypted, the key comes from the CPU key, so how do we patch CB_B without knowing the CPU key?
RC4 is basically:
crypted = plaintext xor pseudo-random-keystream
So if we know plaintext and crypted, we can get the keystream, and with the keystream, we can encrypt our own code. It goes like that:
guessed-pseudo-random-keystream = crypted xor plaintext
new-crypted = guessed-pseudo-random-keystream xor plaintext-patch
You could think there's a chicken and egg problem, how did we get plaintext in the first place?
Easy: we had plaintext CBs from fat consoles, and we thought the first few bytes of code would be the same as the new CB_B, so we could encrypt a tiny piece of code to dump the CPU key and decrypt CB_B!

The NAND contains CB_A, a patched CB_B, our payload in a custom plaintext CD, and a modified SMC image.
The SMC image is modified to have infinite reboot, and to prevent it from periodically sending I2C commands while we send ours.

Now, maybe you haven't realised yet, but CB_A contains no checks on revocation fuses, so it's an unpatchable hack !




Updating the Nand-x for those of you who dont own a Xlinix jtag cable.



Special thanks to Boss Lobbys for the vid/tut!





Slim Dual booting with cygnos.





Now onto the Actual hack:

Xenon Consoles



Generate your ecc image using the latest version of J-Runner and flash to your NAND (just like a regular RGH).
download
Program your TX CoolRunner (or whatever flavor RGH mod you are using) with the tx-xenon.xsvf or tx-xenon.jed file.

The Xenon has a capacitor on CPU_RST that was removed in later models. C7R112 (located near the xclamp under the CPU) must be de-soldered, and the CPU_RST wire from the TX CoolRunner(D) must be soldered to the left pad (non grounded pad).

A 47nf ( 0.047uf) capacitor needs to be added between PLL_BYPASS(+) and GND(-). (If you have a genuine TX CoolRunner REV B you can use the on-board by bridging the CAP jumper)

A 220-270pf capacitor should be added between CPU_RST(+) and GND(-) on the cpld. (If you have a genuine TX CoolRunner REV B this is already included in the design so not required)

[ Register or Signin to view external links. ]





Phat Consoles

Items needed:

Team Xecuter Cool Runners
Solder
Flux
40-watt Soldering Iron (pencil style)
Nand-X
Programming Cable(I'm using the jtag cable from Xlinix)
Desoldering braid(optional)
Time and Patience

Programs Needed:

Jtag Tool v4.21




How to program the Cool Runners


Set the Cool Runners programming switch to the "on" setting.

[spoil] [ Register or Signin to view external links. ]

Solder the red wire to the 3v3 on the Cool Runner then solder the it to the point shown in the picture below. Then take the Black wire and solder it to the GND on the Cool Runner then solder it to the AV Port Like the picture below.

[ Register or Signin to view external links. ]

Plug in the power brick to the console and leave it off this. This will power the Cool Runner so you can program it. If the LED's on the Cool Runner are on then you have allowed power to the Cool Runner.


Now plug in the programming cable to the Cool Runner. (If you are using the Xlinix cable you will need to raise the programming prongs)





Now on to the computer part:

Click [ Register or Signin to view external links. ] for the programming files for your Cool Runner

Follow this video to program the Cool Runner.







Now that your Cool Runner is programmed you can proceed with this hack.

First you must read your nand.

Solder points for Nand-x

[ Register or Signin to view external links. ]

Now you must dump you nand follow the images below.

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


Now create the .ecc (hacked image for Xell Reloaded)

Follow the images below.

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]

Write the .ecc to the console

Follow the images below

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


Now you must finish the installation of the Cool Runner to the Xbox 360 phat.

Follow the image below

[ Register or Signin to view external links. ]



Boot the console and retrieve the CPU key
(Fuse 3 and 5 or fuse 4 and 6)










Slim Console
Team Xecuter Cool Runners
Solder
Flux
40-watt Soldering Iron (pencil style)
Nand-X
Programming Cable(I'm using the jtag cable from Xlinix)
Desoldering braid(optional)
Time and Patience

Programs Needed:

Jtag Tool v4.21
Xlinix Lab Tools




How to program the Cool Runners


Set the Cool Runners programming switch to the "on" setting and the switch for phat and slim is switched to slim,

[spoil] [ Register or Signin to view external links. ]

Solder the red wire to the 3v3 on the Cool Runner then solder the it to the point shown in the picture below. Then take the Black wire and solder it to the GND on the Cool Runner then solder it to the AV Port Like the picture below.

[ Register or Signin to view external links. ]

Plug in the power brick to the console and leave it off this. This will power the Cool Runner so you can program it. If the LED's on the Cool Runner are on then you have allowed power to the Cool Runner.


Now plug in the programming cable to the Cool Runner. (If you are using the Xlinix cable you will need to raise the programming prongs)





Now on to the computer part:

Click [ Register or Signin to view external links. ] for the programming files for your Cool Runner

Follow this video to program the Cool Runner.






Now that your Cool Runner is programmed you can proceed with this hack.

First you must read your nand.

Solder points for Nand-x

[ Register or Signin to view external links. ]

Now you must dump you nand follow the images below.


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


Now create the .ecc (hacked image for Xell Reloaded)

Follow the images below.

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]

Write the .ecc to the console

Follow the images below

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


Now you must finish the installation of the Cool Runner to the Xbox 360 slim.

Follow the image below

[ Register or Signin to view external links. ]


Boot the console and retrieve the CPU key
(Fuse 3 and 5 or fuse 4 and 6)





How To Fix Your Console After You Mess Up

This will take much more skill in soldering. If you failed at the original points i DO NOT advise you using the alternate points! I would recommend sending it to some one that has cut these traces and has fixed problems like this before.

Recommendations:

Nickxmodz
BoSsLoBbYz
iMoses
Icy-Tank
Crazyp1977


Alternate Point For the CPU_PLL_BYPASS

[ Register or Signin to view external links. ]

Or

[ Register or Signin to view external links. ]




New STBY_CLK

[ Register or Signin to view external links. ]




New POST_OUT1

[ Register or Signin to view external links. ]





After you have gotten your CPU key you have to make the ggbuild so you can boot to dash.



Installing GGBuild on RGH console

Follow these images to make and write the GGBuild.

[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]


After that finishes writing Boot the console and your on the dashboard!


Last edited by Nickxmodz ; edited 17 times in total

The following 10 users thanked Nickxmodz for this useful post:

Xe-Tu7 (04-27-2012), Zir (04-17-2012), MajorLeaugeGaming (03-09-2012), TTG--GRAFFITI-- (12-05-2011), 5KMods (11-18-2011), TTGxFreeB00T_Fanboy (11-16-2011), Teemo (11-15-2011), M0d (11-14-2011), pvtpunchu (11-14-2011), iPatobo (11-14-2011)
#2. Posted:
BoSsLoBbYz
  • TTG Fanatic
Status: Offline
Joined: Oct 01, 201013Year Member
Posts: 4,566
Reputation Power: 228
Status: Offline
Joined: Oct 01, 201013Year Member
Posts: 4,566
Reputation Power: 228
wow this helps... but sense it is nickxmodz...
#3. Posted:
SeaEye
  • V5 Launch
Status: Offline
Joined: May 03, 201113Year Member
Posts: 3,845
Reputation Power: 251
Status: Offline
Joined: May 03, 201113Year Member
Posts: 3,845
Reputation Power: 251
This looks amazing. Will help a lot of people.
#4. Posted:
Carlooch
  • Winter 2020
Status: Offline
Joined: Oct 08, 201013Year Member
Posts: 2,310
Reputation Power: 10427
Status: Offline
Joined: Oct 08, 201013Year Member
Posts: 2,310
Reputation Power: 10427
was there through the pain and agony, but we got one to work <3
#5. Posted:
Reverence
  • TTG Contender
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 3,165
Reputation Power: 129
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 3,165
Reputation Power: 129
Nice post i wanna make a jtag now
#6. Posted:
Rottweiler
  • Powerhouse
Status: Offline
Joined: Jul 29, 201112Year Member
Posts: 401
Reputation Power: 16
Status: Offline
Joined: Jul 29, 201112Year Member
Posts: 401
Reputation Power: 16
is there anyway i can reset my kernel to an early dash?sorry imma noob dont be a d*ck
#7. Posted:
sqd
  • TTG Addict
Status: Offline
Joined: Sep 06, 201013Year Member
Posts: 2,699
Reputation Power: 153
Status: Offline
Joined: Sep 06, 201013Year Member
Posts: 2,699
Reputation Power: 153
Gdog9958 wrote Nice post i wanna make a jtag now

:facepalm: an rgh console is not a jtag. although they act similar they are very different things.

good job on the post nick looks like you spent some time on this, very organized and detailed will probably help anyone out there having trouble with rgh

Rottweiler wrote is there anyway i can reset my kernel to an early dash?sorry imma noob dont be a d*ck

in order to do the rgh your console can be at any kernal. this is a very new hack and as of now everyconsole (except xenons) are exploitable to it. in order to jtag though you need an older kernal version but there is no way to downgrade kernals
#8. Posted:
pvtpunchu
  • Wizard
Status: Offline
Joined: Apr 07, 201014Year Member
Posts: 2,529
Reputation Power: 113
Status: Offline
Joined: Apr 07, 201014Year Member
Posts: 2,529
Reputation Power: 113
Details are in depth, the GGBuild tutorial is great also!

Cant wait for the slim hack tutorial!

Great post!
#9. Posted:
M0d
  • TTG Master
Status: Offline
Joined: Dec 23, 201013Year Member
Posts: 878
Reputation Power: 40
Status: Offline
Joined: Dec 23, 201013Year Member
Posts: 878
Reputation Power: 40
Thanks thanks thanks thanks thanks!
#10. Posted:
Nickxmodz
  • TTG Addict
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,509
Reputation Power: 133
Status: Offline
Joined: Dec 11, 201013Year Member
Posts: 2,509
Reputation Power: 133
updated with the slim hack video coming tommorow
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.