<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://xboxdevwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lowtolerance</id>
		<title>xboxdevwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://xboxdevwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lowtolerance"/>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/Special:Contributions/Lowtolerance"/>
		<updated>2026-04-26T11:43:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7351</id>
		<title>Exploits</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7351"/>
				<updated>2024-01-09T23:40:39Z</updated>
		
		<summary type="html">&lt;p&gt;Lowtolerance: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MCPX ==&lt;br /&gt;
&lt;br /&gt;
=== LDT (Hypertransport) bus tap ===&lt;br /&gt;
&lt;br /&gt;
See [http://www.xenatera.com/bunnie/proj/anatak/xboxmod.html#ldt bunnie's adventures hacking the Xbox].&lt;br /&gt;
&lt;br /&gt;
=== Visor hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits incorrect rollover of memory address. Microsoft's strategy for halting the system in the event of a &amp;quot;panic&amp;quot; event during the boot process (i.e., the hash for decrypting 2bl is incorrect) was to put the code to hide the MCPX ROM at the very end of the ROM itself, which is mapped to the top of addressable memory, and rely on the CPU to halt when the instruction pointer rolls over from 0xFFFFFFFF to 0x00000000. Incredibly, Microsoft missed that this behavior was specific to AMD's x86-compatible CPUs, which were used during the development process. In fact, the Intel CPU that ended up in retail units will happily continue execution at 0x00000000. &lt;br /&gt;
&lt;br /&gt;
Visor's hack used Xcodes to write a jump into a location in flash memory at the very beginning of the address space and forced the MCPX ROM to panic by rewriting bytes at the end of 2bl. When the MCPX attempts to validate the 2bl, it will fail and attempt to &amp;quot;fall through&amp;quot; the memory space until the system halts, which never actually happens and the CPU will continue to execute the injected code that jumps into flash. &lt;br /&gt;
&lt;br /&gt;
=== MIST hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits error in xcode interpreter security check. MCPX 1.0 contains code intended to prevent an attacker from using Xcodes to turn off the Xcode interpreter, which is normally accomplished by setting a bit in memory used by the PCI bus to set device configuration, directing the mapping of memory to the top of memory from the MCPX's ROM to flash. The interpreter will reject Xcode that attempts to modify data at this address, but neglects to consider the behavior of the PCI controller, which only utilizes the lower 24 bits of a memory address. Consequently, it is still possible to toggle the necessary bit and turn off the MCPX's secret ROM by using a &amp;quot;fake&amp;quot; address -- the desired address with the upper bits modified so that the interpreter's check will not catch that we are hiding the secret ROM. &lt;br /&gt;
&lt;br /&gt;
A similar attack is possible by abusing the Xcode interpreter's ability to outputting the necessary code to hide the secret ROM to the appropriate I/O port, which the interpreter does not attempt to stop.&lt;br /&gt;
&lt;br /&gt;
=== A20M# hack ===&lt;br /&gt;
&lt;br /&gt;
[[File:Haxar-a20m.jpg|thumb|200px|A jumper wire hack to enable A20]]&lt;br /&gt;
&lt;br /&gt;
Uses a legacy x86 feature (beginning with 286 CPUs) that relied on a gate on address line 20 (A20) to determine whether the code execution should roll over to the lower 64kb or continue on into higher memory addresses. This feature still existed in the CPU used in the Xbox. By pulling down the A20 gate, an attacker can effectively modulate an address so that the system will point to a location in memory below the addressed location. For instance, with the A20 gate pulled down, the address 0xFFFFFFFF would be translated to 0xFFEFFFFF, which on the Xbox would continue code instruction at a location in flash.&lt;br /&gt;
&lt;br /&gt;
=== RC4 attack (MCPX 1.0 only) ===&lt;br /&gt;
&lt;br /&gt;
Microsoft uses the last bytes of the decrypted 2BL to check the integrity of the 2BL.&lt;br /&gt;
However, RC4 does not have any feedback which means changes in the 2BL will not reflect in the last couple of bytes which are checked.&lt;br /&gt;
As such, the 2BL can be freely modified, as long as the last couple of bytes still match what the MCPX ROM expects.&lt;br /&gt;
&lt;br /&gt;
This can be used to take over the 2BL entry point.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''This attack is described by Michael Steil in his Google talk, “[https://www.youtube.com/watch?v=9NqLljaHc80 Hacking the Xbox Security System].''&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== TEA attack (MCPX 1.1 only) ===&lt;br /&gt;
&lt;br /&gt;
TEA, which is only used in MCPX 1.1, can not be used as a hash in Davies-Meyer mode [http://www.tayloredge.com/reference/Mathematics/VRAndem.pdf][https://www.schneier.com/academic/paperfiles/paper-key-schedule.pdf]. And yet, Microsoft used it that way.&lt;br /&gt;
&lt;br /&gt;
The original attack uses the 5 bytes at 0xffffd400 (FBL entry point) which are &amp;lt;code&amp;gt;E9 83 01 00 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0xffffd588&amp;lt;/code&amp;gt; (which is a jump within the flash region).&lt;br /&gt;
&lt;br /&gt;
When flipping the highest bit of the operand DWORD (at 0xffffd400, mind your endianess) this will become: &amp;lt;code&amp;gt;E9 83 01 80 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0x7fd588&amp;lt;/code&amp;gt; (which is a jump into the RAM region).&lt;br /&gt;
For the attack to be successful, the highest bit in the DWORD at 0xffffd404 also has to be flipped.&lt;br /&gt;
&lt;br /&gt;
The RAM can be controlled using the x-code command to write to RAM.&lt;br /&gt;
So the idea is to copy a program from Flash to RAM using x-codes.&lt;br /&gt;
Then the FBL / 2BL is modified to jump into said RAM region by flipping a bit of a jump operand (as described above).&lt;br /&gt;
The 2 bit flips will not change the hash of FBL / 2BL as TEA is broken.&lt;br /&gt;
&lt;br /&gt;
As such, the FBL verification will succeed, the MCPX ROM will hand control to the FBL which will then jump into the attacker controlled RAM.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''The TEA algorithm and exploit are also described in more detail in Bunnie's book (Page 109 and Page 142).''&lt;br /&gt;
&lt;br /&gt;
== Dashboard ==&lt;br /&gt;
&lt;br /&gt;
=== Audio hacks ===&lt;br /&gt;
=== Font hacks ===&lt;br /&gt;
&lt;br /&gt;
[http://archiv.sega-dc.de/phoenix.maxconsole.net/docs/berternie.inc.htm Analysis of &amp;quot;Bert &amp;amp; Ernie&amp;quot; font-exploit].&lt;br /&gt;
&lt;br /&gt;
==== Easter-egg exploit ====&lt;br /&gt;
&lt;br /&gt;
== Savegames ==&lt;br /&gt;
Savedgames can be used as an exploit method, but care must be taken for most games are verifying digital signatures of savedgames {{citation needed}} [http://bunniefoo.com/nostarch/HackingTheXbox_Free.pdf]&lt;br /&gt;
=== [[007: Agent Under Fire]] ===&lt;br /&gt;
&lt;br /&gt;
[https://web.archive.org/web/20031003093240/http://xbox-linux.sourceforge.net:80/docs/007analysis.html Analysis of this savegame-exploit].&lt;br /&gt;
&lt;br /&gt;
=== [[Frogger Beyond]] ===&lt;br /&gt;
Not much is known why this game was in the list, [https://events.ccc.de/congress/2005/fahrplan/attachments/674-slides_xbox.pdf 22C3, page 85]&lt;br /&gt;
The game isnt shown in the final presentation at 22C3 (neither are Mechassault nor SplinterCell).&lt;br /&gt;
&lt;br /&gt;
In 2022, Artem Garmash published a blog post describing an approach to [https://agarmash.com/posts/xbox-frogger-beyond-exploit/ exploiting Frogger Beyond].&lt;br /&gt;
&lt;br /&gt;
=== [[MechAssault]] ===&lt;br /&gt;
&lt;br /&gt;
Exploit runs a modified version of Xbox Live Update to execute a paylaod.&lt;br /&gt;
&lt;br /&gt;
=== [[Tom Clancy's Splinter Cell]] ===&lt;br /&gt;
=== [[Tony Hawk's Pro Skater 4]] ===&lt;br /&gt;
Grimdoomer discovered a savegame exploit in THPS4, shared it on Discord and was later included with the Rocky5 softmod installer.&lt;br /&gt;
[https://drive.google.com/file/d/0B9WVULxHOmNkQVBCMHMtVGhqVVU/view a video demonstrating the game trigger (custom skatepark)]&lt;br /&gt;
&lt;br /&gt;
''10-4-2017 it's just shell code I injected into the game save/ granted this save is slightly more complicated than the others and requires a small &amp;quot;loader&amp;quot; that is just a memcpy basically it's literally as simple as a buffer overflow...I just looked for null terminated strings and fuzzed them then when I got a crash I looked in teh xbe to figure out what was going on. yeah it's literally just a stack overflow'' - grimdoomer&lt;br /&gt;
&lt;br /&gt;
another website talking about his exploit.&lt;br /&gt;
[https://www.xbmc4xbox.org.uk/forum/viewtopic.php?t=7310 xbmc4xbox.org.uk]&lt;br /&gt;
&lt;br /&gt;
== Attack ideas ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Purpose || Author || Description || Status&lt;br /&gt;
|-&lt;br /&gt;
|Xbox DVD Movie Playback Kit Dongle ROM manipulation || Xbox-Linux wiki&lt;br /&gt;
|As the dashboard presumably downloads the code from the ROM into the memory of the Xbox, this could be a hardware hack requiring no hardware modifications. The XBE loader for the DVD image is different from the usual XBE loader. However, the XBE is still signed and checked for security.&lt;br /&gt;
| XBE loader seems to be secured, although no full analysis has been done.&lt;br /&gt;
|-&lt;br /&gt;
| Preserving memory across boot || JayFoxRox&lt;br /&gt;
| Confirm behaviour described in the coldboot paper (https://jhalderm.com/pub/papers/coldboot-cacm09.pdf). This can be used to transfer code / setups for other exploits across a boot (such as preparing memory for A20 attack).&lt;br /&gt;
| Success: We have marked memory and rebooted the Xbox (through SMC warm and cold, and manual reboot using power switch). At room temperature, and the Xbox pre-heated, hundreds of markers can still be found after 10 seconds. Within the first 5 seconds, no loss of data was measured at all (although not many bits have been marked to begin with). We have confirmed the memory persistence not only for the main RAM, but also MCPX APU DSP memory banks. Other memory or register banks were not tested yet.&lt;br /&gt;
|-&lt;br /&gt;
| Early boot control || JayFoxRox&lt;br /&gt;
| Xcodes allow writing PCI config space. This can be used to set PCI BARs to random page-aligned addresses. Some devices like the NV2A or MCPX APU contain large register banks which can be read and written like RAM. So effectively we can probably overlay the flash memory or MCPX ROM with a temporary PCI mapping. To fill the memory, the PCI device can be mapped to a lower region, and be filled through Xcode memory writes.&lt;br /&gt;
This can be used to take control over code contained in RAM (FBL / 2BL), flash or possibly even the MCPX ROM during boot. This attack could be used to avoid unmapping the MCPX ROM and is therefore quite powerful. However, it requires knowledge of the Xcodes.&lt;br /&gt;
| This has not been tested during real-mode or early boot yet, but is assumed to work. It was tested from protected mode by mapping USB1 over the Flash and MCPX ROM region (main RAM has not been tested yet). Mapping the overlay pages without caching resulted in crashes. However, the PD was not reviewed at the time and might have been broken (through unconventional use of MmMapIoSpace).&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Schedule a reset&lt;br /&gt;
* Keep reading MCPX ROM memory with CPU to persistent page&lt;br /&gt;
* If we are lucky, the CPU would now copies the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Failed: I've tried reading MCPX ROM memory for as long as possible using the CPU. I've tried resets using PM26 (assumed PWRBTN), SMC Soft (0x01) and SMC Hard (0x40).&lt;br /&gt;
Memory was read based on observing value changes (in PCI regions, signalling reset), and timing alone (X cycles after starting reset).&lt;br /&gt;
The MCPX ROM region access always crashed. Shadowing the MCPX ROM with a PCI device does not help: The CPU never observed the PCI devices being remapped / lost.&lt;br /&gt;
As MCPX and CPU are both reset by the SMC directly, this is not surprising.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Check if NV2A can access the mapped PCI device&lt;br /&gt;
* Configure NV2A to continously stream from MCPX ROM region to RAM - Reset system using SMC (idea: this resets the PCI device mappings in the MCPX and should re-enable the MCPX ROM)&lt;br /&gt;
* If we are lucky, the NV2A would now stream the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Concept only: No interest in experimenting with NV2A DMA.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain: On a warm boot, the x86 might do a bad boot (the following is a theory, someone please measure pins). Theroy: PWRGD is provided, but CPURST is still high from the previous run; CPURST might only go low once NV2A reboots:&lt;br /&gt;
* Map device in NV2A to MCPX ROM region (note: mapping MCPX device would not work, because that gets reset with PWRGD)&lt;br /&gt;
* Warm reset using SMC&lt;br /&gt;
* Code in NV2A device should now jump to lower memory and unmap the MCPX ROM region (by moving itself for example)&lt;br /&gt;
* Delay by X cycles [probably in the range from 1ns to idk.. 500ms] to avoid reading the MCPX ROM before MCPX reset&lt;br /&gt;
* Code in lower region should copy MCPX ROM region to persisting pages&lt;br /&gt;
| Concept only: Someone should measure the pins and possibly look into the memory signals. This is too time consuming for me.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Partial system reset using 0xCF9 I/O register&lt;br /&gt;
| Resetting through 0xCF9 lands us on a black screen and the LED flashes as if the DVD tray was being opened. It's currently assumed that 0xCF9 only resets peripherals and NV2A / CPU, but it does not seem to reset the MCPX itself (hence issues booting and PCI activity which causes LED to flash). This has not been tested yet. An idea to confirm this, might be to map a device at 0xFFFFFFF0 which places an x86 jump to a good memory page. If the MCPX really isn't reset, then the CPU would boot from the MMIO / known page.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain. The SMC takes a couple of milliseconds to reset the system. Parts of the peripherals might stay alive for long enough. So chances (extremly unlikely) are, the peripherals could be programmed to do DMA where the DMA is only executed after the reboot.&lt;br /&gt;
| Failed: An attempt was made to use the APU GP DSP DMA to continuously store x86 code where 2BL would unpack. The system was then reset using the SMC. It booted normally. It is assumed that the DMA is probably long dead by the time that the 2BL is being unpacked / ran.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Resetting from wrong address. The errata for the CPU states that a warm-reset might occur from the wrong address.&lt;br /&gt;
| Concept only: Needs more research&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to access MCPX ROM through peripherals in the southbridge. If the address logic is broken, parts like the OHCI, APU or AC97 might be able to access it still.&lt;br /&gt;
|&lt;br /&gt;
* AC97: Lots of crashes / hangs. Sometimes crackling noise. Sometimes does not crash. Also can access some non-existing memory regions without any crashes. Data read from invalid addresses seemed to be 300 Hz square wave. While crashing the hardware output will have exponential falloff (measured on PCM line-out).&lt;br /&gt;
* APU: Mapping GP DSP Scratch memory from 0x00000000 to 0x7FFFFFFF reveals mirrors of physical RAM. Setting the highest bit (addresses over 0x80000000) will result in a crash of the Xbox.&lt;br /&gt;
* OHCI: Untested&lt;br /&gt;
* Others: Untested&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || JayFoxRox&lt;br /&gt;
| INIT is free'd right before passing execution to the first XBE. Depending on what the XBE allocates, the INIT section might still be in memory when a dumper is run.&lt;br /&gt;
| Probably doesn't work. Would need the dumper to directly run after cold-boot. Softmods unfortunately reboot the Xbox and during this warm-boot the INIT section is (in at least most cases) lost.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || DaveX || An extension to JayFoxRox dumping idea. Instead of running a dumper-XBE through a softmod, the softmod itself could do the dumping. This means creation of a custom softmod, just for dumping. This depends on the used softmod entry-point (font-exploit (signed target xbe), audio-exploit, ..) to gain execution as early as possible. This strategy might be slightly risky as harddisk contents have to be modified for the temporary softmod.&lt;br /&gt;
| WIP as of 2018-09-12&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Homebrew entry point || rowspan=&amp;quot;13&amp;quot; | Community&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Some movie DVDs contain default XBEs signed to run on original Xbox from DVD-ROM. The XBE extracts the actual game XBE (which is signed to run from HDD) onto the cache drives. If we can find a vulnerability in one of them (loaded files), we could possibly take over the entire system and run a softmod from DVD+R. In order to make a bootable DVD+R, you must have a DVD burner that - either natively, or by custom firmware - can set booktype to DVD-ROM. From a small sample size, it appears that the drive must also be capable of setting the layertype on the disc to &amp;quot;read-only&amp;quot;, which is a very rarely used security feature apparently only present for Xbox, Xbox 360, and an Audi navigation system. Layertype is a rather unknown thing, and it appears DVD burners were accidentally set with this from factory, but regular burner drives could potentially have the layertype modified using custom firmware (as the Burnermax payload does for dual layer DVDs).&lt;br /&gt;
|-&lt;br /&gt;
|'''Hulk (Special Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 2519224892&lt;br /&gt;
&lt;br /&gt;
[[The Hulk]]&lt;br /&gt;
&lt;br /&gt;
This DVD is unique and contains a partial dashboard (5860 with 4831 libraries) with an xboxdash.xbe signed to run from DVD-ROM. The default.xbe calls this dashboard XBE with parameters to play a video on the disc. By swapping this XBE with the default.xbe, you can boot the dashboard to a blank sphere. By placing dashboard 4920's mainmenu5.xip in the xboxdash folder, you can restore the orb and menu options, but selecting an option will show a blank sphere after the zoom animation. All xips are loaded from DVD and are hash checked. Font/audio files are loaded from HDD and hash checked. Aside from xboxdash.xbe, default.xbe will load video_ts.ifo and an audio file from cdrom, so a vulnerability could be found in those.&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume One'''&lt;br /&gt;
&lt;br /&gt;
UPC 2454317005&lt;br /&gt;
&lt;br /&gt;
[[Republic Commando]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume Two'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543214137&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5039036023238&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy (Widescreen Edition with Bonus Disc)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543123415 or 5039036017374&lt;br /&gt;
&lt;br /&gt;
[[Star Wars Battlefront]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy DVD (Widescreen theatrical edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543559856&lt;br /&gt;
&lt;br /&gt;
[[Lego Star Wars 2]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Chronicles of Riddick (Widescreen Unrated Director's Cut)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5050582274639&lt;br /&gt;
&lt;br /&gt;
[[Chronicles of Riddick]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Doom (Unrated Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192031229&lt;br /&gt;
&lt;br /&gt;
[[Doom 3]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''King Arthur - The Director's Cut (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 786936265262&lt;br /&gt;
&lt;br /&gt;
[[King Arthur]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Robots (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543193845&lt;br /&gt;
&lt;br /&gt;
[[Robots]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Van Helsing (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192326622 or 25192586125&lt;br /&gt;
&lt;br /&gt;
[[Van Helsing]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Godfather'''&lt;br /&gt;
&lt;br /&gt;
UPC not 5014437812834 nor 14633165401 nor 014633165401&lt;br /&gt;
&lt;br /&gt;
SPPV and Atreyu187 claim this exists and contains an XBE capable of chainloading any signed game XBE. No evidence exists of this actually existing on the DVD or game bonus disc, but it is listed here for posterity.&lt;br /&gt;
&lt;br /&gt;
[[The Godfather: The Game]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* [https://events.ccc.de/congress/2005/fahrplan/attachments/591-paper_xbox.pdf 17 Mistakes Microsoft Made in the Xbox Security System]&lt;br /&gt;
* [http://toogam.bespin.org/xboxmod/site/xbehacks.htm A list of some exploit implementations]&lt;/div&gt;</summary>
		<author><name>Lowtolerance</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7350</id>
		<title>Exploits</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7350"/>
				<updated>2024-01-09T02:43:44Z</updated>
		
		<summary type="html">&lt;p&gt;Lowtolerance: Added a blurb about the MechAssault exploit.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MCPX ==&lt;br /&gt;
&lt;br /&gt;
=== LDT (Hypertransport) bus tap ===&lt;br /&gt;
&lt;br /&gt;
See [http://www.xenatera.com/bunnie/proj/anatak/xboxmod.html#ldt bunnie's adventures hacking the Xbox].&lt;br /&gt;
&lt;br /&gt;
=== Visor hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits incorrect rollover of memory address. Microsoft's strategy for halting the system in the event of a &amp;quot;panic&amp;quot; event during the boot process (i.e., the hash for decrypting 2bl is incorrect) was to put the code to hide the MCPX ROM at the very end of the ROM itself, which is mapped to the top of addressable memory, and rely on the CPU to halt when the instruction pointer rolls over from 0xFFFFFFFF to 0x00000000. Incredibly, Microsoft missed that this behavior was specific to AMD's x86-compatible CPUs, which were used during the development process. In fact, the Intel CPU that ended up in retail units will happily continue execution at 0x00000000. &lt;br /&gt;
&lt;br /&gt;
Visor's hack used Xcodes to write a jump into a location in flash memory at the very beginning of the address space and forced the MCPX ROM to panic by rewriting bytes at the end of 2bl. When the MCPX attempts to validate the 2bl, it will fail and attempt to &amp;quot;fall through&amp;quot; the memory space until the system halts, which never actually happens and the CPU will continue to execute the injected code that jumps into flash. &lt;br /&gt;
&lt;br /&gt;
=== MIST hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits error in xcode interpreter security check. MCPX 1.0 contains code intended to prevent an attacker from using Xcodes to turn off the Xcode interpreter, which is normally accomplished by setting a bit in memory used by the PCI bus to set device configuration, directing the mapping of memory to the top of memory from the MCPX's ROM to flash. The interpreter will reject Xcode that attempts to modify data at this address, but neglects to consider the behavior of the PCI controller, which only utilizes the lower 24 bits of a memory address. Consequently, it is still possible to toggle the necessary bit and turn off the MCPX's secret ROM by using a &amp;quot;fake&amp;quot; address -- the desired address with the upper bits modified so that the interpreter's check will not catch that we are hiding the secret ROM. &lt;br /&gt;
&lt;br /&gt;
A similar attack is possible by abusing the Xcode interpreter's ability to outputting the necessary code to hide the secret ROM to the appropriate I/O port, which the interpreter does not attempt to stop.&lt;br /&gt;
&lt;br /&gt;
=== A20M# hack ===&lt;br /&gt;
&lt;br /&gt;
[[File:Haxar-a20m.jpg|thumb|200px|A jumper wire hack to enable A20]]&lt;br /&gt;
&lt;br /&gt;
Uses a legacy x86 feature (beginning with 286 CPUs) that relied on a gate on address line 20 (A20) to determine whether the code execution should roll over to the lower 64kb or continue on into higher memory addresses. This feature still existed in the CPU used in the Xbox. By pulling down the A20 gate, an attacker can effectively modulate an address so that the system will point to a location in memory below the addressed location. For instance, with the A20 gate pulled down, the address 0xFFFFFFFF would be translated to 0xFFEFFFFF, which on the Xbox would continue code instruction at a location in flash.&lt;br /&gt;
&lt;br /&gt;
=== RC4 attack (MCPX 1.0 only) ===&lt;br /&gt;
&lt;br /&gt;
Microsoft uses the last bytes of the decrypted 2BL to check the integrity of the 2BL.&lt;br /&gt;
However, RC4 does not have any feedback which means changes in the 2BL will not reflect in the last couple of bytes which are checked.&lt;br /&gt;
As such, the 2BL can be freely modified, as long as the last couple of bytes still match what the MCPX ROM expects.&lt;br /&gt;
&lt;br /&gt;
This can be used to take over the 2BL entry point.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''This attack is described by Michael Steil in his Google talk, [Hacking the Xbox Security System][https://www.youtube.com/watch?v=9NqLljaHc80].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TEA attack (MCPX 1.1 only) ===&lt;br /&gt;
&lt;br /&gt;
TEA, which is only used in MCPX 1.1, can not be used as a hash in Davies-Meyer mode [http://www.tayloredge.com/reference/Mathematics/VRAndem.pdf][https://www.schneier.com/academic/paperfiles/paper-key-schedule.pdf]. And yet, Microsoft used it that way.&lt;br /&gt;
&lt;br /&gt;
The original attack uses the 5 bytes at 0xffffd400 (FBL entry point) which are &amp;lt;code&amp;gt;E9 83 01 00 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0xffffd588&amp;lt;/code&amp;gt; (which is a jump within the flash region).&lt;br /&gt;
&lt;br /&gt;
When flipping the highest bit of the operand DWORD (at 0xffffd400, mind your endianess) this will become: &amp;lt;code&amp;gt;E9 83 01 80 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0x7fd588&amp;lt;/code&amp;gt; (which is a jump into the RAM region).&lt;br /&gt;
For the attack to be successful, the highest bit in the DWORD at 0xffffd404 also has to be flipped.&lt;br /&gt;
&lt;br /&gt;
The RAM can be controlled using the x-code command to write to RAM.&lt;br /&gt;
So the idea is to copy a program from Flash to RAM using x-codes.&lt;br /&gt;
Then the FBL / 2BL is modified to jump into said RAM region by flipping a bit of a jump operand (as described above).&lt;br /&gt;
The 2 bit flips will not change the hash of FBL / 2BL as TEA is broken.&lt;br /&gt;
&lt;br /&gt;
As such, the FBL verification will succeed, the MCPX ROM will hand control to the FBL which will then jump into the attacker controlled RAM.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''The TEA algorithm and exploit are also described in more detail in Bunnie's book (Page 109 and Page 142).''&lt;br /&gt;
&lt;br /&gt;
== Dashboard ==&lt;br /&gt;
&lt;br /&gt;
=== Audio hacks ===&lt;br /&gt;
=== Font hacks ===&lt;br /&gt;
&lt;br /&gt;
[http://archiv.sega-dc.de/phoenix.maxconsole.net/docs/berternie.inc.htm Analysis of &amp;quot;Bert &amp;amp; Ernie&amp;quot; font-exploit].&lt;br /&gt;
&lt;br /&gt;
==== Easter-egg exploit ====&lt;br /&gt;
&lt;br /&gt;
== Savegames ==&lt;br /&gt;
Savedgames can be used as an exploit method, but care must be taken for most games are verifying digital signatures of savedgames {{citation needed}} [http://bunniefoo.com/nostarch/HackingTheXbox_Free.pdf]&lt;br /&gt;
=== [[007: Agent Under Fire]] ===&lt;br /&gt;
&lt;br /&gt;
[https://web.archive.org/web/20031003093240/http://xbox-linux.sourceforge.net:80/docs/007analysis.html Analysis of this savegame-exploit].&lt;br /&gt;
&lt;br /&gt;
=== [[Frogger Beyond]] ===&lt;br /&gt;
Not much is known why this game was in the list, [https://events.ccc.de/congress/2005/fahrplan/attachments/674-slides_xbox.pdf 22C3, page 85]&lt;br /&gt;
The game isnt shown in the final presentation at 22C3 (neither are Mechassault nor SplinterCell).&lt;br /&gt;
&lt;br /&gt;
In 2022, Artem Garmash published a blog post describing an approach to [exploiting Frogger Beyond][https://agarmash.com/posts/xbox-frogger-beyond-exploit/].&lt;br /&gt;
&lt;br /&gt;
=== [[MechAssault]] ===&lt;br /&gt;
&lt;br /&gt;
Exploit runs a modified version of Xbox Live Update to execute a paylaod.&lt;br /&gt;
&lt;br /&gt;
=== [[Tom Clancy's Splinter Cell]] ===&lt;br /&gt;
=== [[Tony Hawk's Pro Skater 4]] ===&lt;br /&gt;
Grimdoomer discovered a savegame exploit in THPS4, shared it on Discord and was later included with the Rocky5 softmod installer.&lt;br /&gt;
[https://drive.google.com/file/d/0B9WVULxHOmNkQVBCMHMtVGhqVVU/view a video demonstrating the game trigger (custom skatepark)]&lt;br /&gt;
&lt;br /&gt;
''10-4-2017 it's just shell code I injected into the game save/ granted this save is slightly more complicated than the others and requires a small &amp;quot;loader&amp;quot; that is just a memcpy basically it's literally as simple as a buffer overflow...I just looked for null terminated strings and fuzzed them then when I got a crash I looked in teh xbe to figure out what was going on. yeah it's literally just a stack overflow'' - grimdoomer&lt;br /&gt;
&lt;br /&gt;
another website talking about his exploit.&lt;br /&gt;
[https://www.xbmc4xbox.org.uk/forum/viewtopic.php?t=7310 xbmc4xbox.org.uk]&lt;br /&gt;
&lt;br /&gt;
== Attack ideas ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Purpose || Author || Description || Status&lt;br /&gt;
|-&lt;br /&gt;
|Xbox DVD Movie Playback Kit Dongle ROM manipulation || Xbox-Linux wiki&lt;br /&gt;
|As the dashboard presumably downloads the code from the ROM into the memory of the Xbox, this could be a hardware hack requiring no hardware modifications. The XBE loader for the DVD image is different from the usual XBE loader. However, the XBE is still signed and checked for security.&lt;br /&gt;
| XBE loader seems to be secured, although no full analysis has been done.&lt;br /&gt;
|-&lt;br /&gt;
| Preserving memory across boot || JayFoxRox&lt;br /&gt;
| Confirm behaviour described in the coldboot paper (https://jhalderm.com/pub/papers/coldboot-cacm09.pdf). This can be used to transfer code / setups for other exploits across a boot (such as preparing memory for A20 attack).&lt;br /&gt;
| Success: We have marked memory and rebooted the Xbox (through SMC warm and cold, and manual reboot using power switch). At room temperature, and the Xbox pre-heated, hundreds of markers can still be found after 10 seconds. Within the first 5 seconds, no loss of data was measured at all (although not many bits have been marked to begin with). We have confirmed the memory persistence not only for the main RAM, but also MCPX APU DSP memory banks. Other memory or register banks were not tested yet.&lt;br /&gt;
|-&lt;br /&gt;
| Early boot control || JayFoxRox&lt;br /&gt;
| Xcodes allow writing PCI config space. This can be used to set PCI BARs to random page-aligned addresses. Some devices like the NV2A or MCPX APU contain large register banks which can be read and written like RAM. So effectively we can probably overlay the flash memory or MCPX ROM with a temporary PCI mapping. To fill the memory, the PCI device can be mapped to a lower region, and be filled through Xcode memory writes.&lt;br /&gt;
This can be used to take control over code contained in RAM (FBL / 2BL), flash or possibly even the MCPX ROM during boot. This attack could be used to avoid unmapping the MCPX ROM and is therefore quite powerful. However, it requires knowledge of the Xcodes.&lt;br /&gt;
| This has not been tested during real-mode or early boot yet, but is assumed to work. It was tested from protected mode by mapping USB1 over the Flash and MCPX ROM region (main RAM has not been tested yet). Mapping the overlay pages without caching resulted in crashes. However, the PD was not reviewed at the time and might have been broken (through unconventional use of MmMapIoSpace).&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Schedule a reset&lt;br /&gt;
* Keep reading MCPX ROM memory with CPU to persistent page&lt;br /&gt;
* If we are lucky, the CPU would now copies the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Failed: I've tried reading MCPX ROM memory for as long as possible using the CPU. I've tried resets using PM26 (assumed PWRBTN), SMC Soft (0x01) and SMC Hard (0x40).&lt;br /&gt;
Memory was read based on observing value changes (in PCI regions, signalling reset), and timing alone (X cycles after starting reset).&lt;br /&gt;
The MCPX ROM region access always crashed. Shadowing the MCPX ROM with a PCI device does not help: The CPU never observed the PCI devices being remapped / lost.&lt;br /&gt;
As MCPX and CPU are both reset by the SMC directly, this is not surprising.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Check if NV2A can access the mapped PCI device&lt;br /&gt;
* Configure NV2A to continously stream from MCPX ROM region to RAM - Reset system using SMC (idea: this resets the PCI device mappings in the MCPX and should re-enable the MCPX ROM)&lt;br /&gt;
* If we are lucky, the NV2A would now stream the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Concept only: No interest in experimenting with NV2A DMA.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain: On a warm boot, the x86 might do a bad boot (the following is a theory, someone please measure pins). Theroy: PWRGD is provided, but CPURST is still high from the previous run; CPURST might only go low once NV2A reboots:&lt;br /&gt;
* Map device in NV2A to MCPX ROM region (note: mapping MCPX device would not work, because that gets reset with PWRGD)&lt;br /&gt;
* Warm reset using SMC&lt;br /&gt;
* Code in NV2A device should now jump to lower memory and unmap the MCPX ROM region (by moving itself for example)&lt;br /&gt;
* Delay by X cycles [probably in the range from 1ns to idk.. 500ms] to avoid reading the MCPX ROM before MCPX reset&lt;br /&gt;
* Code in lower region should copy MCPX ROM region to persisting pages&lt;br /&gt;
| Concept only: Someone should measure the pins and possibly look into the memory signals. This is too time consuming for me.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Partial system reset using 0xCF9 I/O register&lt;br /&gt;
| Resetting through 0xCF9 lands us on a black screen and the LED flashes as if the DVD tray was being opened. It's currently assumed that 0xCF9 only resets peripherals and NV2A / CPU, but it does not seem to reset the MCPX itself (hence issues booting and PCI activity which causes LED to flash). This has not been tested yet. An idea to confirm this, might be to map a device at 0xFFFFFFF0 which places an x86 jump to a good memory page. If the MCPX really isn't reset, then the CPU would boot from the MMIO / known page.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain. The SMC takes a couple of milliseconds to reset the system. Parts of the peripherals might stay alive for long enough. So chances (extremly unlikely) are, the peripherals could be programmed to do DMA where the DMA is only executed after the reboot.&lt;br /&gt;
| Failed: An attempt was made to use the APU GP DSP DMA to continuously store x86 code where 2BL would unpack. The system was then reset using the SMC. It booted normally. It is assumed that the DMA is probably long dead by the time that the 2BL is being unpacked / ran.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Resetting from wrong address. The errata for the CPU states that a warm-reset might occur from the wrong address.&lt;br /&gt;
| Concept only: Needs more research&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to access MCPX ROM through peripherals in the southbridge. If the address logic is broken, parts like the OHCI, APU or AC97 might be able to access it still.&lt;br /&gt;
|&lt;br /&gt;
* AC97: Lots of crashes / hangs. Sometimes crackling noise. Sometimes does not crash. Also can access some non-existing memory regions without any crashes. Data read from invalid addresses seemed to be 300 Hz square wave. While crashing the hardware output will have exponential falloff (measured on PCM line-out).&lt;br /&gt;
* APU: Mapping GP DSP Scratch memory from 0x00000000 to 0x7FFFFFFF reveals mirrors of physical RAM. Setting the highest bit (addresses over 0x80000000) will result in a crash of the Xbox.&lt;br /&gt;
* OHCI: Untested&lt;br /&gt;
* Others: Untested&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || JayFoxRox&lt;br /&gt;
| INIT is free'd right before passing execution to the first XBE. Depending on what the XBE allocates, the INIT section might still be in memory when a dumper is run.&lt;br /&gt;
| Probably doesn't work. Would need the dumper to directly run after cold-boot. Softmods unfortunately reboot the Xbox and during this warm-boot the INIT section is (in at least most cases) lost.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || DaveX || An extension to JayFoxRox dumping idea. Instead of running a dumper-XBE through a softmod, the softmod itself could do the dumping. This means creation of a custom softmod, just for dumping. This depends on the used softmod entry-point (font-exploit (signed target xbe), audio-exploit, ..) to gain execution as early as possible. This strategy might be slightly risky as harddisk contents have to be modified for the temporary softmod.&lt;br /&gt;
| WIP as of 2018-09-12&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Homebrew entry point || rowspan=&amp;quot;13&amp;quot; | Community&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Some movie DVDs contain default XBEs signed to run on original Xbox from DVD-ROM. The XBE extracts the actual game XBE (which is signed to run from HDD) onto the cache drives. If we can find a vulnerability in one of them (loaded files), we could possibly take over the entire system and run a softmod from DVD+R. In order to make a bootable DVD+R, you must have a DVD burner that - either natively, or by custom firmware - can set booktype to DVD-ROM. From a small sample size, it appears that the drive must also be capable of setting the layertype on the disc to &amp;quot;read-only&amp;quot;, which is a very rarely used security feature apparently only present for Xbox, Xbox 360, and an Audi navigation system. Layertype is a rather unknown thing, and it appears DVD burners were accidentally set with this from factory, but regular burner drives could potentially have the layertype modified using custom firmware (as the Burnermax payload does for dual layer DVDs).&lt;br /&gt;
|-&lt;br /&gt;
|'''Hulk (Special Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 2519224892&lt;br /&gt;
&lt;br /&gt;
[[The Hulk]]&lt;br /&gt;
&lt;br /&gt;
This DVD is unique and contains a partial dashboard (5860 with 4831 libraries) with an xboxdash.xbe signed to run from DVD-ROM. The default.xbe calls this dashboard XBE with parameters to play a video on the disc. By swapping this XBE with the default.xbe, you can boot the dashboard to a blank sphere. By placing dashboard 4920's mainmenu5.xip in the xboxdash folder, you can restore the orb and menu options, but selecting an option will show a blank sphere after the zoom animation. All xips are loaded from DVD and are hash checked. Font/audio files are loaded from HDD and hash checked. Aside from xboxdash.xbe, default.xbe will load video_ts.ifo and an audio file from cdrom, so a vulnerability could be found in those.&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume One'''&lt;br /&gt;
&lt;br /&gt;
UPC 2454317005&lt;br /&gt;
&lt;br /&gt;
[[Republic Commando]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume Two'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543214137&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5039036023238&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy (Widescreen Edition with Bonus Disc)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543123415 or 5039036017374&lt;br /&gt;
&lt;br /&gt;
[[Star Wars Battlefront]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy DVD (Widescreen theatrical edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543559856&lt;br /&gt;
&lt;br /&gt;
[[Lego Star Wars 2]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Chronicles of Riddick (Widescreen Unrated Director's Cut)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5050582274639&lt;br /&gt;
&lt;br /&gt;
[[Chronicles of Riddick]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Doom (Unrated Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192031229&lt;br /&gt;
&lt;br /&gt;
[[Doom 3]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''King Arthur - The Director's Cut (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 786936265262&lt;br /&gt;
&lt;br /&gt;
[[King Arthur]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Robots (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543193845&lt;br /&gt;
&lt;br /&gt;
[[Robots]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Van Helsing (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192326622 or 25192586125&lt;br /&gt;
&lt;br /&gt;
[[Van Helsing]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Godfather'''&lt;br /&gt;
&lt;br /&gt;
UPC not 5014437812834 nor 14633165401 nor 014633165401&lt;br /&gt;
&lt;br /&gt;
SPPV and Atreyu187 claim this exists and contains an XBE capable of chainloading any signed game XBE. No evidence exists of this actually existing on the DVD or game bonus disc, but it is listed here for posterity.&lt;br /&gt;
&lt;br /&gt;
[[The Godfather: The Game]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* [https://events.ccc.de/congress/2005/fahrplan/attachments/591-paper_xbox.pdf 17 Mistakes Microsoft Made in the Xbox Security System]&lt;br /&gt;
* [http://toogam.bespin.org/xboxmod/site/xbehacks.htm A list of some exploit implementations]&lt;/div&gt;</summary>
		<author><name>Lowtolerance</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7349</id>
		<title>Exploits</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Exploits&amp;diff=7349"/>
				<updated>2024-01-09T02:33:13Z</updated>
		
		<summary type="html">&lt;p&gt;Lowtolerance: Fleshed out Visor Hack, MIST hack and A20M# hacks with information gleaned from 17 Mistakes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MCPX ==&lt;br /&gt;
&lt;br /&gt;
=== LDT (Hypertransport) bus tap ===&lt;br /&gt;
&lt;br /&gt;
See [http://www.xenatera.com/bunnie/proj/anatak/xboxmod.html#ldt bunnie's adventures hacking the Xbox].&lt;br /&gt;
&lt;br /&gt;
=== Visor hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits incorrect rollover of memory address. Microsoft's strategy for halting the system in the event of a &amp;quot;panic&amp;quot; event during the boot process (i.e., the hash for decrypting 2bl is incorrect) was to put the code to hide the MCPX ROM at the very end of the ROM itself, which is mapped to the top of addressable memory, and rely on the CPU to halt when the instruction pointer rolls over from 0xFFFFFFFF to 0x00000000. Incredibly, Microsoft missed that this behavior was specific to AMD's x86-compatible CPUs, which were used during the development process. In fact, the Intel CPU that ended up in retail units will happily continue execution at 0x00000000. &lt;br /&gt;
&lt;br /&gt;
Visor's hack used Xcodes to write a jump into a location in flash memory at the very beginning of the address space and forced the MCPX ROM to panic by rewriting bytes at the end of 2bl. When the MCPX attempts to validate the 2bl, it will fail and attempt to &amp;quot;fall through&amp;quot; the memory space until the system halts, which never actually happens and the CPU will continue to execute the injected code that jumps into flash. &lt;br /&gt;
&lt;br /&gt;
=== MIST hack ===&lt;br /&gt;
&lt;br /&gt;
Exploits error in xcode interpreter security check. MCPX 1.0 contains code intended to prevent an attacker from using Xcodes to turn off the Xcode interpreter, which is normally accomplished by setting a bit in memory used by the PCI bus to set device configuration, directing the mapping of memory to the top of memory from the MCPX's ROM to flash. The interpreter will reject Xcode that attempts to modify data at this address, but neglects to consider the behavior of the PCI controller, which only utilizes the lower 24 bits of a memory address. Consequently, it is still possible to toggle the necessary bit and turn off the MCPX's secret ROM by using a &amp;quot;fake&amp;quot; address -- the desired address with the upper bits modified so that the interpreter's check will not catch that we are hiding the secret ROM. &lt;br /&gt;
&lt;br /&gt;
A similar attack is possible by abusing the Xcode interpreter's ability to outputting the necessary code to hide the secret ROM to the appropriate I/O port, which the interpreter does not attempt to stop.&lt;br /&gt;
&lt;br /&gt;
=== A20M# hack ===&lt;br /&gt;
&lt;br /&gt;
[[File:Haxar-a20m.jpg|thumb|200px|A jumper wire hack to enable A20]]&lt;br /&gt;
&lt;br /&gt;
Uses a legacy x86 feature (beginning with 286 CPUs) that relied on a gate on address line 20 (A20) to determine whether the code execution should roll over to the lower 64kb or continue on into higher memory addresses. This feature still existed in the CPU used in the Xbox. By pulling down the A20 gate, an attacker can effectively modulate an address so that the system will point to a location in memory below the addressed location. For instance, with the A20 gate pulled down, the address 0xFFFFFFFF would be translated to 0xFFEFFFFF, which on the Xbox would continue code instruction at a location in flash.&lt;br /&gt;
&lt;br /&gt;
=== RC4 attack (MCPX 1.0 only) ===&lt;br /&gt;
&lt;br /&gt;
Microsoft uses the last bytes of the decrypted 2BL to check the integrity of the 2BL.&lt;br /&gt;
However, RC4 does not have any feedback which means changes in the 2BL will not reflect in the last couple of bytes which are checked.&lt;br /&gt;
As such, the 2BL can be freely modified, as long as the last couple of bytes still match what the MCPX ROM expects.&lt;br /&gt;
&lt;br /&gt;
This can be used to take over the 2BL entry point.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''This attack is described by Michael Steil in his Google talk, [Hacking the Xbox Security System][https://www.youtube.com/watch?v=9NqLljaHc80].''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TEA attack (MCPX 1.1 only) ===&lt;br /&gt;
&lt;br /&gt;
TEA, which is only used in MCPX 1.1, can not be used as a hash in Davies-Meyer mode [http://www.tayloredge.com/reference/Mathematics/VRAndem.pdf][https://www.schneier.com/academic/paperfiles/paper-key-schedule.pdf]. And yet, Microsoft used it that way.&lt;br /&gt;
&lt;br /&gt;
The original attack uses the 5 bytes at 0xffffd400 (FBL entry point) which are &amp;lt;code&amp;gt;E9 83 01 00 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0xffffd588&amp;lt;/code&amp;gt; (which is a jump within the flash region).&lt;br /&gt;
&lt;br /&gt;
When flipping the highest bit of the operand DWORD (at 0xffffd400, mind your endianess) this will become: &amp;lt;code&amp;gt;E9 83 01 80 00&amp;lt;/code&amp;gt;.&lt;br /&gt;
This is &amp;lt;code&amp;gt;jmp 0x7fd588&amp;lt;/code&amp;gt; (which is a jump into the RAM region).&lt;br /&gt;
For the attack to be successful, the highest bit in the DWORD at 0xffffd404 also has to be flipped.&lt;br /&gt;
&lt;br /&gt;
The RAM can be controlled using the x-code command to write to RAM.&lt;br /&gt;
So the idea is to copy a program from Flash to RAM using x-codes.&lt;br /&gt;
Then the FBL / 2BL is modified to jump into said RAM region by flipping a bit of a jump operand (as described above).&lt;br /&gt;
The 2 bit flips will not change the hash of FBL / 2BL as TEA is broken.&lt;br /&gt;
&lt;br /&gt;
As such, the FBL verification will succeed, the MCPX ROM will hand control to the FBL which will then jump into the attacker controlled RAM.&lt;br /&gt;
&lt;br /&gt;
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.&lt;br /&gt;
&lt;br /&gt;
''The TEA algorithm and exploit are also described in more detail in Bunnie's book (Page 109 and Page 142).''&lt;br /&gt;
&lt;br /&gt;
== Dashboard ==&lt;br /&gt;
&lt;br /&gt;
=== Audio hacks ===&lt;br /&gt;
=== Font hacks ===&lt;br /&gt;
&lt;br /&gt;
[http://archiv.sega-dc.de/phoenix.maxconsole.net/docs/berternie.inc.htm Analysis of &amp;quot;Bert &amp;amp; Ernie&amp;quot; font-exploit].&lt;br /&gt;
&lt;br /&gt;
==== Easter-egg exploit ====&lt;br /&gt;
&lt;br /&gt;
== Savegames ==&lt;br /&gt;
Savedgames can be used as an exploit method, but care must be taken for most games are verifying digital signatures of savedgames {{citation needed}} [http://bunniefoo.com/nostarch/HackingTheXbox_Free.pdf]&lt;br /&gt;
=== [[007: Agent Under Fire]] ===&lt;br /&gt;
&lt;br /&gt;
[https://web.archive.org/web/20031003093240/http://xbox-linux.sourceforge.net:80/docs/007analysis.html Analysis of this savegame-exploit].&lt;br /&gt;
&lt;br /&gt;
=== [[Frogger Beyond]] ===&lt;br /&gt;
Not much is known why this game was in the list, [https://events.ccc.de/congress/2005/fahrplan/attachments/674-slides_xbox.pdf 22C3, page 85]&lt;br /&gt;
The game isnt shown in the final presentation at 22C3 (neither are Mechassault nor SplinterCell).&lt;br /&gt;
&lt;br /&gt;
=== [[MechAssault]] ===&lt;br /&gt;
=== [[Tom Clancy's Splinter Cell]] ===&lt;br /&gt;
=== [[Tony Hawk's Pro Skater 4]] ===&lt;br /&gt;
Grimdoomer discovered a savegame exploit in THPS4, shared it on Discord and was later included with the Rocky5 softmod installer.&lt;br /&gt;
[https://drive.google.com/file/d/0B9WVULxHOmNkQVBCMHMtVGhqVVU/view a video demonstrating the game trigger (custom skatepark)]&lt;br /&gt;
&lt;br /&gt;
''10-4-2017 it's just shell code I injected into the game save/ granted this save is slightly more complicated than the others and requires a small &amp;quot;loader&amp;quot; that is just a memcpy basically it's literally as simple as a buffer overflow...I just looked for null terminated strings and fuzzed them then when I got a crash I looked in teh xbe to figure out what was going on. yeah it's literally just a stack overflow'' - grimdoomer&lt;br /&gt;
&lt;br /&gt;
another website talking about his exploit.&lt;br /&gt;
[https://www.xbmc4xbox.org.uk/forum/viewtopic.php?t=7310 xbmc4xbox.org.uk]&lt;br /&gt;
&lt;br /&gt;
== Attack ideas ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Purpose || Author || Description || Status&lt;br /&gt;
|-&lt;br /&gt;
|Xbox DVD Movie Playback Kit Dongle ROM manipulation || Xbox-Linux wiki&lt;br /&gt;
|As the dashboard presumably downloads the code from the ROM into the memory of the Xbox, this could be a hardware hack requiring no hardware modifications. The XBE loader for the DVD image is different from the usual XBE loader. However, the XBE is still signed and checked for security.&lt;br /&gt;
| XBE loader seems to be secured, although no full analysis has been done.&lt;br /&gt;
|-&lt;br /&gt;
| Preserving memory across boot || JayFoxRox&lt;br /&gt;
| Confirm behaviour described in the coldboot paper (https://jhalderm.com/pub/papers/coldboot-cacm09.pdf). This can be used to transfer code / setups for other exploits across a boot (such as preparing memory for A20 attack).&lt;br /&gt;
| Success: We have marked memory and rebooted the Xbox (through SMC warm and cold, and manual reboot using power switch). At room temperature, and the Xbox pre-heated, hundreds of markers can still be found after 10 seconds. Within the first 5 seconds, no loss of data was measured at all (although not many bits have been marked to begin with). We have confirmed the memory persistence not only for the main RAM, but also MCPX APU DSP memory banks. Other memory or register banks were not tested yet.&lt;br /&gt;
|-&lt;br /&gt;
| Early boot control || JayFoxRox&lt;br /&gt;
| Xcodes allow writing PCI config space. This can be used to set PCI BARs to random page-aligned addresses. Some devices like the NV2A or MCPX APU contain large register banks which can be read and written like RAM. So effectively we can probably overlay the flash memory or MCPX ROM with a temporary PCI mapping. To fill the memory, the PCI device can be mapped to a lower region, and be filled through Xcode memory writes.&lt;br /&gt;
This can be used to take control over code contained in RAM (FBL / 2BL), flash or possibly even the MCPX ROM during boot. This attack could be used to avoid unmapping the MCPX ROM and is therefore quite powerful. However, it requires knowledge of the Xcodes.&lt;br /&gt;
| This has not been tested during real-mode or early boot yet, but is assumed to work. It was tested from protected mode by mapping USB1 over the Flash and MCPX ROM region (main RAM has not been tested yet). Mapping the overlay pages without caching resulted in crashes. However, the PD was not reviewed at the time and might have been broken (through unconventional use of MmMapIoSpace).&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Schedule a reset&lt;br /&gt;
* Keep reading MCPX ROM memory with CPU to persistent page&lt;br /&gt;
* If we are lucky, the CPU would now copies the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Failed: I've tried reading MCPX ROM memory for as long as possible using the CPU. I've tried resets using PM26 (assumed PWRBTN), SMC Soft (0x01) and SMC Hard (0x40).&lt;br /&gt;
Memory was read based on observing value changes (in PCI regions, signalling reset), and timing alone (X cycles after starting reset).&lt;br /&gt;
The MCPX ROM region access always crashed. Shadowing the MCPX ROM with a PCI device does not help: The CPU never observed the PCI devices being remapped / lost.&lt;br /&gt;
As MCPX and CPU are both reset by the SMC directly, this is not surprising.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain:&lt;br /&gt;
* Map PCI devices over the MCPX ROM region&lt;br /&gt;
* Check if NV2A can access the mapped PCI device&lt;br /&gt;
* Configure NV2A to continously stream from MCPX ROM region to RAM - Reset system using SMC (idea: this resets the PCI device mappings in the MCPX and should re-enable the MCPX ROM)&lt;br /&gt;
* If we are lucky, the NV2A would now stream the MCPX ROM to RAM in it's last cycles with a broken LDT (this depends on how LDTs work and if they can recover)&lt;br /&gt;
| Concept only: No interest in experimenting with NV2A DMA.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain: On a warm boot, the x86 might do a bad boot (the following is a theory, someone please measure pins). Theroy: PWRGD is provided, but CPURST is still high from the previous run; CPURST might only go low once NV2A reboots:&lt;br /&gt;
* Map device in NV2A to MCPX ROM region (note: mapping MCPX device would not work, because that gets reset with PWRGD)&lt;br /&gt;
* Warm reset using SMC&lt;br /&gt;
* Code in NV2A device should now jump to lower memory and unmap the MCPX ROM region (by moving itself for example)&lt;br /&gt;
* Delay by X cycles [probably in the range from 1ns to idk.. 500ms] to avoid reading the MCPX ROM before MCPX reset&lt;br /&gt;
* Code in lower region should copy MCPX ROM region to persisting pages&lt;br /&gt;
| Concept only: Someone should measure the pins and possibly look into the memory signals. This is too time consuming for me.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Partial system reset using 0xCF9 I/O register&lt;br /&gt;
| Resetting through 0xCF9 lands us on a black screen and the LED flashes as if the DVD tray was being opened. It's currently assumed that 0xCF9 only resets peripherals and NV2A / CPU, but it does not seem to reset the MCPX itself (hence issues booting and PCI activity which causes LED to flash). This has not been tested yet. An idea to confirm this, might be to map a device at 0xFFFFFFF0 which places an x86 jump to a good memory page. If the MCPX really isn't reset, then the CPU would boot from the MMIO / known page.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to find problems with the SMC reset chain. The SMC takes a couple of milliseconds to reset the system. Parts of the peripherals might stay alive for long enough. So chances (extremly unlikely) are, the peripherals could be programmed to do DMA where the DMA is only executed after the reboot.&lt;br /&gt;
| Failed: An attempt was made to use the APU GP DSP DMA to continuously store x86 code where 2BL would unpack. The system was then reset using the SMC. It booted normally. It is assumed that the DMA is probably long dead by the time that the 2BL is being unpacked / ran.&lt;br /&gt;
|-&lt;br /&gt;
| Unknown || JayFoxRox&lt;br /&gt;
| Resetting from wrong address. The errata for the CPU states that a warm-reset might occur from the wrong address.&lt;br /&gt;
| Concept only: Needs more research&lt;br /&gt;
|-&lt;br /&gt;
| Dumping the MCPX ROM || JayFoxRox&lt;br /&gt;
| Trying to access MCPX ROM through peripherals in the southbridge. If the address logic is broken, parts like the OHCI, APU or AC97 might be able to access it still.&lt;br /&gt;
|&lt;br /&gt;
* AC97: Lots of crashes / hangs. Sometimes crackling noise. Sometimes does not crash. Also can access some non-existing memory regions without any crashes. Data read from invalid addresses seemed to be 300 Hz square wave. While crashing the hardware output will have exponential falloff (measured on PCM line-out).&lt;br /&gt;
* APU: Mapping GP DSP Scratch memory from 0x00000000 to 0x7FFFFFFF reveals mirrors of physical RAM. Setting the highest bit (addresses over 0x80000000) will result in a crash of the Xbox.&lt;br /&gt;
* OHCI: Untested&lt;br /&gt;
* Others: Untested&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || JayFoxRox&lt;br /&gt;
| INIT is free'd right before passing execution to the first XBE. Depending on what the XBE allocates, the INIT section might still be in memory when a dumper is run.&lt;br /&gt;
| Probably doesn't work. Would need the dumper to directly run after cold-boot. Softmods unfortunately reboot the Xbox and during this warm-boot the INIT section is (in at least most cases) lost.&lt;br /&gt;
|-&lt;br /&gt;
| Dumping Kernel INIT || DaveX || An extension to JayFoxRox dumping idea. Instead of running a dumper-XBE through a softmod, the softmod itself could do the dumping. This means creation of a custom softmod, just for dumping. This depends on the used softmod entry-point (font-exploit (signed target xbe), audio-exploit, ..) to gain execution as early as possible. This strategy might be slightly risky as harddisk contents have to be modified for the temporary softmod.&lt;br /&gt;
| WIP as of 2018-09-12&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Homebrew entry point || rowspan=&amp;quot;13&amp;quot; | Community&lt;br /&gt;
| rowspan=&amp;quot;13&amp;quot; | Some movie DVDs contain default XBEs signed to run on original Xbox from DVD-ROM. The XBE extracts the actual game XBE (which is signed to run from HDD) onto the cache drives. If we can find a vulnerability in one of them (loaded files), we could possibly take over the entire system and run a softmod from DVD+R. In order to make a bootable DVD+R, you must have a DVD burner that - either natively, or by custom firmware - can set booktype to DVD-ROM. From a small sample size, it appears that the drive must also be capable of setting the layertype on the disc to &amp;quot;read-only&amp;quot;, which is a very rarely used security feature apparently only present for Xbox, Xbox 360, and an Audi navigation system. Layertype is a rather unknown thing, and it appears DVD burners were accidentally set with this from factory, but regular burner drives could potentially have the layertype modified using custom firmware (as the Burnermax payload does for dual layer DVDs).&lt;br /&gt;
|-&lt;br /&gt;
|'''Hulk (Special Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 2519224892&lt;br /&gt;
&lt;br /&gt;
[[The Hulk]]&lt;br /&gt;
&lt;br /&gt;
This DVD is unique and contains a partial dashboard (5860 with 4831 libraries) with an xboxdash.xbe signed to run from DVD-ROM. The default.xbe calls this dashboard XBE with parameters to play a video on the disc. By swapping this XBE with the default.xbe, you can boot the dashboard to a blank sphere. By placing dashboard 4920's mainmenu5.xip in the xboxdash folder, you can restore the orb and menu options, but selecting an option will show a blank sphere after the zoom animation. All xips are loaded from DVD and are hash checked. Font/audio files are loaded from HDD and hash checked. Aside from xboxdash.xbe, default.xbe will load video_ts.ifo and an audio file from cdrom, so a vulnerability could be found in those.&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume One'''&lt;br /&gt;
&lt;br /&gt;
UPC 2454317005&lt;br /&gt;
&lt;br /&gt;
[[Republic Commando]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Clone Wars - Volume Two'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543214137&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5039036023238&lt;br /&gt;
&lt;br /&gt;
[[Battlefront II]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy (Widescreen Edition with Bonus Disc)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543123415 or 5039036017374&lt;br /&gt;
&lt;br /&gt;
[[Star Wars Battlefront]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Star Wars Trilogy DVD (Widescreen theatrical edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543559856&lt;br /&gt;
&lt;br /&gt;
[[Lego Star Wars 2]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Chronicles of Riddick (Widescreen Unrated Director's Cut)'''&lt;br /&gt;
&lt;br /&gt;
UPC 5050582274639&lt;br /&gt;
&lt;br /&gt;
[[Chronicles of Riddick]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Doom (Unrated Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192031229&lt;br /&gt;
&lt;br /&gt;
[[Doom 3]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''King Arthur - The Director's Cut (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 786936265262&lt;br /&gt;
&lt;br /&gt;
[[King Arthur]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Robots (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 24543193845&lt;br /&gt;
&lt;br /&gt;
[[Robots]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''Van Helsing (Widescreen Edition)'''&lt;br /&gt;
&lt;br /&gt;
UPC 25192326622 or 25192586125&lt;br /&gt;
&lt;br /&gt;
[[Van Helsing]]&lt;br /&gt;
&lt;br /&gt;
Untested&lt;br /&gt;
|-&lt;br /&gt;
|'''The Godfather'''&lt;br /&gt;
&lt;br /&gt;
UPC not 5014437812834 nor 14633165401 nor 014633165401&lt;br /&gt;
&lt;br /&gt;
SPPV and Atreyu187 claim this exists and contains an XBE capable of chainloading any signed game XBE. No evidence exists of this actually existing on the DVD or game bonus disc, but it is listed here for posterity.&lt;br /&gt;
&lt;br /&gt;
[[The Godfather: The Game]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* [https://events.ccc.de/congress/2005/fahrplan/attachments/591-paper_xbox.pdf 17 Mistakes Microsoft Made in the Xbox Security System]&lt;br /&gt;
* [http://toogam.bespin.org/xboxmod/site/xbehacks.htm A list of some exploit implementations]&lt;/div&gt;</summary>
		<author><name>Lowtolerance</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Boot_Process&amp;diff=7348</id>
		<title>Boot Process</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Boot_Process&amp;diff=7348"/>
				<updated>2024-01-07T00:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;Lowtolerance: /* References */  -- links now point to appropriate articles through wayback machine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the boot sequence of the Xbox.&lt;br /&gt;
A large portion of it is patended in [https://docs.google.com/viewer?url=patentimages.storage.googleapis.com/pdfs/US6907522.pdf Patent &amp;quot;US 6,907,522 B2&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The Xbox has a 256 kiB ROM containing the startup animation and sound, as well as the Xbox kernel, which contains a stripped down version of the Windows 2000 (NT 5.0) microkernel, the HAL, filesystems, as well as HDD and DVD drivers.&lt;br /&gt;
&lt;br /&gt;
When the Xbox is turned on, the software in ROM is decompressed into RAM, and the kernel initializes the hardware. Because there are no audio or video drivers in the kernel, the startup code plays the animation and sound by accessing the registers of the hardware directly. As soon as the Xbox logo is on the display, the kernel unlocks the hard disk and checks whether there is a valid game medium in the DVD drive. If not, the file xboxdash.xbe gets loaded from partition #3 (Typically the [[Dashboard]]). In either case, the Microsoft logo is shown below the Xbox logo and the executable is started. If an error occurs (no/wrong hard disk, wrong signature, ...), the boot loader shows a [[Fatal Error]] screen and halts.&lt;br /&gt;
&lt;br /&gt;
=== Chain of trust ===&lt;br /&gt;
&lt;br /&gt;
The Xbox uses a chain of trust during the boot process:&lt;br /&gt;
&lt;br /&gt;
'''MCPX X2'''&lt;br /&gt;
&lt;br /&gt;
There's no chain of trust.&lt;br /&gt;
&lt;br /&gt;
It behaves similar to the MCPX X3 1.0 boot, just that the MCPX ROM is not available, so the code is loaded from untrusted flash.&lt;br /&gt;
&lt;br /&gt;
There are also different X-Code opcodes and keys.&lt;br /&gt;
&lt;br /&gt;
'''MCPX X3 1.0'''&lt;br /&gt;
&lt;br /&gt;
* MCPX ROM:&lt;br /&gt;
** Runs untrusted from flash X-Codes in a limited virtual-machine.&lt;br /&gt;
** Contains key + decrypts the 2BL using RC4.&lt;br /&gt;
** In success case: Go to 2BL.&lt;br /&gt;
** In error case: Hides ROM and intends to triple-fault.&lt;br /&gt;
* 2BL:&lt;br /&gt;
** The MCPX ROM is hidden.&lt;br /&gt;
** The 2BL decryption key is (overwritten with 0x00-Bytes){{FIXME|reason=Does this actually happen?}}.&lt;br /&gt;
** Contains keys for kernel decryption and execution; decrypts kernel using RC4 and extracts using LZX.{{FIXME|reason=I believe kernel is also hashed}}&lt;br /&gt;
* Kernel:&lt;br /&gt;
** The kernel decryption key is overwritten with 0x00-Bytes.&lt;br /&gt;
** The 2BL is overwritten with 0xCC-Bytes.&lt;br /&gt;
** Once the kernel is initialized, the INIT section is discarded.&lt;br /&gt;
** The kernel only runs signed [[XBE]] files from allowed media.&lt;br /&gt;
&lt;br /&gt;
'''MCPX X3 1.1'''&lt;br /&gt;
&lt;br /&gt;
* MCPX ROM:&lt;br /&gt;
** Runs untrusted from flash X-Codes in a limited virtual-machine.&lt;br /&gt;
** Hashes the unencrypted FBL using TEA encryption.&lt;br /&gt;
** In success case: Go to FBL.&lt;br /&gt;
** In error case: Hides ROM and intends to triple-fault.&lt;br /&gt;
* FBL:&lt;br /&gt;
** Verify 2BL image.&lt;br /&gt;
** Derive key from key stored in MCPX + Flash, and decrypt 2BL.&lt;br /&gt;
** Go to 2BL.&lt;br /&gt;
&lt;br /&gt;
The rest of the boot behaves like MCPX X3 1.0.&lt;br /&gt;
&lt;br /&gt;
'''Assumptions for chain-of-trust'''&lt;br /&gt;
&lt;br /&gt;
* The CPU will start execution in trusted MCPX ROM.&lt;br /&gt;
* The MCPX ROM can not be read or modified.&lt;br /&gt;
* The decrypted 2BL or kernel can not be read entirely.&lt;br /&gt;
* All parts of the software following the MCPX are not-attackable and signed.&lt;br /&gt;
&lt;br /&gt;
See [[Exploits]] for possible options to break the chain of trust.&lt;br /&gt;
&lt;br /&gt;
== MCPX ROM ==&lt;br /&gt;
&lt;br /&gt;
Certain things are still missing, for example, getting the CPU to 32 bit protected mode and enabling caching.{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Xcodes ===&lt;br /&gt;
&lt;br /&gt;
The xcode interpreter is common through both versions of the MCPX ROM. The high level interpretation of the MCPX ROM might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void xcode_interpreter() {&lt;br /&gt;
&lt;br /&gt;
    // values are implied as x86 is just starting up&lt;br /&gt;
    register uint32_t pc        = 0; // stored in ESI register&lt;br /&gt;
    register uint8_t  opcode    = 0; // stored in AL register&lt;br /&gt;
    register uint32_t operand_1 = 0; // stored in EBC register&lt;br /&gt;
    register uint32_t operand_2 = 0; // stored in ECX register&lt;br /&gt;
    register uint32_t result    = 0; // stored in EDI register&lt;br /&gt;
    register uint32_t scratch   = 0; // stored in EBP register&lt;br /&gt;
&lt;br /&gt;
    // explicitly set startup point&lt;br /&gt;
    pc = 0xFF000080;&lt;br /&gt;
&lt;br /&gt;
    while (1) {&lt;br /&gt;
        opcode    = get_memory_byte(pc);&lt;br /&gt;
        operand_1 = get_memory_dword(pc+1);&lt;br /&gt;
        operand_2 = get_memory_dword(pc+5);&lt;br /&gt;
&lt;br /&gt;
        if (opcode == 0x07) {&lt;br /&gt;
            opcode    = operand_1;&lt;br /&gt;
            operand_1 = operand_2;&lt;br /&gt;
            operand_2 = result;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (opcode == 0x02) {&lt;br /&gt;
            result = get_memory_dword(operand_1 &amp;amp; 0x0fffffff);&lt;br /&gt;
        } else if (opcode == 0x03) {&lt;br /&gt;
            set_memory_dword(operand_1) = operand_2;&lt;br /&gt;
        } else if (opcode == 0x06) {&lt;br /&gt;
            result = (result &amp;amp; operand_1) | operand_2;&lt;br /&gt;
        } else if (opcode == 0x04) {&lt;br /&gt;
            if (operand_1 == 0x80000880) {&lt;br /&gt;
                operand_2 &amp;amp;= 0xfffffffd;&lt;br /&gt;
            }&lt;br /&gt;
            outl(operand_1, 0xcf8);&lt;br /&gt;
            outl(operand_2, 0xcfc);&lt;br /&gt;
        } else if (opcode == 0x05) {&lt;br /&gt;
            outl(operand_1, 0xcf8);&lt;br /&gt;
            result = inl(0xcfc);&lt;br /&gt;
        } else if (opcode == 0x08) {&lt;br /&gt;
            if (result != operand_1) {&lt;br /&gt;
                pc += operand_2;&lt;br /&gt;
            }&lt;br /&gt;
        } else if (opcode == 0x09) {&lt;br /&gt;
            pc += operand_2;&lt;br /&gt;
        } else if (opcode == 0x10) {&lt;br /&gt;
            scratch = (scratch &amp;amp; operand_1) | operand_2;&lt;br /&gt;
            result = scratch;&lt;br /&gt;
        } else if (opcode == 0x11) {&lt;br /&gt;
            outb(operand_2, operand_1);&lt;br /&gt;
        } else if (opcode == 0x12) {&lt;br /&gt;
            result = inb(operand_1);&lt;br /&gt;
        } else if (opcode == 0xee) {&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        pc += 9;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RC4 Decryption of the 2BL (MCPX 1.0 only) ===&lt;br /&gt;
&lt;br /&gt;
Version 1.0 of the ROM uses RC4 to decrypt the 2BL.&lt;br /&gt;
The RC4 algorithm was included as part of MCPX 1.0 and seems to work fine with BIOS versions 3944, 4034, and 4134.&lt;br /&gt;
&lt;br /&gt;
==== Stage 1: Key Scheduling ====&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/RC4#Key-scheduling_algorithm_.28KSA.29 RC4 Key-Scheduling Algorithm] is used to initialize the RC4 “S” array, first initializing the identity permutation (writing 1, 2, ..., 255 to 0x8F000 to 0x8F0FF), then processed in a way similar to the PRGA to mix in the key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint8_t  *s = (uint8_t *)0x8f000;&lt;br /&gt;
uint32_t  i;&lt;br /&gt;
&lt;br /&gt;
for (i = 0; i &amp;lt;= 255; i++) {&lt;br /&gt;
    s[i] = i;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
uint8_t *key = (uint8_t *)0xffffffa5; /* ROM offset 0x1a5. */&lt;br /&gt;
uint8_t j, t;&lt;br /&gt;
&lt;br /&gt;
/* It is unclear why values s[0x100..0x101] are being set to 0. They are&lt;br /&gt;
 * not modified by the code, but later these will be be used as the initial&lt;br /&gt;
 * i, j values in the PRGA.&lt;br /&gt;
 */&lt;br /&gt;
s[0x100] = 0x00;&lt;br /&gt;
s[0x101] = 0x00;&lt;br /&gt;
&lt;br /&gt;
for (i = 0, j = 0; i &amp;lt;= 255; i++) {&lt;br /&gt;
    j = j + s[i] + key[i%16];&lt;br /&gt;
&lt;br /&gt;
    /* Swap s[i] and s[j] */&lt;br /&gt;
    t    = s[i];&lt;br /&gt;
    s[i] = s[j];&lt;br /&gt;
    s[j] = t;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Stage 2: PRGA ====&lt;br /&gt;
&lt;br /&gt;
The [https://en.wikipedia.org/wiki/RC4#Pseudo-random_generation_algorithm_.28PRGA.29 RC4 Pseudo-random generation algorithm (PRGA)] is then used to decrypt the 2BL from 0xFFFF9E00, storing the decrypted 2BL at 0x00090000. It is 24KiB in size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uint8_t  *encrypted = (uint8_t*)0xFFFF9E00; /* 2bl */&lt;br /&gt;
uint8_t  *decrypted = (uint8_t*)0x90000; /* Decrypted 2bl Destination */&lt;br /&gt;
uint32_t  pos;&lt;br /&gt;
&lt;br /&gt;
/* As noted above, s[0x100..0x101] were set to 0 earlier, but have not been&lt;br /&gt;
 * modified since. The RC4 algorithm defines i and j both to be set to 0&lt;br /&gt;
 * before PRGA begins. */&lt;br /&gt;
i = s[0x100];&lt;br /&gt;
j = s[0x101];&lt;br /&gt;
&lt;br /&gt;
for (pos = 0; pos &amp;lt; 0x6000; pos++) {&lt;br /&gt;
    /* Update i, j. */&lt;br /&gt;
    i  = (i + 1) &amp;amp; 0xff;&lt;br /&gt;
    j += s[i];&lt;br /&gt;
&lt;br /&gt;
    /* Swap s[i] and s[j]. */&lt;br /&gt;
    t    = s[i];&lt;br /&gt;
    s[i] = s[j];&lt;br /&gt;
    s[j] = t;&lt;br /&gt;
&lt;br /&gt;
    /* Decrypt message and write output. */&lt;br /&gt;
    decrypted[pos] = encrypted[pos] ^ s[ s[i] + s[j] ];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Stage 3: Signature Verification ====&lt;br /&gt;
&lt;br /&gt;
Now that the Second-Stage Bootloader has been loaded, a quick sanity-check is performed: a “magic” signature is verified. If the signature doesn’t match, control goes to the error handler. If the signature does match, the code will jump to the 2bl entry point, which is given by the first dword of the decrypted 2bl.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mov  eax, [0x95fe4]&lt;br /&gt;
cmp  eax, MAGIC_NUMBER&lt;br /&gt;
jne  0xffffff94 ; If signature check failed, jump to error handler&lt;br /&gt;
mov  eax, [0x90000]&lt;br /&gt;
jmp  eax        ; Jump to 2BL entry point&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== TEA Decryption of the FBL (MCPX 1.1 only) ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
== FBL (MCPX 1.1 only) ==&lt;br /&gt;
&lt;br /&gt;
The Flash Boot Loader was added in MCPX 1.1, it connects the MCPX ROM and the 2BL.{{FIXME}}&lt;br /&gt;
It is not part of the MCPX ROM, but part of the flash.&lt;br /&gt;
&lt;br /&gt;
== 2BL ==&lt;br /&gt;
&lt;br /&gt;
{{FIXME|reason=Certain parts are still missing.}}&lt;br /&gt;
&lt;br /&gt;
=== MTRR Setup ===&lt;br /&gt;
&lt;br /&gt;
First, the cache is disabled.{{FIXME}}&lt;br /&gt;
Then, the MTRR (Memory Type Range Register) will be setup (using &amp;lt;code&amp;gt;wrmsr&amp;lt;/code&amp;gt;) in the following way:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! MTRR (ecx) !! High value (edx) !! Low value (eax) !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x200 || 0x00000000 || 0x00000006 ||&lt;br /&gt;
|-&lt;br /&gt;
| rowspan = &amp;quot;2&amp;quot; | 0x201 || rowspan = &amp;quot;2&amp;quot; | 0x0000000F || 0xFC000800 || ''(For 64 MiB RAM BIOS)''&lt;br /&gt;
|-&lt;br /&gt;
|0xF8000800 || (''For 128 MiB RAM BIOS'')&lt;br /&gt;
|-&lt;br /&gt;
|0x202 || 0x00000000 || 0xFFF80005 ||&lt;br /&gt;
|-&lt;br /&gt;
|0x203 || 0x0000000F || 0xFFF80800 ||&lt;br /&gt;
|-&lt;br /&gt;
|0x204 || 0x00000000 || 0x00000000 || rowspan=&amp;quot;3&amp;quot; | Clear all unused MTRR&lt;br /&gt;
|-&lt;br /&gt;
| colspan = &amp;quot;3&amp;quot; | ...&lt;br /&gt;
|-&lt;br /&gt;
|0x20F || 0x00000000 || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
|0x2FF || 0x00000000 || 0x00000800 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Once the MTRR have been written, the cache is enabled.{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Register setup ===&lt;br /&gt;
&lt;br /&gt;
Now the 2BL will set up the segment registers{{FIXME|reason=why?!}} and stack:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Register !! Value !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|ds || 0x0010 || rowspan=&amp;quot;3&amp;quot; | Data segment{{citation needed}}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|es || 0x0010&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|ss || 0x0010&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|esp || 0x00400000 ||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|fs || 0x0000 ||&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|gs || 0x0000 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Self-copy ===&lt;br /&gt;
&lt;br /&gt;
Now the 2BL copies itself (24 kiB) from 0x00090000 to memory address 0x00400000.&lt;br /&gt;
&lt;br /&gt;
=== Paging ===&lt;br /&gt;
&lt;br /&gt;
Now a PDE is prepared at address 0x0000F000:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset in PDE !! Value !! Notes&lt;br /&gt;
|-&lt;br /&gt;
|0x800 || 0x000000E3 || rowspan=&amp;quot;7&amp;quot; | Identity maps the first 256MiB of RAM: 0x80000000 and 0x00000000 will each map to physical page 0 &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; 0xE3: Flags: &amp;lt;br&amp;gt; * 0x80: 4 MiB page &amp;lt;br&amp;gt; * 0x40: Marked as previously written (Dirty) &amp;lt;br&amp;gt; * 0x20: Marked as previously accessed &amp;lt;br&amp;gt; * 0x02: Read/Write &amp;lt;br&amp;gt; * 0x01: Present&lt;br /&gt;
|-&lt;br /&gt;
|0x000 || 0x000000E3&lt;br /&gt;
|-&lt;br /&gt;
|0x804 || 0x004000E3&lt;br /&gt;
|-&lt;br /&gt;
|0x004 || 0x004000E3&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | ...&lt;br /&gt;
|-&lt;br /&gt;
|0x8FC || 0x0FC000E3&lt;br /&gt;
|-&lt;br /&gt;
|0x0FC || 0x0FC000E3&lt;br /&gt;
|-&lt;br /&gt;
|0x900 || 0x00000000 || rowspan=&amp;quot;5&amp;quot; | Unmapping the rest of the pages&lt;br /&gt;
|-&lt;br /&gt;
|0x100 || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | ...&lt;br /&gt;
|-&lt;br /&gt;
|0xFFC || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
|0x7FC || 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
|0xC00 || 0x0000F063 || Maps the PDE (4 kiB page) to address 0xC0000000 &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; 0x63: Flags: &amp;lt;br&amp;gt; * 0x40: Marked as previously written (Dirty) &amp;lt;br&amp;gt; * 0x20: Marked as previously accessed &amp;lt;br&amp;gt; * 0x02: Read/Write &amp;lt;br&amp;gt; * 0x01: Present&lt;br /&gt;
|-&lt;br /&gt;
|0xFFC || 0xFFC000E3 || Identity maps the upper portion of the Flash (4 MiB page) to address 0xFFC00000 &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; 0xE3: Flags: &amp;lt;br&amp;gt; * 0x80: 4 MiB page &amp;lt;br&amp;gt; * 0x40: Marked as previously written (Dirty) &amp;lt;br&amp;gt; * 0x20: Marked as previously accessed &amp;lt;br&amp;gt; * 0x02: Read/Write &amp;lt;br&amp;gt; * 0x01: Present&lt;br /&gt;
|-&lt;br /&gt;
|0xFD0 || 0xFD0000FB || rowspan=&amp;quot;4&amp;quot; | Maps 16 MiB for the GPU control registers &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; 0xFB: Flags: &amp;lt;br&amp;gt; * 0x80: 4 MiB page &amp;lt;br&amp;gt; * 0x40: Marked as previously written (Dirty) &amp;lt;br&amp;gt; * 0x20: Marked as previously accessed &amp;lt;br&amp;gt; * 0x10: Cache disabled &amp;lt;br&amp;gt; * 0x08: Write-Through caching &amp;lt;br&amp;gt; * 0x02: Read/Write &amp;lt;br&amp;gt; * 0x01: Present&lt;br /&gt;
|-&lt;br /&gt;
|0xFD4 || 0xFD4000FB&lt;br /&gt;
|-&lt;br /&gt;
|0xFD8 || 0xFD8000FB&lt;br /&gt;
|-&lt;br /&gt;
|0xFDC || 0xFDC000FB&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After setting up the PDE, the PAT is set up using &amp;lt;code&amp;gt;wrmsr&amp;lt;/code&amp;gt;: {{FIXME}}&lt;br /&gt;
&lt;br /&gt;
CR4 is touched {{FIXME}}&lt;br /&gt;
&lt;br /&gt;
CR3 is touched {{FIXME}}&lt;br /&gt;
&lt;br /&gt;
Now paging is activated by enabling the PG and WP bits in CR0.&lt;br /&gt;
Additionally, the same &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt; instruction is used to enable the NE bit in cr0.&lt;br /&gt;
&lt;br /&gt;
=== 2BL main ===&lt;br /&gt;
&lt;br /&gt;
esp is now also reloaded to point at the relocated address. It will be set to 0x80400000 (absolute value, independent of previous esp value).&lt;br /&gt;
The 2BL will now &amp;lt;code&amp;gt;call&amp;lt;/code&amp;gt; into the relocated 2BL code somewhere near 0x00400000.&lt;br /&gt;
&lt;br /&gt;
==== Disabling of the MCPX ROM ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x80000880);&lt;br /&gt;
out8(0xCFC, 0x02);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== SMC handling ====&lt;br /&gt;
&lt;br /&gt;
The [[SMC]] has a watchdog functionality which must be turned off.&lt;br /&gt;
This is done by querying the SMC registers 0x1C - 0x1F.&lt;br /&gt;
If all of them are 0x00 the 2BL will shutdown the system{{FIXME}}.&lt;br /&gt;
If this is not the case, the bootloader calculates the watchdog challenge response and sends it to SMC registers 0x20 and 0x21.&lt;br /&gt;
&lt;br /&gt;
Additionally, the 2BL will set SMC register 0x01 to 0 (which resets the cursor position for reading the SMC revision information).&lt;br /&gt;
&lt;br /&gt;
==== Enable IDE and NIC ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x8000088C);&lt;br /&gt;
out32(0xCFC, 0x40000000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Memory cleanup ====&lt;br /&gt;
&lt;br /&gt;
The 2BL fills memory with 0xCC from 0x80090000 to 0x80095FFF. These are the 24 kiB where the 2BL was stored previously.&lt;br /&gt;
&lt;br /&gt;
==== Setup RAM timing ====&lt;br /&gt;
&lt;br /&gt;
Not described yet, this is complicated{{FIXME}}.&lt;br /&gt;
This got a lot more complicated when Microsoft started using different RAM sometime after [[Hardware Revisions#1.6|Hardware Revision 1.6]] was already out.&lt;br /&gt;
&lt;br /&gt;
==== Configure LDT bus ====&lt;br /&gt;
&lt;br /&gt;
DWORD flow control is enabled in the MCPX.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x80000854);&lt;br /&gt;
out32(0xCFC, in32(0xCFC) | 0x88000000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DWORD flow control is also enabled in the NV2A core.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x80000064);&lt;br /&gt;
out32(0xCFC, in32(0xCFC) | 0x88000000);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The LDT bus is reset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x8000006C);&lt;br /&gt;
uint32_t tmp = in32(0xCFC);&lt;br /&gt;
out32(0xCFC, tmp &amp;amp; 0xFFFFFFFE);&lt;br /&gt;
out32(0xCFC, tmp);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest is unknown{{FIXME}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x80000080);&lt;br /&gt;
out32(0xCFC, 0x00000100);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable USB ASRC ====&lt;br /&gt;
&lt;br /&gt;
The USB controller's &amp;quot;automatic slew rate compensation&amp;quot; feature is enabled for MCPX revisions D01 and later.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
out32(0xCF8, 0x80000808);&lt;br /&gt;
uint8_t mcpx_revision = in8(0xCFC);    &lt;br /&gt;
&lt;br /&gt;
if (mcpx_revision &amp;gt;= 0xD1) {&lt;br /&gt;
  out32(0xCF8, 0x800008C8);&lt;br /&gt;
  out32(0xCFC, 0x00008F00);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loading the kernel ====&lt;br /&gt;
===== Kernel-copy =====&lt;br /&gt;
&lt;br /&gt;
The Kernel is now copied into RAM.&lt;br /&gt;
&lt;br /&gt;
===== Kernel decryption =====&lt;br /&gt;
&lt;br /&gt;
The 2BL will copy the kernel decryption key (16 bytes) from offset 32 of an array of 3 keys:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Use&lt;br /&gt;
|-&lt;br /&gt;
| 0 || EEPROM key&lt;br /&gt;
|-&lt;br /&gt;
| 16 || Certificate key&lt;br /&gt;
|-&lt;br /&gt;
| 32 || Kernel key&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Kernel is then decrypted in-place using RC4.&lt;br /&gt;
&lt;br /&gt;
===== Kernel decompression =====&lt;br /&gt;
&lt;br /&gt;
The Kernel is decompressed directly to 0x80010000 where it will reside until a full system shutdown.&lt;br /&gt;
&lt;br /&gt;
==== Running the kernel ====&lt;br /&gt;
&lt;br /&gt;
The xboxkrnl.exe header at 0x8001000 is checked{{FIXME|reason=how?}}.&lt;br /&gt;
If it is invalid, {{FIXME}}.&lt;br /&gt;
If it is valid, the kernel entry point is looked up from the PE optional header. The hardcoded image base of 0x8001000 is added to the entry point.&lt;br /&gt;
The entry-point is now being called. Argumnts are passed on the stack, from right to left.&lt;br /&gt;
The first argument is a commandline string loaded from memory address 0x80400000. It is an empty string for retail BIOS{{FIXME|reason=Mention options for debug bioses here}}.&lt;br /&gt;
A pointer to the previously mentioned array of 3 keys is passed as the second argument.&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
&lt;br /&gt;
=== Initialization ===&lt;br /&gt;
&lt;br /&gt;
==== Stage 1 (Cold-boot only) ====&lt;br /&gt;
&lt;br /&gt;
The entry point to the kernel will first parse the arguments.{{FIXME}}&lt;br /&gt;
At the end, the kernel will call the initialization routine for what we'll refer to as: Stage 2a.&lt;br /&gt;
&lt;br /&gt;
==== Stage 2 (Cold-boot only) ====&lt;br /&gt;
&lt;br /&gt;
The kernel initialization will only happen once on a cold-boot. It will not happen for reboots.&lt;br /&gt;
&lt;br /&gt;
* ebp is set to 0x00000000&lt;br /&gt;
* esp is modified{{FIXME}}&lt;br /&gt;
* GDT is prepared{{FIXME}} and loaded{{FIXME}}&lt;br /&gt;
* cs and ds are reloaded&lt;br /&gt;
* fs is set{{FIXME}}&lt;br /&gt;
* TSS is loaded{{FIXME}}&lt;br /&gt;
* cr3 is moved to 3 tasks{{FIXME}}&lt;br /&gt;
* The CPU microcode is updated&lt;br /&gt;
&lt;br /&gt;
After this comes Stage 3 initialization which will also be repeated on kernel re-initialization.&lt;br /&gt;
&lt;br /&gt;
==== Stage 3 ====&lt;br /&gt;
&lt;br /&gt;
This is code which is duplicated in INIT and .text sections.&lt;br /&gt;
* In the INIT section it directly follows the Stage 2 initialization.&lt;br /&gt;
* In the .text section it follows the Kernel re-initialization code mentioned below.&lt;br /&gt;
&lt;br /&gt;
This code does the following:&lt;br /&gt;
&lt;br /&gt;
* IDT is prepared{{FIXME}} and loaded{{FIXME}}&lt;br /&gt;
* {{FIXME|reason=a lot more happens here.. If you want to RE this: look into the HalReturnToFirmware code [last call is to Stage 2b]; the kernel entry point [last call is to Stage 2a]; or just search for lidt instructions}}&lt;br /&gt;
&lt;br /&gt;
=== Re-initialization ===&lt;br /&gt;
&lt;br /&gt;
On reboots, initialization Stage 1 and 2 are not in memory anymore (as the INIT section has been discarded), and can't be run anymore.&lt;br /&gt;
Instead, a seperate function replaces their functionality and then jumps directly to Stage 3 initalization.&lt;br /&gt;
&lt;br /&gt;
This code is the partial kernel reinitialization, which will be ran on reboots using [[Kernel/HalReturnToFirmware]].&lt;br /&gt;
&lt;br /&gt;
* ebp is set to 0x00000000&lt;br /&gt;
* esp is modified{{FIXME}}&lt;br /&gt;
* Some memory stuff in a seperate function{{FIXME}}&lt;br /&gt;
* The .data section from [[Flash]] is loaded and replaces the running .data&lt;br /&gt;
* The byte infront of KeSystemTime is set to 0x01, indicating the system comes from a reboot.&lt;br /&gt;
&lt;br /&gt;
After this has completed, [[#Stage 3]] of the kernel initialization will take over.&lt;br /&gt;
&lt;br /&gt;
==== Skipped initialization ====&lt;br /&gt;
&lt;br /&gt;
When rebooting, certain parts are still initialized and assumed to be working:&lt;br /&gt;
&lt;br /&gt;
(This list is currently in no particular order and incomplete)&lt;br /&gt;
&lt;br /&gt;
* Anything already done by Stage 1 and Stage 2&lt;br /&gt;
* PCI device setup&lt;br /&gt;
* EEPROM decryption{{FIXME}}&lt;br /&gt;
* Check for AV-Pack{{FIXME}}&lt;br /&gt;
* Video mode setup (boot animation is not played again)&lt;br /&gt;
* Some IDE stuff{{FIXME}}&lt;br /&gt;
* Some SMC stuff{{FIXME}}&lt;br /&gt;
* Memory allocator initialization{{FIXME}}&lt;br /&gt;
* Kernel debugger (Super-I/O) initialization{{FIXME}} (This still seems to be in memory?!){{citation needed}}&lt;br /&gt;
&lt;br /&gt;
=== Startup animation ===&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://web.archive.org/web/20141024145145/http://hackspot.net/XboxBlog/?p=1 Understanding the Xbox boot process]&lt;br /&gt;
* [https://web.archive.org/web/20150612173331/https://mborgerson.com/deconstructing-the-xbox-boot-rom Deconstructing the Boot ROM]&lt;/div&gt;</summary>
		<author><name>Lowtolerance</name></author>	</entry>

	</feed>