Difference between revisions of "Exploits"

From xboxdevwiki
Jump to: navigation, search
m (Fix typo)
m
(7 intermediate revisions by 4 users not shown)
Line 52: Line 52:
 
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.
 
When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.
  
''The TEA algorithm and exploit are also described in more detail in Bunnnies book (Page 109 and Page 142).''
+
''The TEA algorithm and exploit are also described in more detail in Bunnie's book (Page 109 and Page 142).''
  
 
== Dashboard ==
 
== Dashboard ==
Line 66: Line 66:
 
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]
 
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]
 
=== [[007: Agent Under Fire]] ===
 
=== [[007: Agent Under Fire]] ===
 +
 +
[https://web.archive.org/web/20031003093240/http://xbox-linux.sourceforge.net:80/docs/007analysis.html Analysis of this savegame-exploit].
 +
 
=== [[Frogger Beyond]] ===
 
=== [[Frogger Beyond]] ===
 +
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]
 +
The game isnt shown in the final presentation at 22C3 (neither are Mechassault nor SplinterCell).
 +
 
=== [[MechAssault]] ===
 
=== [[MechAssault]] ===
 
=== [[Tom Clancy's Splinter Cell]] ===
 
=== [[Tom Clancy's Splinter Cell]] ===
Line 152: Line 158:
 
|-
 
|-
 
| rowspan="13" | Homebrew entry point || rowspan="13" | Community
 
| rowspan="13" | Homebrew entry point || rowspan="13" | Community
| rowspan="13" | Some movie DVDs contain default XBEs signed to run on original Xbox from DVD-R{{FIXME|reason=Add region / product codes and other DVDs you know of}}. If we can find an exploit in one of them (loaded files), we could possibly take over the entire system and run homebrew from DVD-R.
+
| rowspan="13" | 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 "read-only", 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).
 +
|-
 +
|'''Hulk (Special Edition)'''
 +
 
 +
UPC 2519224892
 +
 
 +
[[The Hulk]]
 +
 
 +
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.
 +
 
 +
Untested
 +
|-
 +
|'''Star Wars: Clone Wars - Volume One'''
 +
 
 +
UPC 2454317005
 +
 
 +
[[Republic Commando]]
 +
 
 +
Untested
 
|-
 
|-
 
|'''Star Wars: Clone Wars - Volume Two'''
 
|'''Star Wars: Clone Wars - Volume Two'''
 +
 +
UPC 24543214137
 +
 
[[Battlefront II]]
 
[[Battlefront II]]
  
Line 160: Line 187:
 
|-
 
|-
 
|'''Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)'''
 
|'''Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)'''
 +
 +
UPC 5039036023238
 +
 
[[Battlefront II]]
 
[[Battlefront II]]
  
Line 165: Line 195:
 
|-
 
|-
 
|'''Star Wars Trilogy (Widescreen Edition with Bonus Disc)'''
 
|'''Star Wars Trilogy (Widescreen Edition with Bonus Disc)'''
[[Battlefront]]
+
 
 +
UPC 24543123415 or 5039036017374
 +
 
 +
[[Star Wars Battlefront]]
  
 
Untested
 
Untested
 
|-
 
|-
|'''Star Wars Trilogy DVD with Demo'''
+
|'''Star Wars Trilogy DVD (Widescreen theatrical edition)'''
 +
 
 +
UPC 24543559856
 +
 
 
[[Lego Star Wars 2]]
 
[[Lego Star Wars 2]]
  
 
Untested
 
Untested
 
|-
 
|-
|'''Star Wars: Clone Wars - Volume One'''
+
|'''The Chronicles of Riddick (Widescreen Unrated Director's Cut)'''
[[Battlefront]]
+
 
 +
UPC 5050582274639
  
Untested
 
|-
 
|'''The Chronicles of Riddick (Widescreen Unrated Director's Cut)'''
 
 
[[Chronicles of Riddick]]
 
[[Chronicles of Riddick]]
  
Line 185: Line 219:
 
|-
 
|-
 
|'''Doom (Unrated Widescreen Edition)'''
 
|'''Doom (Unrated Widescreen Edition)'''
 +
 +
UPC 25192031229
 +
 
[[Doom 3]]
 
[[Doom 3]]
  
 
Untested
 
Untested
 
|-
 
|-
|'''Hulk (Special Edition)'''
+
|'''King Arthur - The Director's Cut (Widescreen Edition)'''
[[Hulk]]
+
 
 +
UPC 786936265262
  
Untested
 
|-
 
|'''King Arthur - The Director's Cut (Widescreen Edition)'''
 
 
[[King Arthur]]
 
[[King Arthur]]
  
Line 200: Line 235:
 
|-
 
|-
 
|'''Robots (Widescreen Edition)'''
 
|'''Robots (Widescreen Edition)'''
 +
 +
UPC 24543193845
 +
 
[[Robots]]
 
[[Robots]]
  
Line 205: Line 243:
 
|-
 
|-
 
|'''Van Helsing (Widescreen Edition)'''
 
|'''Van Helsing (Widescreen Edition)'''
 +
 +
UPC 25192326622 or 25192586125
 +
 
[[Van Helsing]]
 
[[Van Helsing]]
  
 
Untested
 
Untested
 
|-
 
|-
|'''Clone Wars Volume 1'''
+
|'''The Godfather'''
[[Republic Commando]]
+
 
 +
UPC not 5014437812834 nor 14633165401 nor 014633165401
 +
 
 +
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.
  
Untested
+
[[The Godfather: The Game]]
 
|}
 
|}
  

Revision as of 14:39, 11 May 2020

MCPX

LDT (Hypertransport) bus tap

See bunnie's adventures hacking the Xbox.

Visor hack

Exploits incorrect rollover of memory address.

MIST hack

Exploits error in xcode interpreter security check. There are at least 2 variations of this hack.

A20M# hack

A jumper wire hack to enable A20

Uses a legacy x86 feature.

RC4 attack (MCPX 1.0 only)

Microsoft uses the last bytes of the decrypted 2BL to check the integrity of the 2BL. 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. As such, the 2BL can be freely modified, as long as the last couple of bytes still match what the MCPX ROM expects.

This can be used to take over the 2BL entry point.

When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.

This attack is described by Michael Steil in his Google talk.

TEA attack (MCPX 1.1 only)

TEA, which is only used in MCPX 1.1, can not be used as a hash in Davies-Meyer mode [1][2]. And yet, Microsoft used it that way.

The original attack uses the 5 bytes at 0xffffd400 (FBL entry point) which are E9 83 01 00 00. This is jmp 0xffffd588 (which is a jump within the flash region).

When flipping the highest bit of the operand DWORD (at 0xffffd400, mind your endianess) this will become: E9 83 01 80 00. This is jmp 0x7fd588 (which is a jump into the RAM region). For the attack to be successful, the highest bit in the DWORD at 0xffffd404 also has to be flipped.

The RAM can be controlled using the x-code command to write to RAM. So the idea is to copy a program from Flash to RAM using x-codes. Then the FBL / 2BL is modified to jump into said RAM region by flipping a bit of a jump operand (as described above). The 2 bit flips will not change the hash of FBL / 2BL as TEA is broken.

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.

When the attack happens, the MCPX ROM is still visible, making this a very powerful attack.

The TEA algorithm and exploit are also described in more detail in Bunnie's book (Page 109 and Page 142).

Dashboard

Audio hacks

Font hacks

Analysis of "Bert & Ernie" font-exploit.

Easter-egg exploit

Savegames

Savedgames can be used as an exploit method, but care must be taken for most games are verifying digital signatures of savedgames [citation needed] [3]

007: Agent Under Fire

Analysis of this savegame-exploit.

Frogger Beyond

Not much is known why this game was in the list, 22C3, page 85 The game isnt shown in the final presentation at 22C3 (neither are Mechassault nor SplinterCell).

MechAssault

Tom Clancy's Splinter Cell

Tony Hawk's Pro Skater 4

Grimdoomer discovered a savegame exploit in THPS4, shared it on Discord and was later included with the Rocky5 softmod installer. a video demonstrating the game trigger (custom skatepark)

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 "loader" 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

another website talking about his exploit. xbmc4xbox.org.uk

Attack ideas

Purpose Author Description Status
Xbox DVD Movie Playback Kit Dongle ROM manipulation Xbox-Linux wiki 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. XBE loader seems to be secured, although no full analysis has been done.
Preserving memory across boot JayFoxRox 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). 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.
Early boot control JayFoxRox 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.

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.

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).
Dumping the MCPX ROM JayFoxRox Trying to find problems with the SMC reset chain:
  • Map PCI devices over the MCPX ROM region
  • Schedule a reset
  • Keep reading MCPX ROM memory with CPU to persistent page
  • 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)
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).

Memory was read based on observing value changes (in PCI regions, signalling reset), and timing alone (X cycles after starting reset). 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. As MCPX and CPU are both reset by the SMC directly, this is not surprising.

Dumping the MCPX ROM JayFoxRox Trying to find problems with the SMC reset chain:
  • Map PCI devices over the MCPX ROM region
  • Check if NV2A can access the mapped PCI device
  • 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)
  • 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)
Concept only: No interest in experimenting with NV2A DMA.
Dumping the MCPX ROM JayFoxRox 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:
  • Map device in NV2A to MCPX ROM region (note: mapping MCPX device would not work, because that gets reset with PWRGD)
  • Warm reset using SMC
  • Code in NV2A device should now jump to lower memory and unmap the MCPX ROM region (by moving itself for example)
  • Delay by X cycles [probably in the range from 1ns to idk.. 500ms] to avoid reading the MCPX ROM before MCPX reset
  • Code in lower region should copy MCPX ROM region to persisting pages
Concept only: Someone should measure the pins and possibly look into the memory signals. This is too time consuming for me.
Unknown JayFoxRox Partial system reset using 0xCF9 I/O register 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.
Dumping the MCPX ROM JayFoxRox 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. 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.
Unknown JayFoxRox Resetting from wrong address. The errata for the CPU states that a warm-reset might occur from the wrong address. Concept only: Needs more research
Dumping the MCPX ROM JayFoxRox 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.
  • 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).
  • 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.
  • OHCI: Untested
  • Others: Untested
Dumping Kernel INIT JayFoxRox 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. 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.
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. WIP as of 2018-09-12
Homebrew entry point Community 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 "read-only", 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).
Hulk (Special Edition)

UPC 2519224892

The Hulk

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.

Untested

Star Wars: Clone Wars - Volume One

UPC 2454317005

Republic Commando

Untested

Star Wars: Clone Wars - Volume Two

UPC 24543214137

Battlefront II

Untested

Star Wars: Episode III - Revenge of the Sith (Widescreen Edition)

UPC 5039036023238

Battlefront II

Untested

Star Wars Trilogy (Widescreen Edition with Bonus Disc)

UPC 24543123415 or 5039036017374

Star Wars Battlefront

Untested

Star Wars Trilogy DVD (Widescreen theatrical edition)

UPC 24543559856

Lego Star Wars 2

Untested

The Chronicles of Riddick (Widescreen Unrated Director's Cut)

UPC 5050582274639

Chronicles of Riddick

Untested

Doom (Unrated Widescreen Edition)

UPC 25192031229

Doom 3

Untested

King Arthur - The Director's Cut (Widescreen Edition)

UPC 786936265262

King Arthur

Untested

Robots (Widescreen Edition)

UPC 24543193845

Robots

Untested

Van Helsing (Widescreen Edition)

UPC 25192326622 or 25192586125

Van Helsing

Untested

The Godfather

UPC not 5014437812834 nor 14633165401 nor 014633165401

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.

The Godfather: The Game

Notes