Explicacion Chusquera en Español (agradezco correcciones):
Leer primero: proceso de arranque de X360 en el wiki
http://www.elotrolado.net/wiki/Proceso_Arranque_Xbox_360
La NAND desde donde se carga el kernel en la X360 contiene tanto el kernel a cargar como un 'kernel de backup'. el kernel de backup se carga si el kernel mas actualizado se encuentra defectuoso o alterado (vamos, que no pasa el chequeo de firma)
en las X360 antiguas, el kernel de backup es el 1888 (por lo menos, en la mia asi es) o alguno de los 'preburn-fuse' (kernels vulnerables con el bug del hipervisor).
puesto que cuando el kernel actual falla la comprobacion de firmado, se procede a cargar el kernel de backup, y puesto que dicho kernel de backup NO PUEDE SER CARGADO por el fuse quemado, la consola se BLOQUEA.
El timing attack se aprovecha de este proceder para, por fuerza bruta, dar con una firma VALIDA que pase el chequeo, y asi cargar, un kernel VULNERABLE aun con un fuse quemado.
- se coge un kernel con bug del hipervisor.
- se modifica para que no importe que tenga un fuse quemado
- se mete en un emulador de NANDs y se empiezan a probar con diversas firmas. (por ejemplo, firma 00 00 00 00)
- se testea EL MOMENTO en el que falla la firma (por eso lo de 'timing attack')
- segun el momento justo en que falla la firma, sabemos 'aproximadamente' en que bit ha fallado la firma, cambiamos ese bit, y reseteamos la consola.
- seguimos haciendo timing attack hasta que la consola arranque con un kernel vulnerable.
- cargamos KingKing (abreviado en casi todos sitios como KK) con linux, y sacamos la KeyVault (abreviado como KV) y la CPUKey (abreviado como CK).
a partir de aqui, la consola en nuestra. con el KV y la CK podemos cargar CUALQUIER KERNEL, con CUALQUIER CONFIGURACION DE FUSES e incluso DESBANEAR LA CONSOLA (esto aun sin confirmar).
Fuentes originales en ingles.
------------------------------
Here is the proposed sequence (correct me if I get this wrong):
1) Dump the flash from a post 4552 box
2) Modify the fuse count in the flash image to allow the original firmware to boot (1888)
3) Corrupt the 4552 update in the flash image
3) Find the hash value (16 bytes) for the modified flash
a) program the flash with 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 for the key (and correct ECC bytes)
b) boot 360 and measure time to failure code
c) program the flash with 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d) boot 360 and measure time to failure code
.
.
.
e) if time to failure is 2.2uS longer, remember the first key byte and start interating on the second key byte
--------------------------------------------
Done it! My bricked box - one blown eFuse but no CPU key and no valid flash dump that would boot (I did have a valid 2241 dump though that would no longer boot because of the eFuse) - is now alive and well and booting 2.0.1888 with a patched CB (LD count = 1) and a "guessed" hash. Even doing it "manually" only took 3 evenings ;) Now, sleep
Just to be clear, the timing attack will allow you to downgrade to 2.0.1888. You can then upgrade to 4532 & run the KK sploit and obtain your CPU keys. You should be able to replace the original CB after the upgrade (this needs to be confirmed) and then the only "clue" to what happened is that you may have 1 or 2 more burned eFuses for the HV/Kernel version you are running
-----------------------------------------
I'm using the Infectus chip (with a dll interface provided by them) to rewrite one NAND block with sequential hash guesses. The process takes approx 1 second. The Hynix data sheet quotes a 100,000 read write cycles, our worst case is 4096 or 4%. Since this is a one time operation I think 4% wear is acceptable.
Some PIC processors have CCP modules that allow an internal 16 bit counter to be sampled when a +ve or -ve edge is detected, the counter is claimed to have a 50nS resolution although I'm not convinced ;) Simple software in the PIC allows me to detect the end of CE and the POST port changing from 0x21 => 0xA4 (the end of hashing). The PIC also drives the JTAG reset line. A couple of cheap interface ICs and some passives complete the design - you will definitely be able to build your own hardware from easy to obtain parts, on stripboard, for around 20 Euros.
Controlling all this is some PC software that can generate the required CB section patch, control the infectus and the PIC. It would seem that the "cycle" time should be less than 3 seconds. To test this I am using the 360 I "bricked" at christmas, I don't know the CPU key for this box so I cant "cheat" and test each correctly "guessed" hash byte.
Once I finish testing I will post more info followed by a complete, open source package of hardware and software so you can build your own in a few hours. Now might be a good time to get that infectus chip.
One final point, a lot of the people who want to downgrade will probably have recent versions of the applications (dash, media player etc etc). Some of the latest dashes definitely completely replaced the dash.xex (and possibly others) rather than write new xexp files. These newer versions of the applications definitely require newer system libs and I doubt they will boot on a 2.0.1888 machine. We will need to obtain an image of a clean 2.0.1888 file system.
-----------------------------------------------
The timing attack does not try to "bruteforce" the cpu key itself. It tries to find/bruteforce a hash value which is a result of the usage of the cpu key (so even if you have that hash you still cannot backwards compute the cpu key). But finding this hash value (I usually refer to it as the CB-auth value) will enable the xbox to boot the original kernel (v 1888). This then allows you to upgrade to a vulnerable kernel (eg 4532) and THEN you can extract the cpu key using the kk exploit.
The real NAND flash memory contains several sections. Sections are referred to as CB, CD, CE, CF etc (also SMC and KV). The CB section contains (among many other things) the 16 bytes CB-auth value. But because we want to change the CB-auth value each time we boot we somehow have to make sure that when the CPU reads the 16 bytes in the CB section from the NAND we (sneakly) take over with a nand emulator. This is some electronics that behaves like a NAND but is not. The reason we do is because its easier/faster/better to change bytes in the nand emulator than to change bytes in the nand flash itself (which may also break if you flash it too many times).
So the nand emulator makes sure 1 byte (of the 16 bytes) changes each time the xbox boots. And since we already got the electronics/chip -to emulate the nand- we also use this (programmable) electronics/chip to automatically reset and measure time. This makes an easier design.
From a hardware perspective this means that the programmable electronics/chip has soldering connections to the real nand flash (since it has to be able to "take over"), to the reset "button" to reboot (recently found and tested) and to the connections on the cpu that signify an error or a boot state. That way it can measure between two points in the boot sequence: 1) just before the error is detected 2) just after the error is detected. This means our guessed CB-auth 16 bytes are compared byte-by-byte with the real one (only known by the cpu) and a difference is found at one of the 16 bytes. And if it takes 2,2 micro seconds longer between these points in the boot sequence we know we have found another valid CB-auth byte.
Since -on average- you will find the correct value at roughly half of the possible byte values you only need to try (approx) 128 values for each of the 16 bytes. Thats why vax is talking about 16 * 128 total number if byte changes...
There is a theoretical minimum to the reboot time of about 1 second. So in theory you could find the 16 bytes in 34 minutes. Thats probably not gonna happen. Grin And installing the hardware will probably take even more time so its not a really big issue. But this is basically where the time speculations are based on.