fail0verflow Cracks Sony PS3 Security to Restore Linux on All Consoles

DCEmu Reviews - 27C3 - Chaos Communication Congress 2010 - fail0verflow - FULL VIDEO — 1KIND Reviews

1KIND Reviews

Sony's removal of OtherOS provoked researchers to attack the system hypervisor, exposing a static cryptographic nonce that allows hackers to calculate master private keys and run unsigned code permanently.

AI-assisted summary of DCEmu Reviews - 27C3 - Chaos Communication Congress 2010 - fail0verflow - FULL VIDEO — original source. Check the original for full context.

Source published:

Key ideas

  • fail0verflow revealed a fatal cryptographic flaw in Sony's PlayStation 3 security: Sony reused a static nonce (m) in its ECDSA implementation, allowing researchers to calculate the master private signing keys using simple algebra from just two signatures. (35:16)
  • The team demonstrated a persistent boot-time exploit against isolated SPU loader lv2ldr by triggering a buffer overflow via an oversized revocation list loaded from flash. (33:19)
  • Historical analysis by Michael Steil and fail0verflow shows that Sony's removal of the official OtherOS Linux feature directly provoked the community to compromise the console within twelve months, after it had remained secure for over three years. (5:53)
  • The researchers introduced AsbestOS, a custom bootloader displacing GameOS at Level 2 that successfully bootstrapped Linux on PS3 hardware and debunked Sony's claim that the PS3 Slim lacked hardware support for Linux. (27:33)

Detailed notes

## Background Published on YouTube by 1KIND Reviews on December 30, 2010, this video records the landmark presentation delivered at the 27th Chaos Communication Congress (27C3) in Berlin by hacking group fail0verflow (bushing, Sven, marcan, and Segher). The show notes outline the team's achievements and reiterate their primary objective: demonstrating that Sony's security design was fundamentally flawed after removing OtherOS, and presenting their tools—such as AsbestOS—to restore Linux across all PlayStation 3 models.

## TL;DR The presentation surveys console security across the seventh generation, emphasizing that the PS3 remained largely unexploited for years only because native Linux support satisfied hobbyists. After Sony revoked OtherOS, researchers dissected the architecture, using the PS Jailbreak USB stack overflow and their custom AsbestOS loader to turn isolated SPUs into decryption oracles. The team documents architectural oversights such as missing W^X protection, unvalidated storage encryption, and an exploitable buffer overflow in lv2ldr's revocation handling. Finally, fail0verflow unveils Sony's critical mathematical blunder—reusing a static nonce in their ECDSA signature implementation—allowing researchers to calculate master private signing keys with basic algebra and completely dismantle the platform's public-key cryptography.

## Atmosphere & style The session carries the relaxed, subversive energy of a classic Chaos Communication Congress talk, punctuated by casual audience polling, dry deadpan wit, and mutual camaraderie among the presenters. The pacing builds steadily from historical context and hardware breakdown into an intellectual triumph, moving from low-level glitching toward an explosive cryptographic punchline that leaves the audience laughing in disbelief at Sony's amateurish errors. It feels like watching a masterclass in reverse engineering, delivered not out of commercial malice, but from a genuine, uncompromising philosophical commitment to hardware ownership and running homebrew code.

## Bulletin - [35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) fail0verflow revealed a fatal cryptographic flaw in Sony's PlayStation 3 security: Sony reused a static nonce (m) in its ECDSA implementation, allowing researchers to calculate the master private signing keys using simple algebra from just two signatures. - [33:19](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1999s) The team demonstrated a persistent boot-time exploit against isolated SPU loader lv2ldr by triggering a buffer overflow via an oversized revocation list loaded from flash. - [05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Historical analysis by Michael Steil and fail0verflow shows that Sony's removal of the official OtherOS Linux feature directly provoked the community to compromise the console within twelve months, after it had remained secure for over three years. - [27:33](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1653s) The researchers introduced AsbestOS, a custom bootloader displacing GameOS at Level 2 that successfully bootstrapped Linux on PS3 hardware and debunked Sony's claim that the PS3 Slim lacked hardware support for Linux.

## Key takeaways - [00:58](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=58s) The Homebrew Channel on the Nintendo Wii demonstrated massive community reach, achieving over one million unique active installations across roughly 30 million vulnerable launch-era consoles. - [03:35](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=215s) The presence of official OtherOS support effectively protected the core PS3 hypervisor for over three years because security researchers had no incentive to attack it. - [05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Console hacking history demonstrates that platform exploitation is overwhelmingly driven by hobbyists pursuing homebrew and Linux hardware ownership rather than commercial piracy. - [09:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=555s) The PS3 Cell Broadband Engine relies on Isolated SPUs executing cryptographically signed binaries with hardware-enforced memory isolation from the PowerPC core. - [11:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=667s) The PS3 boot sequence alternates execution and decryption between PowerPC hypervisor levels and isolated SPU loaders (metldr, lv1ldr, lv2ldr). - [12:32](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=752s) Unlike the Xbox 360, the PS3 lacks hardware-backed memory encryption, bus integrity hashing, and physical eFuses to prevent firmware downgrades. - [16:55](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1015s) PS3 internal hard drive encryption is structurally broken because static keys and initialization vectors are used without authentication tags, enabling plaintext oracle cut-and-paste attacks. - [20:05](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1205s) Sony's retroactive removal of OtherOS from original 'fat' consoles alienated the exact technical demographic capable of reverse-engineering and breaking its security stack. - [21:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1267s) The commercial PS Jailbreak exploit abused the USB configuration descriptor parser with an unhandled zero-length query to smash lv2 kernel C++ vtables without opening the console. - [24:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1455s) Sony's lv2 kernel lacked basic W^X memory mitigations, and the lv1 hypervisor acted merely as a virtualization monitor rather than cryptographically verifying executable memory mappings. - [26:20](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1580s) Extracted symmetric HMAC keys allowed the recreation of Factory Service Mode jig dongles, which paired with leaked Sony service binaries to flash arbitrary older firmware versions. - [28:41](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1721s) Because isolated SPUs decrypted SELFs upon request for any Level 2 PowerPC caller without verifying caller identity, researchers used the hardware as an indiscriminate decryption oracle. - [31:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1891s) Firmware revocation checks were vulnerable to flash emulation spoofing because the Level 1 hypervisor re-read loaders from flash a second time after initial execution. - [33:19](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1999s) SPU local storage memory layouts placed the revocation list buffer directly ahead of lv2ldr executable code, permitting unchecked length parameters to overwrite running loader logic. - [35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) Sony's failure to generate a unique random nonce m for ECDSA signatures compromised the entire platform's cryptographic root of trust. - [44:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2643s) fail0verflow clarified that their research was strictly limited to establishing low-level system control and running Linux, rejecting any interest in developing commercial game piracy tools.

## Detailed walkthrough ### [00:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=3s) Introduction and the Audience Survey

The session begins with an informal poll of the audience to gauge which consoles people in the room own. A show of hands reveals that some attenders own a Nintendo Wii, a group owns an Xbox 360—prompting a quick nod to Andrew "bunnie" Huang's classic book on Xbox hacking—and an overwhelming majority raises their hands for the PlayStation 3. The moderator remarks that this hardware represents an immense amount of computing power placed directly in users' hands, arguing that under any sensible definition of property and ownership, owners ought to have the freedom to do whatever they wish with their machines. With that premise established, fail0verflow takes the stage to explain how to look inside the PS3 and modern console architectures.

[00:58](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=58s) fail0verflow’s Wii Track Record and BootMii

bushing introduces the speaking group: Sven, marcan, Segher, and himself, representing fail0verflow. Because the group exceeds the presenter limit for the stage, the remaining members of their international team—spanning nearly every continent—watch from the front row. The presenters are well-known to the Chaos Communication Congress community: two years prior at 25C3, marcan and bushing presented their Wii hacks; a year before that at 24C3, bushing demonstrated the first unsigned code execution on the Wii; and in 2008, the team completely reverse-engineered and reconstructed the Wii's security architecture.

Reflecting on the Nintendo Wii, bushing notes that three years have passed since that first unsigned code execution. In that span, Nintendo issued nine separate system firmware updates. Bushing points out that eight of those updates were completely contrived, offering zero useful end-user features: only a single update provided something users actually wanted—the ability to run games from an SD card—while the remaining updates were pushed under the guise of "background improvements to improve system performance," which was simply corporate code for patching security vulnerabilities.

According to sales data, Nintendo sold around 73 million Wii consoles, making it the top-selling home console of its generation. fail0verflow estimates that roughly 30 million of those consoles were manufactured before Nintendo managed to patch the signature hash-check vulnerability the team had disclosed. Those early console owners were able to run BootMii, an alternate bootloader developed by the team. Bushing explains that reverse-engineering the Wii was dominated not by cryptographic protections, but by the extreme fragility of Nintendo's software stack:

> “The software is very, very fragile and there are very, very, very many ways to accidentally brick the device and no way to fix it, so we put time into making something that would simply let you unbrick your Wii.”

Their efforts reached widespread adoption: by September 2010, the Homebrew Channel surpassed one million unique active users, meaning more than one percent of all Wii owners worldwide had installed their homebrew platform.

- **Total Wii sales:** ~73 million units worldwide. - **Vulnerable units produced:** ~30 million consoles manufactured prior to the boot ROM/hash-check fix. - **Homebrew Channel milestone:** Over 1,000,000 unique installations logged. - **Update track record:** 9 firmware updates pushed by Nintendo, with 8 serving exclusively to patch exploits.

[03:35](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=215s) The Console Landscape: Wii, Xbox 360, and PS3

Sven steps up to survey the state of console security across the three major seventh-generation home systems: the Wii (late 2006), the Xbox 360 (late 2005), and the PlayStation 3 (late 2006).

The Wii was compromised almost immediately upon arrival. Initial drive chips enabled pirated disc backups and GameCube homebrew, and within roughly a year, unsigned native code execution was achieved. Although Nintendo repeatedly shipped patches, each attempt failed to regain control, leaving the console permanently open to homebrew.

The Xbox 360 stands in sharp contrast. Sven acknowledges that Microsoft built an exceptionally solid security architecture. Native code execution was achieved only via two isolated hardware-dependent flaws: the King Kong shader exploit and the later JTAG hack. Microsoft quickly revised hardware and patched system software to close those gaps. While Xbox 360 DVD drives were thoroughly compromised by custom drive firmware, Sven dismisses drive flashing entirely from a hacker's perspective:

> “Well, we don't care about piracy: it does not allow homebrew code, and we don't care about running code others wrote; we want to run our own code.”

The PlayStation 3 followed a completely different trajectory. Sony originally included official "OtherOS" support, allowing users to install Linux out of the box. Because Linux was officially supported, the hacker community had little incentive to attack the system's hypervisor—aside from exploring workarounds to gain hardware-accelerated 3D graphics, which Sony immediately patched out in firmware.

The turning point came when Sony launched the PS3 Slim in late 2009 without OtherOS support. Sony claimed removing Linux was necessary to cut manufacturing and engineering costs. Sven rejects this explanation as disingenuous, pointing out that Linux runs on the Slim hardware without major code alterations. Once OtherOS was stripped away, hacker interest surged. A few months later, George Hotz (geohot) released a hardware glitch exploit targeting the hypervisor, prompting Sony to retaliate by stripping OtherOS from original "fat" consoles via firmware update 3.21. That decision provoked the release of the PSJailbreak USB exploit in late summer 2010. Sven warns that by the end of their presentation, fail0verflow's newly discovered chain of software and cryptographic flaws will leave the PS3 looking just as broken as the Wii.

[05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Guest Cameo: Michael Steil on "Linux Is Inevitable"

Michael Steil (of the Xbox-Linux project) joins the stage for a cameo. Steil explains that he has spoken on console hacking at the Chaos Communication Congress for eight years running, tracking broader industry patterns and statistics. His central thesis has remained constant:

> “Linux is inevitable: either you support Linux on your hardware, or it will be hacked so it'll run sooner or later.”

Steil revisits a comparative chart he first presented three years earlier, analyzing console release dates, relative security complexity, and the duration required to achieve unauthorized execution. Historically, devices with sophisticated, multi-layered security architectures took longer to fall, whereas smaller handheld devices with constrained hardware budgets succumbed faster.

Crucially, Steil notes that with the exception of the original PlayStation, every single console hack across gaming history was driven primarily by hobbyists determined to run homebrew and Linux on hardware they purchased. Piracy was merely an inevitable byproduct of broken digital rights management and leaked signing keys, not the primary engineering motivator.

Steil then updates his historical dataset to address the PlayStation 3:

```mermaid flowchart TD accTitle: Steil's Revised PS3 Vulnerability Timeline accDescr: Flowchart illustrating the timeline shift where the PS3 went unhacked for 3.5 years under OtherOS, but fell within 12 months after Sony removed Linux.

subgraph Phase1["Official Linux Era (Nov 2006 - Fall 2009)"] A["PS3 Launches with OtherOS Support"] --> B["Hackers Satisfied Running Linux"] B --> C["Core Hypervisor Unhacked for ~3.5 Years"] end

subgraph Phase2["Closure & Retaliation (Late 2009 - Fall 2010)"] D["Sony Drops OtherOS on Slim (Sept 2009)"] --> E["geohot Hypervisor Glitch (Jan 2010)"] E --> F["Sony Revokes OtherOS on Fat PS3 (Apr 2010)"] end

subgraph Phase3["Full Compromise (Late 2010)"] G["PSJailbreak USB Exploit Appears (Aug 2010)"] --> H["fail0verflow Full Crypto Breached (Dec 2010)"] end

C --> D F --> G ```

While casual observers assumed the PS3 held out unhacked for four full years due to superior security engineering, Steil demonstrates that this conclusion is flawed. As long as Sony supported Linux, the console remained secure because the homebrew community had no reason to assault the core hypervisor. Once Sony closed the platform by withholding OtherOS on the Slim and stripping it from existing consoles, it took only twelve months for the machine to be completely broken wide open. That 12-month window matches the exact time-to-exploit trajectory seen on the Xbox 360, proving that hardware openness, rather than complex cryptography, was what kept the PS3 secure.

[09:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=555s) The PS3 Architecture: Cell Broadband Engine and Isolated SPUs

Sven returns to delve into the PlayStation 3's underlying hardware architecture, explaining how Sony designed the Cell Broadband Engine (Cell BE) in partnership with IBM and Toshiba.

The Cell processor features a heterogeneous multi-core design: 1. **Power Processing Element (PPE):** A standard 64-bit PowerPC dual-threaded core located at the foundation of the chip. 2. **Synergistic Processing Elements (SPE / SPU):** Eight independent vector processing coprocessors flanking the PPE.

Each SPU is equipped with exactly 256 kilobytes of dedicated SRAM known as Local Storage (LS). An SPU cannot directly address main system RAM; instead, it relies entirely on Direct Memory Access (DMA) transfers to move code and data between system memory and its private Local Storage.

Under normal operating conditions, the PPE has full supervisor visibility over the SPUs. The PPE can read and write directly to each SPU's Local Storage, halt instruction execution, inspect internal vector registers, and run interactive hardware debuggers.

However, IBM and Sony engineered an advanced hardware security mechanism known as **Isolation Mode** (Isolated SPU mode):

```mermaid flowchart TD accTitle: SPU Local Storage in Normal vs Isolated Mode accDescr: Comparison of SPU Local Storage memory access permissions between standard operational mode and hardware isolated mode.

subgraph Normal["Normal Mode"] N1["PowerPC (PPE)"] -->|"Full Read / Write / Debug Access"| N2["SPU Local Storage (256 KB)"] N2 -->|"DMA Access"| N3["Main RAM"] end

subgraph Isolated["Isolated Mode"] I1["PowerPC (PPE)"] -->|"Restricted Access"| I2["Mailbox / Comm Area (Green)"] I1 -.->|"BLOCKED by Hardware"| I3["Secure Code & Data (Red Area)"] I4["Hardware Decryption Engine"] -->|"Decrypts & Verifies Authenticated Binary"| I3 end ```

When an SPU enters Isolation Mode, a cryptographically authenticated and encrypted binary is fed into the processor. The hardware itself decrypts and verifies the signature of the binary before execution begins. Once isolated: - All external PPE debugging, single-stepping, and register inspection features are physically disabled by hardware logic. - The vast majority of the 256 KB Local Storage becomes completely inaccessible to the PowerPC core. - The PPE is restricted to interacting with a tiny, designated communication buffer (the mailbox area) within Local Storage.

Sony utilized this hardware isolation boundary to execute critical cryptographic operations, DRM validations, and access controls away from the rest of the system. Sven sets up the next layer of the stack: sitting above the PPE is the PlayStation 3 hypervisor, which virtualizes the hardware into distinct logical partitions to enforce system privileges.

[11:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=667s) PS3 Execution Modes and Interleaved Boot Chain

On the PlayStation 3, execution is segmented across privilege levels and processor types. The primary software layer running at Level 2 is GameOS, an operating-system kernel providing system and runtime support features for games. The games themselves execute in "problem state," the standard PowerPC user mode. Level 1 (the hypervisor) and Level 2 interact directly with the Synergistic Processing Units (SPUs) operating in isolated mode. In typical operation, a game triggers an SPU routine by issuing a hypercall up to Level 1, instructing it to load an isolated loader onto an SPU to perform cryptographic operations like decryption, though games can also execute isolated SPU tasks directly.

```mermaid flowchart TD accTitle: PS3 Privilege and Boot Architecture accDescr: Flow diagram showing the interleaved execution between PowerPC levels and isolated SPUs during the boot sequence.

subgraph PPC["PowerPC Core"] L0["Level 0: Hypervisor Mode<br/>(Bringup Code)"] L1["Level 1: Hypervisor"] L2["Level 2: GameOS Kernel"] Game["Game / Application<br/>(User Mode / Problem State)"] end

subgraph SPU["Isolated SPUs"] ML1["metldr<br/>(Isolated SPU)"] L1L["lv1ldr<br/>(Isolated SPU)"] ML2["metldr<br/>(Isolated SPU)"] L2L["lv2ldr<br/>(Isolated SPU)"] end

L0 -->|"loads"| ML1 ML1 -->|"decrypts & loads"| L1L L1L -->|"decrypts & loads"| L1 L1 -->|"loads"| ML2 ML2 -->|"decrypts & loads"| L2L L2L -->|"decrypts & loads"| L2 L2 -->|"runs"| Game ```

The boot sequence relies on an interleaved handoff between the PowerPC core and isolated SPUs. At power-on, the bootloader initializes Level 0, low-level PowerPC code running in hypervisor mode whose primary purpose is to bring up the main processor and prepare an isolated SPU. That SPU loads `metldr`, an isolated binary that in turn decrypts and runs `lv1ldr`. Once decrypted, `lv1ldr` loads the Level 1 hypervisor. Level 1 continues this multi-stage relay by bringing up another isolated SPU running `metldr` to decrypt `lv2ldr`, which finally decrypts Level 2 (GameOS) into memory. Level 2 then initializes kernel mode and launches userland games. This handoff forms an alternating chain where the PowerPC and the SPUs repeatedly call and decrypt each other's subsequent stages.

[12:32](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=752s) Security Comparison: Xbox, Xbox 360, Wii, and PS3

The security architectures of the major home consoles share several core primitives, though each platform implements them with distinct strengths and flaws. A baseline feature across modern consoles is a hidden boot ROM containing privileged initialization code. While the original Xbox embedded this boot ROM inside the external Southbridge chip, every subsequent console relocated it directly inside the main CPU silicon, making it impossible to read externally or bypass via modchip bus interception. To enforce execution boundaries, every platform relies on public-key cryptography to authenticate executable binaries before launch.

| Security Feature | Xbox | Xbox 360 | Wii | PlayStation 3 | |:--- |:--- |:--- |:--- |:--- | | Hidden Boot ROM in CPU | No (in Southbridge) | Yes | Yes | Yes | | Public-Key Cryptography | Yes | Yes | Yes | Yes | | On-Die Key Storage | No | Yes | Yes | Flawed ("doesn't work very well") | | Chain of Trust from Boot | Broken | Yes | Broken (checks only at install) | Yes | | Per-Console Unique Keys | No | Yes | Yes | Yes | | Signed Executables | Yes | Yes | No (signs whole packages) | Yes | | Dedicated Security Co-Processor | No | No | Yes (Starlet) | Yes (Isolated SPUs) | | Encrypted Disc Filesystem | No | No | Yes (Full image hash tree) | No | | Encrypted Internal Storage | No | No | Yes (NAND + HMAC-SHA1) | Yes (HDD per-console key) | | Hardware Memory Encryption/Hashing | No | Yes | No | No | | Privilege Separation Layers | None | Kernel, Hypervisor | None (All Kernel on PPC) | User, Kernel, Hypervisor | | Anti-Downgrade Hardware | None | Yes (eFuses blown on update) | No | No |

Key storage and trust verification diverge sharply across designs. While the Xbox 360 and Wii securely bury their master keys in on-die storage, the PS3's implementation is compromised by design oversights. Similarly, the Wii disrupts its own cryptographic chain of trust because its operating system checks signatures exclusively during installation rather than validating binaries dynamically at every boot. Unlike the Xbox 360 and PS3, which cryptographically sign each individual executable, the Wii validates package archives.

Dedicated security processors protect internal logic: the Wii isolates all system tasks inside an ARM-based co-processor dubbed "Starlet," while the PS3 leverages isolated SPUs. For optical media, the Wii deploys an exhaustive disc encryption scheme using a complete hash-tree structure that validates data blocks on the fly as they are read, preventing file tampering.

On the storage front, both the PS3 (internal hard drive) and the Wii (NAND flash) encrypt internal media with unique per-console keys. However, Nintendo pairs its encryption with HMAC signatures to prevent offline tampering, whereas the PS3 implements bare encryption without integrity hashing.

In terms of raw memory defense, the Xbox 360 stands alone: it actively encrypts and cryptographically hashes external bus traffic to RAM. This eliminates direct memory tapping, memory-bus glitching attacks, and rogue DMA injection into protected regions. The Xbox 360 also incorporates hardware eFuses within the CPU die; firmware updates permanently blow specific fuse banks, making hardware downgrades impossible unless an attacker compromises the boot chain before the fuse-check routine runs.

[16:55](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1015s) Flaws in PS3 Storage Encryption

Despite the PS3’s hypervisor architecture, Sony made catastrophic design blunders in its storage security. The PS3's hard drive encryption uses the identical key and initialization vector (IV) across every single disk sector without applying any cryptographic hash or authentication tag. This static construction enables a straightforward cut-and-paste plaintext oracle attack that completely compromises storage privacy:

> “They pulled off this neat trick where you can copy a file into your PS3 like a movie or something then you can find those sectors by watching what changed on the drive then you take another chunk of the drive copy it on top then read the movie back and it decrypts those sectors that you copied on top for you so you can do that to decrypt any chunk of the hard drive and since they don't verify anything and everything uses the same key and the same IV it just works so that encrypted storage is pretty much screwed up to begin with.”

By watching which raw hard drive sectors change when a known user file (such as a video) is written, an attacker identifies where the ciphertext landed. Copying arbitrary encrypted system sectors directly over that file's sectors on the raw disk and reading the file back through GameOS forces the hardware disk controller to decrypt the target data into user space.

[17:40](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1060s) The Removal of OtherOS and geohot's Memory-Bus Glitch

For years, the PS3’s native "OtherOS" capability served as an effective deterrent against exploitation: because enthusiasts could readily install and run Linux natively, security researchers lacked a compelling motive to attack the core system. That dynamic changed when Sony released the PS3 Slim and stripped OtherOS from the product line without any hardware-level technical justification. Sony's decision immediately invited intense scrutiny from the hacker community.

Taking up the challenge, George Hotz ("geohot") developed an exploit inspired by Team Twiezers' earlier Nintendo Wii memory attack. While the Wii exploit relied on a pair of tweezers to short address lines on the external RAM bus, geohot devised a hardware glitch targeting the PS3's memory bus. The attack targeted the boundary between GameOS and the hypervisor:

```mermaid flowchart TD accTitle: geohot Memory Glitch Attack Sequence accDescr: Step-by-step memory allocation race condition induced by glitching the PS3 RAM bus.

A["Allocate memory buffer in Kernel"] --> B["Hypervisor creates page mapping"] B --> C["Request hypervisor to free allocation"] C --> D["Glitch RAM bus during write cycle"] D --> E["Hypervisor marks memory page as FREE"] E --> F["Hardware write corrupted: Kernel keeps valid page table mapping"] F --> G["Request hypervisor to allocate new Virtual Address Space"] G --> H["Hypervisor allocates new Page Table inside 'free' memory slot"] H --> I["Kernel directly overwrites new Page Table"] I --> J["Map Hypervisor memory into Kernel space"] J --> K["Full Hypervisor Mode Code Execution"] ```

Normally, when the kernel requests memory, the Level 1 hypervisor creates a page table mapping, and when that memory is released, the hypervisor unmaps it to revoke access. Geohot glitched the bus during the precise memory write that invalidates the mapping. While the hypervisor believed the memory block was fully freed and returned to the system pool, the corrupted write left the kernel's translation entry intact, allowing the kernel to continue reading and writing to that raw physical RAM.

By repeatedly asking the hypervisor to allocate a new virtual address space (a new page table), the system eventually assigned that table to the unmapped block. Because the kernel could still write to that memory, an attacker could rewrite the hypervisor's page table directly, map the hypervisor's own memory segments into the kernel's space, and gain full, unconstrained execution at Level 1.

[20:05](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1205s) Sony's Retaliation and the Emergence of PS Jailbreak

Geohot’s hypervisor glitch was primarily an academic proof-of-concept. It was notoriously finicky, required intrusive hardware modifications to trigger, and produced raw hypervisor dumps that few developers at the time could utilize. However, Sony responded aggressively. Instead of ignoring the niche hardware hack, Sony pushed mandatory firmware updates that retroactively ripped OtherOS out of original "fat" PlayStation 3 consoles as well.

The team emphasizes how disastrously this move backfired. Beyond alienating everyday consumers and raising legal concerns regarding European consumer protection laws, Sony targeted the exact demographic capable of dismantling their security:

> “The worst part of this is that the people who use OtherOS are the hackers so by doing this Sony pissed off the hackers that's a really really bad idea... in other words they are so getting hacked now.”

The retaliation galvanized the scene. After a brief period of quiet underground development, the console's security collapsed in rapid succession with the commercial arrival of the PS Jailbreak USB dongle, followed immediately by an explosion of open-source clones.

[21:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1267s) The PS Jailbreak USB Stack Glitch and Vtable Overwrite

The original PS Jailbreak shocked the console security scene by granting arbitrary code execution at the Level 2 (lv2) kernel layer without hardware modifications. Under the hood, the dongle acts as a USB hub exposing several virtual USB devices to orchestrate a precise heap-grooming and memory-corruption sequence. The process focuses on four logical devices. Device 1 first delivers the exploit payload hidden inside a standard USB descriptor directly into lv2 kernel memory space, where it sits inert in data memory. Next, Device 2 is plugged in and quickly unplugged, intentionally leaving behind residual uninitialized bytes in an internal kernel allocation buffer, specifically the sequence `04 21 b4 2f`.

Device 4 then executes the critical protocol glitch. In standard USB enumeration, an operating system solves the chicken-and-egg problem of reading variable-length configuration descriptors by reading the first eight bytes to determine total length, followed by a second read requesting the complete descriptor payload. The PS Jailbreak complies during the initial eight-byte query with a valid length, but during the follow-up request, it abruptly returns a length of zero. The lv2 USB stack panics into an unhandled state: it skips copying the data while continuing forward to parse whatever stale bytes occupy the destination buffer.

The stale memory left behind by Device 2 causes the kernel to interpret `04 21 b4 2f` as a configuration descriptor with a massive declared length of `0x2fb4` bytes. When lv2 attempts to parse subsequent descriptors, it offsets forward by `0x2fb4` bytes—well beyond the allocated buffer—and lands directly inside an array of kernel C++ objects allocated by Device 3. The rogue descriptor payload overwrites the virtual method tables (vtables) of these C++ objects with pointers redirected to the payload planted earlier by Device 1. When Device 3 is unplugged, the kernel calls its destructors, branching straight into attacker code:

> “So I put this configuration descriptor right on top of C++ objects and it overwrites the vtable of C++ objects to point to the payload this V table holds function pointers for things like the destructors and some virtual methods and things like that so when these objects get destroyed um they actually run our own code so when device number three which has a bunch of crap that created these objects gets unplugged we gain lb2 code execution.”

```mermaid flowchart TD accTitle: PS Jailbreak Exploit Flow accDescr: Sequence of USB device emulation leading to lv2 kernel code execution

subgraph MemoryGrooming ["1. Memory Grooming & Glitch"] D1["Device 1: Injects Payload into lv2 Data Buffer"] D2["Device 2: Plugs & Unplugs, Leaves '04 21 b4 2f'"] D3["Device 3: Allocates C++ Object Array"] D4["Device 4: Requests Descriptor, Glitches Length to 0"] D1 --> D2 --> D3 --> D4 end

subgraph Corruption ["2. Buffer Overread & Vtable Hijack"] Parse["lv2 Parses Uninitialized Buffer as Length 0x2fb4"] Overflow["Pointer Steps 0x2fb4 Bytes into Device 3 C++ Objects"] Overwrite["Vtable Pointers Overwritten with Device 1 Payload Address"] D4 --> Parse --> Overflow --> Overwrite end

subgraph Hijack ["3. Execution Trigger"] Unplug["Device 3 Unplugged"] Destructor["Kernel Executes Destructor via Smashed Vtable"] CodeExec["lv2 Kernel Code Execution Achieved"] Overwrite --> Unplug --> Destructor --> CodeExec end ```

[24:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1455s) Structural Flaws: Absent W^X and a Hypervisor Not Built for Security

Gaining execution through this exploit exposed severe architectural design flaws in Sony's operating system and hypervisor. In modern secure systems, code execution from data buffers is prevented by Write XOR Execute ($W\oplus X$), marking memory pages as either writable or executable, but never both. Sony's lv2 kernel completely lacked $W\oplus X$ protection. Worse, the underlying Level 1 (lv1) hypervisor failed to enforce hardware-backed execution boundaries. On competing platforms like the Xbox 360, the hypervisor strictly cryptographically verifies all memory pages mapped as executable before scheduling them, ensuring that unsigned code cannot run even if lower privilege layers are breached.

On the PlayStation 3, the hypervisor acts merely as an operating system virtualization layer rather than a security monitor. When lv2 requests executable memory mappings, the hypervisor grants them blindly without checking signatures or origins. This created a catastrophic imbalance: lv1 and the isolated security SPEs remained mathematically uncompromised, yet attackers controlled lv2. Because lv2 handles filesystem access, disc mounting, and storage drivers, an attacker can simply patch lv2 to redirect game disc reads to internal or external hard drives without triggering any alarms from lv1:

> “so you can break 20% of the security and copy games which is 100% of what Sony doesn't want you to do”

- The hypervisor was engineered to isolate virtualized operating systems (like OtherOS and GameOS), not to serve as an active cryptographic enforcement wall against kernel exploits. - Patching lv2 requires zero hypervisor escalations to enable game piracy, demonstrating that Sony's security boundary placement failed to protect core business interests.

[26:20](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1580s) The Downgrade Crack via Factory Service Mode

When Sony issued firmware updates to patch the USB stack vulnerability, the underground community looked to downgrade their systems back to vulnerable versions, following the historical precedent established on the PlayStation Portable (PSP). The PS Jailbreak creators discovered Sony's built-in Factory/Service Mode (FSM), a maintenance mode used by authorized repair facilities to service consoles by booting signed code directly from external USB drives. Entering Service Mode required a specialized USB hardware key—the "jig"—that conducted a cryptographic handshake with the console.

The handshake was implemented using symmetric cryptography based on HMAC. Because lv2 had already been compromised, hackers extracted the symmetric service keys directly from kernel memory and cloned the jig dongles. Soon after, an official, signed Sony service update package was leaked to the public. By inserting a clone jig, powering on the console, and supplying the leaked service application alongside any official firmware update PUP file on a USB stick, the system flashed the firmware without validating whether the version being installed was older or newer than the firmware currently running:

> “and uh there was a service app that was signed that was leaked that lets you uh reinstall the operating system on a PS3 without any kind of downgrade check so you just use this jig then put this on a USB stick put a upgrade or an an system install file on a USB drive and it just installs that without checking if it's older or newer or anything like that and since people can downgrade back to piracy”

[27:33](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1653s) AsbestOS: Linux Restoration and Remote Hypervisor Poking

Rather than pursuing game piracy, the fail0verflow team repurposed the lv2 compromise toward their primary objective: running homebrew and restoring GNU/Linux functionality. They authored **AsbestOS**, a lightweight bootloader designed to run in place of GameOS. Because GameOS and the removed OtherOS shared nearly identical hypervisor call interfaces—differentiated only by internal hypervisor permission tables—AsbestOS successfully hijacked lv2 to bootstrap a standard Linux kernel over the local network via TFTP/NFS.

The software proved that Sony's claim that the PS3 Slim could not support Linux due to hardware differences was entirely unfounded; Linux booted on the Slim hardware without any hardware modification. To accelerate reverse engineering, fail0verflow added a network RPC debugging module into AsbestOS. This turned the PS3 into a programmable "dumb slave" managed over the network from Python scripts on an external PC:

> “and uh we also added a feature to it that lets you make your PS3 into a dumb slave that you can control from your PC and you can use this to experiment with Python scripts with uh poking the hypervisor poking the SES Reading Writing memory making hyper calls basically it's a way to experiment with PS3 and especially it security system really really quickly from a PC environment”

- AsbestOS completely displaced GameOS at level 2, proving that hypervisor virtualization boundaries could host a full Linux distribution without Sony's official OtherOS hypervisor partition. - The Python netRPC bridge allowed the team to dynamically issue hypercalls, poke memory, inspect SPE register states, and map isolated subsystem behaviors in real time from comfortable development workstations.

[28:41](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1721s) Reverse Engineering SELF Binaries and the SPU Decryption Oracle

While AsbestOS enabled Linux via the dongle-and-eject power-on sequence, the team aimed for an untethered solution: turning on the PS3 and booting straight into Linux automatically. Achieving this required understanding Sony's encrypted executable binary format: the Signed ELF (SELF). A SELF file wraps standard Executable and Linkable Format (ELF) code inside complex proprietary crypto headers containing AES keys, SHA-1 digest tables, and digital signatures.

To run a binary, an isolated Synergistic Processing Unit (SPU) loader uses a hardcoded loader key to decrypt a unique SELF encryption key embedded inside the header. This unique key decrypts the header tables, validates the ECDSA digital signature across all header metadata, and verifies the individual SHA-1 section hashes before decrypting the final executable sections into memory. If a single bit in the binary or header is altered, hash verification or signature validation fails immediately, causing the loader to abort.

Sony assumed that keeping all executables encrypted inside SELFs would hide their software implementation details and prevent vulnerability discovery. However, because fail0verflow already held PowerPC code execution inside the lv2 kernel, they could bypass the encryption math altogether. The isolated SPUs act as an indiscriminate decryption oracle: any PowerPC process can submit a SELF binary to the isolated SPU, and the hardware coprocessor will decrypt and unpack the application into system RAM without verifying who made the call. Using AsbestOS and Python automation, the team rapidly decrypted all core operating system files, revealing the entire firmware attack surface:

> “Sony's idea is yeah they can't see our code so they can't find find bucks in there well as soon as we have power PC access we can just ask the spu to nicely decrypt stuff for us and it will do so it does not do any checks on what actually asks you to decry to decrypt things so with this we just use Asbestos and some this net RPC thing write some Python scripts on the PC and use it to like decrypt application s or level two or like just about every we can decrypt just about everything now by just asking it to do it so we don't even need to know how it works we just have to ask it to do it for us but so yeah the alisation is useless”

[31:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1891s) Revocation Failures and Downgrade Exploits

The boot process begins with loaders stored in flash memory, but Sony left architectural flaws that make true firmware revocation impossible. The initial stages—bootldr and metldr—cannot be updated because bootldr is the very first code executed upon boot, while metldr loads isolated SPU binaries and is encrypted with a per-console unique key. All subsequent stages can technically be updated by Sony, and to prevent users from downgrading to older, exploitable firmware, Sony introduced revocation lists stored directly on NOR or NAND flash. Loaders check incoming binaries against this list and refuse to boot any revoked versions. However, the earliest loaders do not support revocation lists at all.

Sony attempted to work around this architectural blind spot with a two-step verification sequence: the console first loads bootldr, lv0, metldr, lv1ldr, and lv1 from flash and executes them. Once lv1 is actively running, it re-reads all of those stages from flash a second time to verify their integrity. This implementation creates an obvious physical vulnerability. By replacing the NOR flash with a multiprocessor or FPGA emulator, an attacker can feed the PS3 an older, downgraded version on the first read, and then feed it the current, expected official version on the second read. Because lv1 checks the second read and concludes it is running current firmware, execution continues smoothly. This trick allows users to downgrade the entire system, including the revocation list itself. As the speaker emphasizes: “So their revocation is useless it's just some kind of specification thing there's no revocation there so as soon as we break one loader we break it forever and we can forever own all PS3s out there.”

```mermaid flowchart TD accTitle: Dual-Read Downgrade Bypass accDescr: Diagram illustrating how emulated flash fools lv1 verification by feeding different data on first and second reads.

subgraph EmulatedFlash["Emulated Flash Memory"] R1["First Read Request"] R2["Second Read Request"] end

subgraph ExecutionFlow["Execution & Verification"] BootExec["Load & Execute Downgraded Loaders<br/>(bootldr, lv0, metldr, lv1ldr, lv1)"] VerifyExec["lv1 Re-reads Flash to Verify System"] BootSuccess["Verification Passes:<br/>Firmware Downgraded"] end

R1 -->|"Supplies Old/Downgraded Code"| BootExec BootExec --> VerifyExec VerifyExec --> R2 R2 -->|"Supplies Real/Current Code"| BootSuccess ```

[33:19](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1999s) Exploiting lv2ldr via Local Storage Buffer Overflow

The architecture isolates SPU local storage into protected and unprotected regions: red areas are accessible only by the isolated SPU itself, while green areas can be accessed by the host system. When supplying a revocation list, the data arrives signed and encrypted. Sony cannot decrypt or verify the signature in place within the unprotected shared memory, because a PowerPC thread could simply wait for validation to complete and overwrite the buffer with malicious code in a race condition. Consequently, the SPU loader must copy the revocation list into isolated local storage before processing it.

```mermaid flowchart LR accTitle: SPU Local Storage Buffer Overflow accDescr: Memory diagram showing oversized revocation list overflowing into lv2ldr code.

subgraph LocalStorage["Isolated Local Storage"] DestBuf["Destination Buffer<br/>(Revocation List)"] LoaderCode["lv2ldr Executable Code"] end

AttackerData["Oversized Revocation List<br/>(Controlled Length)"] -->|"Overwrites beyond boundary"| DestBuf DestBuf -.->|"Overflows into"| LoaderCode ```

The memory layout of lv2ldr reveals a critical vulnerability: the destination buffer for the revocation list sits immediately before the lv2ldr executable code in memory. Because the attacker controls both the source data and the length field of the revocation list, specifying an excessively large length value causes the copy operation to smash the stack and heap, directly overwriting the executable code of lv2ldr inside isolated SPU mode. The attacker can then inject code to dump the loader's encryption keys by pushing them across the bus to the PowerPC core. This allows full reverse engineering of lv2ldr.

Because the hypervisor blindly loads the revocation list from NOR flash without checking its length, putting this payload in flash makes lv2ldr execute attacker code at boot time without needing USB dongles or hardware glitches: “And this breaks the chain of trust pretty early.”

- SPU isolated memory restricts external PowerPC writes to unprotected regions, forcing internal copies. - Destination buffer placement prior to loader code permits linear buffer overflow. - Flash hypervisor fails to validate the length parameter of the revocation list. - Enables persistent, tetherless code execution at boot time and full extraction of isolated keys.

[35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) Epic Fail: The Broken ECDSA Implementation

While breaking an isolated loader compromised the chain of trust, the team promised an "epic fail" that undermined the system's foundation entirely. The focus turned to how Sony handles cryptographic signatures across the entire platform. The PlayStation 3 relies on ECDSA (Elliptic Curve Digital Signature Algorithm) to authenticate executables, hypervisor configurations, and updates. In ECDSA, security relies on the hardness of the elliptic curve discrete logarithm problem: the signature consists of two numbers, $R$ and $S$. Computing $R$ requires scalar point multiplication on an elliptic curve, an operation that cannot be reversed. The equation for calculating $S$ incorporates the private key $K$ and a per-signature nonce $m$:

$$S = m^{-1}(H(x) + K \cdot R) \pmod N$$

Under standard cryptographic requirements, $m$ must be a cryptographically secure random value generated fresh for every single signature. In proper systems—such as fail0verflow's own implementation in the Wii Homebrew Channel network update mechanism—$m$ is sourced from `/dev/urandom` on Linux. Sony, however, hardcoded a static value for $m$, using the exact same number across signatures. Segher explains the fatal mathematical flaw: “It's supposed to be a different M every time they've got three unknowns only two equations no way to solve it but now we've got only two unknowns so it's trivial to just solve for M by just you take the two the two formulas subtract whatever just a bit of formula manipulation and then you solve M and then you've got M and just fill it in and then you solve for K.”

With $m$ known, calculating the master private key $K$ reduces to basic school algebra requiring only two distinct signatures. The extracted private keys allow fail0verflow to craft digital signatures that are fully indistinguishable from official Sony signatures. This compromises lv2, revocation lists, hypervisor configuration profiles, and installation packages. While level 1 keys remain temporarily gated by isolated hardware quirks in lv1ldr, the public key cryptography across the architecture collapsed, leaving only basic user/kernel privilege separation and on-die boot ROMs.

[41:04](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2464s) Q&A: Origins of PSJailbreak and Tooling Roadmaps

During the transition to the question-and-answer period, the team notes that their live demonstration encountered display output bugs—mirroring the video issues suffered during their BootMii demonstration two years prior—and announces plans to present the demo during a lightning talk the following day. Attendees are invited to line up at microphones or visit the team in the Hackcenter.

An attendee asks whether fail0verflow knows the origin of the PSJailbreak USB dongle. The team answers that they have no confirmed origin or proof, though they suspect it originated from somewhere in the Southern Hemisphere. When asked about existing software implementations, they note that the open-source AsbestOS implementation already exists for TI OMAP processors, alongside clones and reverse-engineered payloads reproducing the USB exploit. Regarding their own ECDSA-based toolchain, the team explains that they relied on crude hacks to assemble their initial proof-of-concept, but plan to release cleaned-up, open-source signing tools within the following month.

Another attendee asks via IRC why the team cannot sign a software payload for commercial Blu-ray games now that they can sign code. The speakers explain that game executables are handled by apploader, which uses distinct keys. Because fail0verflow lacks a dump of that specific loader's plaintext, they cannot extract its corresponding keys: “So yeah you need the plaintext of the loader to get the public key and once you have the public key then that so we can't sign games and also we don't really care.”

- Live demo delayed due to display issues, rescheduled for a conference lightning talk. - PSJailbreak provenance remains unverified, suspected to hail from the Southern Hemisphere. - AsbestOS provides an open implementation of the USB stack exploit on TI OMAP chips. - fail0verflow commits to publishing public tools within a month. - Blu-ray game signing remains unsupported due to un-dumped apploader binaries, a vector the team dismisses as outside their interests.

[44:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2643s) Focus on Low-Level Access and Closing Remarks

Addressing a final question from the audience regarding game-related capabilities and piracy, the fail0verflow team firmly draws the boundary between their research and game modding. They emphasize that their motivation lies strictly in system control, homebrew, and regaining hardware ownership rather than dealing with commercial game software. One of the speakers explains their stance on running or modifying games, noting: “About games because we care about low-level access, it's probably possible eventually, but we're not planning on working on it.” For the team, once arbitrary code execution and the ability to restore Linux are established, their core mission is complete.

With no further questions from the floor, the session chair steps in to conclude the presentation. The room is given standard conference logistics—attendees exiting the hall are asked to leave toward the right, pick up any leftover trash around their seats, and hand over any lost valuables to lost and found. The landmark presentation wraps up to warm applause and music from the Chaos Communication Congress audience, celebrating one of the most significant security disclosures in console hacking history.

## Notable quotes > [05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Linux is inevitable: either you support Linux on your hardware, or it will be hacked so it'll run sooner or later. — Michael Steil

> [03:35](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=215s) Well, we don't care about piracy: it does not allow homebrew code, and we don't care about running code others wrote; we want to run our own code. — Sven

## Mentioned Sony, PlayStation 3, Nintendo Wii, Xbox 360, Xbox, Nintendo DSi, fail0verflow, bushing, marcan, Segher, Sven, Michael Steil, George Hotz (geohot), Andrew 'bunnie' Huang, Chaos Communication Congress (27C3), BootMii, Homebrew Channel, AsbestOS, PSJailbreak, Cell Broadband Engine, IBM, Toshiba, PowerPC, GameOS, OtherOS, Starlet, Linux

## Video description 27th Chaos Communication Congress 2010 held in Berlin, Germany. Authors: segher, marcan, sven and bushing — fail0verflow!

More information - http://reviews.dcemu.co.uk/synopsis-of-chaos-communication-congress-sony-s-ps3-security-is-epic-fail-350530.html

FACTS: - fail0verflow is the name of our 'group'. We are a bunch of curious hackers who have been working on a bunch of things over the last 3 years. - It did not take 4 years to crack the PS3, we only started looking at the ps3 after otheros was killed. - Note: we won't be working long-term on CFW or similar. We'll release tools and a PoC, someone else can take over. The fun part is done ;) - Our current PS3 goal: AsbestOS.pup - Our goal is to have linux running on all existing PS3 consoles, whatever their firmware versions.

------------------------- Over 70 million Wiis, over 40 million Xbox 360s and over 35 million Playstation 3s have been sold in the last few years. That makes over 145 million embedded devices out there and most of them are just used to play games. But what can you do with them if you don't like playing games? You hack them to make them run your own code of course! We're going to talk about the various hacks that you can use to gain control of your hardware and make it do what you want it to do.

2010 saw the first hacks for the Playstation 3, soon after Sony removed Other OS functionality. We will detail the operation of current PS3 exploits, show a few new ones and explain where and how Sony went wrong when designing its security system, and show how these holes can be used to gain control over the system and bring Linux back to the PS3.

We will also go over hacks for the other consoles, including the JTAG hack for the Xbox 360 which made running homebrew code more convenient, and the cat-and-mouse games that Nintendo played with us to combat Wii hacks. We might also check out the security of their 'new' handheld console - the DSi.

Gamers might find this talk interesting even though it is targeted at those who hack (or design) embedded system security. A basic knowledge of crypto is therefore assumed. We will also be present in the Hackcenter before and after the presentation for those of you who are interested in learning more about the subject.

Twitter: http://www.twitter.com/fail0verflow

[Source](https://www.youtube.com/watch?v=4loZGYqaZ7I)

中文简报

fail0verflow攻破索尼PS3安全机制以在所有机型上恢复Linux 索尼移除OtherOS功能促使研究人员对系统hypervisor发起攻击,暴露出静态加密随机数漏洞,黑客借此可计算出主私钥并永久运行未签名代码。 本次演讲回顾了第七代游戏机的安全状况,强调PS3多年来基本未被攻破仅仅是因为原生的Linux支持满足了技术爱好者的需求。在索尼撤回OtherOS功能后,研究人员对系统架构进行了剖析,利用PS Jailbreak USB堆栈溢出漏洞及自制的AsbestOS加载程序,将隔离的SPU转变为解密oracle。该团队记录了多项架构层面的疏漏,例如缺失W^X保护、未经校验的存储加密,以及lv2ldr吊销处理机制中可被利用的缓冲区溢出漏洞。最后,fail0verflow揭示了索尼致命的数学错误——在其ECDSA签名实现中复用了静态随机数——使得研究人员利用初等代数即可计算出主私有签名密钥,彻底瓦解了该平台的公钥密码学体系。 fail0verflow披露了索尼PlayStation 3安全机制中一个致命的密码学缺陷:索尼在其ECDSA实现中复用了静态随机数(m),使研究人员仅凭两个签名即可通过简单的代数计算得出主私有签名密钥。 (35:16) 该团队演示了针对隔离SPU加载程序lv2ldr的持久性开机漏洞利用,该方法通过从闪存中加载超大吊销列表来触发缓冲区溢出。 (33:19) Michael Steil与fail0verflow的历史分析表明,索尼官方移除OtherOS Linux功能的举动,直接刺激了社区在12个月内攻破该主机,而在此之前该主机已保持了三年多的安全状态。 (5:53) 研究人员推出了AsbestOS,这是一款在Level 2层级替代GameOS的自制引导加载程序,它成功在PS3硬件上引导了Linux,并揭穿了索尼关于PS3 Slim缺乏运行Linux所需硬件支持的说辞。 (27:33)

Reading summary

At the 27th Chaos Communication Congress (27C3), hacking group fail0verflow demonstrated that the PlayStation 3's security model collapsed due to severe engineering mistakes—culminating in a static nonce in its ECDSA signature implementation—triggered directly by Sony's decision to revoke Linux support. OtherOS Removal and Hacker Incentives (5:53) Guest speaker Michael Steil argued that console hacking is driven primarily by hobbyists wanting native hardware ownership and Linux support rather than commercial software piracy. For its first three and a half years, the PS3's core hypervisor remained largely unassailed because Sony provided native 'OtherOS' capabilities out of the box. Once Sony removed OtherOS from the PS3 Slim in late 2009—and subsequently revoked it from original consoles via firmware update 3.21 following George Hotz's hypervisor glitch exploit—the hacker community actively targeted the console, fully compromising its security within twelve months. Storage Vulnerabilities and USB Stack Glitches (16:55) The PS3 hardware combined a 64-bit PowerPC core with isolated Synergistic Processing Units (SPUs), but its software layers lacked basic defensive controls. Sony implemented internal hard drive encryption using identical keys and initialization vectors across all sectors without integrity hashes, allowing attackers to construct a cut-and-paste plaintext oracle using standard GameOS file transfers. Furthermore, the system lacked Write XOR Execute (W^X) controls entirely. The commercial PS Jailbreak exploit capitalized on these structural weaknesses via a USB descriptor glitch. By simulating multiple USB devices, the dongle delivered a payload into kernel memory, left uninitialized length bytes in an internal buffer, and forced a zero-byte read panic. The Level 2 (lv2) kernel erroneously read the stale length, overflowed into adjacent C++ objects, and overwrote their virtual method tables (vtables), triggering arbitrary kernel execution when device destructors executed. Software Isolation Failures and AsbestOS (24:15) Sony's hypervisor operated merely as an OS partition virtualizer rather than a strict cryptographic execution gate, granting executable mappings to lv2 without verifying code signatures. This architectural gap meant attackers controlling lv2 could modify storage drivers and patch disc reads without hypervisor escalation. Exploiting this access, fail0verflow authored AsbestOS, bootstrapping full Linux distributions over TFTP/NFS on both original and Slim models. Because the isolated SPUs lacked caller validation checks, fail0verflow turned the hardware into a universal decryption oracle. Through AsbestOS and Python scripts, the team instructed isolated SPUs to decrypt proprietary Signed ELF (SELF) files into system RAM, uncovering the operating system's internal firmware without needing to break the underlying hardware decryption keys. Loader Exploitation and Downgrade Workarounds (31:31) Sony attempted to block downgrades by distributing signed revocation lists to flash memory, verified via a dual-read routine where lv1 validated system binaries after initial boot. However, attackers could bypass this mechanism by emulating NOR flash with an FPGA, supplying older code on the first read and official current code on the verification pass. Additionally, the isolated loader lv2ldr placed the destination buffer for the flash-based revocation list immediately prior to its own executable code, allowing an oversized length field to overwrite loader memory in isolated mode and leak loader keys directly to the PowerPC core. The Static Nonce Cryptographic Collapse (35:16) The fundamental collapse of the PlayStation 3's public-key cryptography stemmed from a flawed implementation of ECDSA. Calculating signatures requires a cryptographically secure random per-signature nonce ($m$). Sony hardcoded a static value for $m$ across signatures. Because the same nonce was reused across distinct calculations, researchers solved for $m$ using basic algebra across two signatures, directly exposing Sony's master private signing key $K$. Extracting $K$ allowed fail0verflow to craft authoritative digital signatures indistinguishable from official Sony updates, permanently compromising lv2 binaries, hypervisor profiles, and update packages without hardware modifications. fail0verflow committed to releasing open-source ECDSA signing tools to enable homebrew and untethered Linux bootloaders, emphasizing that their objective remained restoring ownership and low-level system access. The team explicitly disclaimed interest in commercial game piracy, leaving retail game execution unsupported due to unextracted keys in the commercial apploader.

精炼阅读摘要

在 27C3 大会上,黑客团队 fail0verflow 披露了索尼 PlayStation 3 的底层安全与密码学缺陷,指出索尼剥离 OtherOS 支持反向促使黑客攻破系统,最终因椭圆曲线签名算法中使用静态随机数导致根私钥泄露,使整套信任链彻底瓦解。 OtherOS 移除与对抗升级的历史转折 (3:35) 在主机生命周期前三年半中,PS3 依靠官方 OtherOS 功能允许用户自由运行 Linux,使黑客缺乏攻击底层 Hypervisor 的动机,系统安全性因此长期保持稳定。嘉宾 Michael Steil 依据历年主机安全数据指出,开源系统在专用硬件上的运行具有必然性;如果厂商官方不予支持,硬件迟早会被强制攻破,盗版仅是 DRM 被破坏后的衍生副产物。索尼在 2009 年底推出 PS3 Slim 时以节省成本为由移除了 OtherOS,随后在 geohot 发布针对内存总线的硬件故障注入攻击后,索尼通过 3.21 固件更新强行在所有厚机上限时抹除该功能。fail0verflow 强调,这一举措直接激怒了具备逆向工程能力的黑客群体,促成了后续针对内核漏洞的集中攻坚与商业化 PSJailbreak 破解器的诞生。 PS3 架构短板与 USB 栈溢出利用 (9:15) PS3 基于 Cell 宽带引擎构建,包含一个 64 位 PowerPC 双线程核心(PPE)与八个协同处理单元(SPU)。SPU 具备独立的 256KB 本地存储,并在隔离模式下运行受加密签名的安全二进制文件,用于执行 DRM 校验。然而在软件执行层面上,系统缺乏现代操作系统必备的写与执行互斥(W^X)内存保护机制,且 Level 1 Hypervisor 仅被设计为系统虚拟化层,在为 Level 2 GameOS 内核分配可执行内存时并不会校验代码签名或来源合法性。PSJailbreak 便是利用了内核 USB 栈的解析缺陷:通过模拟包含四个虚拟设备的 USB 集线器,先在数据区注入载荷并布置未初始化内存标记,随后故意在读取配置描述符时返回零长度,诱使内核使用残留数据作为长度值产生向后越界,进而覆盖 C++ 对象的虚函数表(vtable)。当设备断开连接触发析构函数时,系统便直接跳转执行攻击代码,彻底接管了负责文件系统和光驱挂载的 Level 2 内核。 存储缺陷与解密预言机瓦解隔离屏障 (16:55) 除了系统架构的防御不足,PS3 在内部存储设计上也存在基础加密失误。其内置硬盘加密在所有扇区中采用了完全相同的密钥与初始向量(IV),且未附加任何密码学哈希或认证标签。攻击者只需向主机写入已知电影文件并观察变动扇区,再将系统加密扇区直接覆盖至该文件位置并读取,即可诱骗硬件控制器将任意系统扇区在用户空间中直接解密。更致命的是,fail0verflow 开发的 AsbestOS 引导程序在劫持 Level 2 后,不仅在 Slim 机型上成功恢复了 Linux 网络引导,还利用 RPC 模块将主机转变为自动化调试节点。由于隔离模式下的 SPU 加载器在接收 PPE 发来的 Signed ELF(SELF)可执行文件时不会验证调用方身份,攻击者可将隔离 SPU 作为无限制的“解密预言机”,直接提取出核心系统组件的明文代码,使索尼试图通过全盘二进制加密掩盖软件漏洞的设计完全失效。 加载器溢出与防降级机制的软硬件失效 (31:31) 索尼原本设计了基于 NOR 或 NAND 闪存的吊销列表机制以防止固件降级,但早期的 bootldr 与 metldr 加载器由于固化在硬件中或绑定主机专属密钥,本身无法更新且不支持吊销列表。系统随后采用的双阶段校验方案——先加载运行关键引导程序,再由 lv1 从闪存二次读取以验证系统完整性——被外部硬件轻易绕过。通过使用 FPGA 或微控制器模拟闪存,在首次读取时提供旧版易受攻击代码,在二次校验读取时切回应有的官方新代码,即可直接降级整机系统与吊销列表。在此基础上,fail0verflow 进一步锁定了 Level 2 加载器(lv2ldr)。由于 SPU 本地内存布局中,吊销列表的目的缓冲区紧贴着加载器的可执行代码段,且 Hypervisor 从闪存读入数据时未校验长度字段,攻击者通过构造超长吊销列表直接覆盖了隔离 SPU 中的可执行代码,从而在无须外部 USB 硬件注入的情况下实现了持久化的开机代码执行,并成功导出了加载器的专属加密密钥。 静态随机数引发的 ECDSA 根私钥崩溃 (35:16) 导致 PS3 安全体系全面崩溃的根本原因在于其椭圆曲线数字签名算法(ECDSA)实现的严重设计违规。在标准的 ECDSA 签名计算公式中,计算签名分量 S 需要引入一个对于每次签名都必须绝对独立且密码学安全的随机数 m。如果每次签名的 m 保持动态变化,方程式中的私钥 K 与随机数无法被求解;然而索尼在整个系统固件签名流程中硬编码了完全静态的 m 值。这意味着只要获取两个使用该机制生成的不同签名,原本包含三个未知数的方程组便退化为仅含两个未知数的基础线性方程。fail0verflow 仅通过初等代数变换便解出了静态随机数 m,并由此反推算出了索尼官方的根私钥 K。借助提取出的私钥,黑客能够伪造与索尼官方毫无二致的数字签名,使得整个平台赖以建立信任链的公钥密码学体系彻底失效。 fail0verflow 声明其核心研究宗旨仅在于探索底层系统控制权、恢复硬件自有权以及运行 Linux 平台,无意参与商业游戏修改或盗版传播。尽管当时由于缺乏 apploader 明文导致其工具链仍无法直接给商业蓝光游戏程序签名,但底层签名体系的全面瓦解已使索尼无法仅凭常规软件更新重构 PS3 的安全防御。

Detailed notes — zh

## Background 本视频由 YouTube 频道 1KIND Reviews 于 2010 年 12 月 30 日发布,记录了黑客团队 fail0verflow(成员包括 bushing、marcan、Sven 和 Segher)在德国柏林举办的第 27 届混沌通信大会(27C3)上的经典演讲。视频简介指出,团队在索尼移除 PS3 的 OtherOS 功能后介入研究,旨在通过公开漏洞与概念验证工具将 Linux 重新带回所有固件版本的 PS3 硬件上,且重申无意长期维护针对游戏盗版的自制固件。 ## TL;DR fail0verflow 团队首先回顾了第七世代三大主机(Wii、Xbox 360 与 PS3)的安全演变史,指出索尼剥夺 OtherOS 功能是激怒安全研究界全面介入攻防的战略昏招。随后,演讲深入剖析了 PS3 独特的 Cell 处理器、SPU 隔离模式以及交替启动链,并详细拆解了早期总线故障注入、PS Jailbreak 的 USB 协议栈越界利用与服务模式降级机制。团队进一步展示了如何利用 Asbestos 框架将隔离 SPU 沦为解密预言机,并揭露了索尼在 ECDSA 签名中因复用固定随机数导致私钥能被初等代数直接破解的“史诗级失败”,彻底粉碎了 PS3 的公钥信任链。 ## Atmosphere & style 整场演讲洋溢着极客社区特有的自信、幽默与叛逆气息,台上核心成员分工明确且配合默契,台下黑客观众互动热烈。当演讲者以冷峻犀利的技术语言拆解索尼在安全架构上的逻辑荒谬、放出经典 XKCD 漫画嘲讽 ECDSA 随机数常数化时,现场数次爆发出心领神会的雷鸣般掌声与笑声。整个过程既像是一场严谨硬核的嵌入式逆向工程学术大赏,又带着浓厚的“黑客向不公规则宣战并大获全胜”的胜利狂欢感。 ## Bulletin - [04:47](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=287s) 在 27C3 大会上,fail0verflow 团队公开了彻底击穿索尼 PlayStation 3 底层安全体系的完整漏洞链,其初衷是为抗议索尼移除 OtherOS 并重新在主机上运行 Linux。 - [35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) PS3 安全体系发生灾难性溃败的核心原因在于索尼在 ECDSA 数字签名算法中错误地复用了固定随机数(Nonce),使攻击者通过简单代数计算即可直接还原出官方私钥。 - [28:40](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1720s) 团队演示了如何将隔离模式下的 SPU 协处理器作为“解密预言机”使用,并结合撤销列表溢出漏洞,彻底实现了无需额外硬件加密狗的纯软件开机引导控制。 - [44:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2643s) fail0verflow 重申其黑客哲学仅专注于获取硬件底层访问权限与系统自由,拒绝为商业盗版或游戏运行开发任何自制固件与加载工具。 ## Key takeaways - [00:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=3s) fail0verflow 团队由曾攻破 Wii 的核心黑客组成,其目标是在全球上亿台计算设备上运行用户自己编写的代码。 - [03:35](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=215s) Wii 因硬件防护薄弱和签名比对漏洞导致全面沦陷,而 Xbox 360 凭借片内硬件级加密与熔丝防降级建立了极高的安全性。 - [04:47](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=287s) 索尼早期通过 OtherOS 允许运行 Linux,起到了安全泄压阀作用;但索尼单方面删除该功能直接激怒了黑客社区,导致防护在 12 个月内被彻底击穿。 - [09:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=555s) PS3 依赖 Cell 架构中的 PowerPC(PPE)与隔离模式 SPU(SPE)交替解密来构建引导信任链,但其硬盘加密却使用了静态同密钥和固定 IV,毫无防篡改能力。 - [18:27](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1107s) geohot 通过纳秒级电压脉冲毛刺(Glitch)导致内存页表写入失效,首次突破了 PS3 的 Hypervisor,开启了硬件攻防阶段。 - [21:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1267s) PS Jailbreak 利用了 USB 描述符二次请求时的长度突变故障,读取未初始化堆内存构造越界,劫持虚函数表实现了 lv2 内核代码执行。 - [24:09](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1449s) PS3 安全模型设计失衡,Hypervisor 盲目信任上层请求且未开启 DEP 保护,黑客仅攻破 20% 的外层安全便足以绕过底层防御实现全盘越狱。 - [25:51](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1551s) 由于工厂服务模式(FSM)采用了已被泄露的对称 HMAC 认证,且恢复程序不校验固件版本,导致索尼的防降级机制彻底失效。 - [27:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1651s) fail0verflow 开发开源项目 Asbestos 接管 lv2 并构建远程 RPC 框架,证明包括官方声称硬件不兼容的 PS3 Slim 在内的所有机型均可顺畅运行 Linux。 - [28:40](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1720s) 隔离模式 SPU 加载器在解密专有 SELF 文件时缺乏权限来源鉴权,被黑客反向利用为无需了解底层密钥算法即可批量还原明文代码的“解密预言机”。 - [31:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1891s) 系统启动链中撤销列表的双重读取机制存在严重时序漏洞,可通过微控制器外接欺骗轻易绕过固件更新限制。 - [33:19](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1999s) Hypervisor 在向 lv2ldr 传输撤销列表时未进行边界检查,超长尺寸字段引发局部存储区越界溢出,使攻击者在开机时便能接管隔离 SPU。 - [35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) 索尼在公钥体系的 ECDSA 签名中将瞬态随机数当作静态常数复用,使高强度密码学退化为二元一次方程,官方签名私钥被完整解出。 - [38:45](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2325s) 签名私钥泄露使得攻击者伪造的代码与索尼官方固件在二进制上完全等价,PS3 耗费巨资打造的多层公钥防御体系彻底化为乌有。 - [44:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2643s) fail0verflow 重申其立场:他们将公开清理后的利用工具以推广 Linux 计算生态,但绝不会开发或支持任何形式的游戏盗版应用。 ## Detailed walkthrough ### [00:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=3s) 开场调查与 fail0verflow 团队亮相 讲座在一场针对现场观众主机拥有情况的快速举手调查中拉开序幕。当主持人询问谁拥有 Wii 时,部分观众举起了手;问到 Xbox 时,主持人打趣说他们应该去读一读 Andrew "bunnie" Huang 写的书;而当问到谁拥有 PlayStation 3 时,现场举手的人数占据了压倒性的绝大多数。面对如此庞大的计算资源,fail0verflow 团队登台并由 bushing 正式开场。bushing 介绍了台上的核心成员包括 Sven、marcan 以及 Segher。他调侃称,这次由于“演讲者人数溢出”(fail0verflow 的双关语),团队的其他成员只能坐在台下第一排;这是一支由几乎遍布各大洲的黑客组成的国际化团队。 fail0verflow 团队对于 Chaos Communication Congress 并不陌生。两年前,marcan 和 bushing 曾在此分享过破解 Wii 的经历;而在三年前的 24C3(2007年),bushing 首次演示了在 Wii 上运行未签名代码;到了 2008 年,他们完成了对 Wii 安全架构的完整逆向解析,让整台机器被彻底攻破。bushing 回忆那段时光时感叹:“那真是极其有趣的几个星期。” ### [01:54](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=114s) Wii 的攻防战与自制软件生态 bushing 深入梳理了团队最知名的战绩——任天堂 Wii 的破解历史。自团队首次演示运行未签名代码以来的三年时间里,任天堂总共推出了 9 次固件更新。然而在这些更新中,有 8 次完全是捏造出来的由头,仅有 1 次更新带来了用户真正需要的功能(即从 SD 卡直接运行游戏)。其余所有的系统更新日志里所声称的“提升系统性能的后台改进”,实际上全都只是任天堂用来修补漏洞的代码掩护。 ```mermaid flowchart TD accTitle: Wii 固件更新与安全漏洞修补历史 accDescr: 展示任天堂针对 Wii 发布的 9 次更新分类,以及由哈希漏洞催生的 BootMii 与 Homebrew Channel 生态。 subgraph Updates["任天堂 9 次固件更新"] U1["1 次功能更新<br/>(支持 SD 卡运行游戏)"] U2["8 次'性能改善'更新<br/>(实际均为安全补丁)"] end subgraph Ecosystem["全球 7300 万台 Wii 的破解分布"] A["约 3000 万台硬件<br/>(修补前出厂,含哈希比对漏洞)"] B["BootMii 启动器<br/>(低级权限防砖工具)"] C["Homebrew Channel<br/>(突破 100 万独立安装设备)"] A --> B B --> C end ``` 根据 VGChartz 的统计数据,Wii 在全球售出了约 7300 万台,高居该世代主机榜首。团队估算,其中约有 3000 万台设备是在任天堂修复团队披露的签名哈希比对漏洞之前出厂的。拥有这些主机的用户非常幸运,能够安装并运行 fail0verflow 编写的替代性 Bootloader——BootMii。bushing 指出,破解 Wii 最大的阻碍并不是其防护强度,而是软件架构本身的脆弱性:“对我们而言,在 Wii 上进行黑客攻击最大的挑战其实不是它的防护,而是这台机器太脆弱了,软件极度脆弱,而且有着极多意外变砖的途径,变砖后却根本没有办法修复。”因此团队花费大量心力打造了能够救砖的 BootMii。截至当年 9 月,Homebrew Channel(自制软件频道)的独立用户量已突破 100 万,占到了全球 Wii 用户总数的 1% 以上。 ### [03:35](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=215s) 三大主机安全态势横向对比 团队成员随后接棒,横向对比了第七世代三大主机的安全演变史:2006 年底发布的任天堂 Wii、早一年上市的微软 Xbox 360,以及与 Wii 大致同时期推出的索尼 PS3。Wii 从一开始就伴随着直读芯片(Drive Chips)的泛滥,不仅能运行盗版游戏,还能运行 NGC 的自制软件;一年后机器被彻底攻破,任天堂屡次尝试修复却屡战屡败,最终彻底沦陷。 相比之下,Xbox 360 拥有极为出色的硬件安全体系。在其生命周期中仅出现了两次重大破解事件:两三年前演示的 King Kong(金刚)漏洞以及后来的 JTAG 漏洞。然而这两处漏洞微软都能通过硬件改版与更新迅速封堵。虽然 Xbox 360 的光驱固件被彻底破解导致盗版横行,但 fail0verflow 明确重申了黑客立场:他们对盗版毫无兴趣,光驱破解既不能运行自制代码,也违背团队初衷。他们唯一的目的,是在属于自己的硬件上运行自己编写的代码。 - **Wii**:安全防护薄弱,从光驱直读到系统内核被全面攻陷,安全防线彻底崩溃。 - **Xbox 360**:安全架构优秀,系统漏洞极少(仅 King Kong 与 JTAG 曾突破),微软修复及时;光驱虽被刷写固件,但不具备自制软件执行能力。 - **PlayStation 3**:早期因官方原生支持 OtherOS(Linux)安装,黑客社区缺乏破解动力;索尼后续自断后路,最终引发全面安全崩塌。 ### [04:47](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=287s) PS3 OtherOS 的消亡与全面宣战 PlayStation 3 的遭遇则尤为特殊。早期索尼在系统中直接提供了 OtherOS 功能,允许用户在主机上安装运行 Linux 系统。由于该功能已经满足了极客运行自制代码的需求,黑客社区多年来从未对 PS3 的安全系统发起全面攻击。唯一的缺憾是 OtherOS 下无法调用硬件 3D 加速功能,但当有人找到绕过限制的方法后,索尼立刻推送固件更新予以封杀。即便如此,早期黑客仍旧保持了克制。 转折点出现在 PS3 Slim 薄机型的发布。索尼以“削减制造成本”为借口彻底去除了 OtherOS 支持。但黑客团队指出这纯属谎言,因为后来证实 Linux 根本不需要对代码做出重大修改就能在 Slim 上运行。真正点燃战火的是 2010 年黑客 geohot 尝试攻破 PS3 的 Hypervisor(虚拟机监控器)后,索尼作出了极其过激的反应——通过固件更新强行抹杀了厚机型上的 OtherOS。紧接着,PSJailbreak 商业破解狗横空出世。fail0verflow 警告称,随着他们在本次大会上公开的一系列全新底层漏洞,PlayStation 3 最终的下场注定会变得和 Wii 一模一样,彻底不设防。 ### [05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Michael Steil 的定律:Linux 必然降临 长期从事主机体系结构分析的黑客老将 Michael Steil 登台客串。他回顾了过去八年在各类安全会议上关于主机破解的统计数据,总结出一条铁律:“Linux 是不可避免的;你要么在你的硬件上主动支持 Linux,要么它就会被黑掉,好让 Linux 迟早能跑上去。” ```mermaid flowchart LR accTitle: 索尼对待 Linux 策略转变对 PS3 破解周期的影响 accDescr: 展示 PS3 在 OtherOS 存在期与被官方移除后,系统被黑客攻破所需时间的巨大差异。 subgraph OpenEra["开放时期 (2006 - 2009)"] A["官方支持 OtherOS (Linux)"] --> B["极客需求得到满足<br/>无安全攻防动力"] B --> C["系统保持 3-4 年未被破解"] end subgraph ClosedEra["封闭时期 (2009 - 2010)"] D["移除 Slim 与厚机 OtherOS"] --> E["黑客全面介入安全研究<br/>集中突破 Hypervisor 与硬件"] E --> F["仅耗时 12 个月<br/>安全体系全面崩溃"] end OpenEra -->|"索尼主动剥夺功能"| ClosedEra ``` Steil 展示了一张三年前整理的主机安全攻防演进图表,图表用红色的深浅代表硬件安全系统的复杂程度。纵观历史,绝大多数主机被攻破的唯一动机都是为了运行自制程序和 Linux,而盗版游戏往往只是伴随系统权限完全沦陷而出现的副产品。PS3 过去被认为拥有极其复杂的硬件隔离体系,历经四年看似固若金汤;但 Steil 犀利地指出,如果将此前拥有 OtherOS 的 PS3 视作一个未被闭锁的平台,那么从索尼彻底封闭系统、剥夺 Linux 功能的那一刻算起,黑客攻陷 PS3 仅仅耗费了 12 个月的时间——这一破解速度与架构同样精密的 Xbox 360 完全一致。 ### [09:15](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=555s) Cell 处理器与 SPU 隔离运行机制 讲台交回 fail0verflow 成员,正式切入 PS3 的底层硬件架构解析。PS3 采用了索尼联合 IBM 开发的 Cell 宽带引擎(Cell Broadband Engine,简称 Cell 处理器)。该处理器的核心由一个 64 位的 PowerPC 核心(PPE,PowerPC Processing Element)以及 8 个协处理器(SPE/SPU,Synergistic Processing Element)构成。SPU 本质上是拥有极高运算吞吐能力的向量处理器。 每个 SPU 仅配有 256 KB 的本地存储器(Local Storage,简称 LS)。该内存无法直接寻址外部系统物理内存,必须通过 DMA(直接内存访问)方式与主存进行数据传输。索尼将这种硬件特性构建为其安全架构的基石: - **普通模式(Normal Mode)**:PowerPC 核心对 SPU 的本地存储器拥有完全的读写控制权,开发者甚至可以从 PowerPC 端挂载调试器,暂停 SPU 并单步监控、检查每一个寄存器的内部状态。 - **隔离模式(Isolation Mode)**:当开启隔离模式时,SPU 仅加载经过硬件解密与签名验证的认证二进制文件。此时,硬件逻辑会自动锁死本地存储器,外部所有调试接口被硬件级切断。在外部 PowerPC 核心看来,除了保留用于与主处理器通信的一小块极窄缓冲区外,其余绝大部分内存区域都被硬件完全封锁,仅允许 SPU 内部访问。索尼借此在隔离模式的 SPU 中隐藏核心解密逻辑与敏感操作,阻止外界探查。 在系统软件层面,PS3 在最高特权级运行着 Hypervisor,负责对底层的硬件资源进行切片,并虚拟化出多个逻辑分区(Logical Partitions)。 ### [11:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=667s) PS3 复杂的引导链:PowerPC 与 SPU 的交替接力 演讲者首先梳理了 PS3 系统启动运行的深层架构。在正常运行状态下,运行在内核态(Level 2)的是 GameOS,它提供支持游戏运行的各项核心系统功能;而游戏本身则运行在非特权级的用户态(PowerPC 术语中的 Problem State)。Level 2 和 Hypervisor(Level 1)均可与处于隔离模式(Isolation Mode)下的 SPU(协同处理器)进行通信。常规流程中,游戏会通过 Hypercall 调用 Level 1,请求其向 SPU 加载特定的加载器来进行数据解密,不过游戏自身其实也有能力发起这类加载。 在引导流程(Boot Process)上,演讲者纠正了幻灯片上的一个小笔误,指出最底层实际上是由 Bootloader 启动。Bootloader 首先加载运行在 Hypervisor 模式下的 PowerPC 代码——Level 0;Level 0 的唯一目的就是唤醒 PowerPC,并拉起一个处于隔离模式的 SPU 运行 `metldr`(Meta Loader),接着由 `metldr` 解密并加载 `lv1ldr`(Level 1 Loader)。这些加载器都是独立的隔离二进制文件,专门用于逐级解密后续模块。随后,系统加载 Level 1,再拉起另一个 SPU 运行 `metldr` 以加载 `lv2ldr`,最终由 `lv2ldr` 解密并加载在特权级内核态运行的 Level 2(GameOS)。幻灯片中用红色标示 SPU 代码、蓝色标示 PowerPC 代码,清晰展现了两种不同架构的处理器在引导链中如同编织般交替调用、环环相扣的过程。 ```mermaid flowchart TD accTitle: PS3 启动信任链交替引导流程 accDescr: 展示 Bootloader、PowerPC 与隔离模式 SPU(metldr)交替解密各级 Loader 和操作系统的流程。 subgraph Phase1 ["第一阶段:底座引导"] BL["Bootloader"] LV0["Level 0 (PowerPC / Hypervisor 模式)"] end subgraph Phase2 ["第二阶段:Level 1 加载"] MET1["metldr (SPU 隔离模式)"] LV1L["lv1ldr (SPU 隔离模式)"] LV1["Level 1 (Hypervisor)"] end subgraph Phase3 ["第三阶段:Level 2 与游戏加载"] MET2["metldr (SPU 隔离模式)"] LV2L["lv2ldr (SPU 隔离模式)"] LV2["Level 2 / GameOS (PowerPC 内核模式)"] GAME["游戏应用 (Problem State / 用户态)"] end BL --> LV0 LV0 --> MET1 MET1 --> LV1L LV1L --> LV1 LV1 --> MET2 MET2 --> LV2L LV2L --> LV2 LV2 --> GAME ``` --- ### [12:32](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=752s) 主流主机安全体系横向对比:设计得失与致命缺陷 演讲者对四款代表性主机(Xbox 初代、Xbox 360、Wii 和 PS3)的安全特性展开了全面横向对比: | 安全特性 | Xbox 初代 | Xbox 360 | Wii | PS3 | 架构实现与技术缺陷解析 | |:--- |:---: |:---: |:---: |:---: |:--- | | **隐藏 Boot ROM** | 南桥芯片 | CPU 内部 | CPU 内部 | CPU 内部 | 现代主机全置于片内,无法从外部物理读取,彻底防御 Modchip 替换。 | | **公钥密码学** | ✔ | ✔ | ✔ | ✔ | 用于对系统执行的所有底层代码进行数字签名与身份鉴别。 | | **片上密钥存储 (On-Die Key)** | ✘ | ✔ | ✔ | ⚠️ | 将密钥深埋芯片内部防止总线窥探。PS3 虽有该设计但实现存在缺陷。 | | **完整信任链 (Chain of Trust)** | ✘ | ✔ | ✘ | ✔ | Wii 仅在安装阶段校验代码,运行时不再验证,导致其信任链名存实亡。 | | **单机唯一密钥 (Per-Console Key)** | ✘ | ✔ | ✔ | ✔ | 用于加密绑定单台设备的内部文件、工单(Tickets)与私有资源。 | | **可执行文件签名验证** | ✔ | ✔ | ✘ (包签名) | ✔ | Wii 仅对外部封包签名;其余主机均严格强制底层可执行文件级签名。 | | **独立安全协处理器** | ✘ | ✘ | ✔ (Starlet) | ✔ (SPU/CURB) | 通过物理或逻辑隔离的处理器处理密钥与解密,防止漏洞横向蔓延。 | | **整盘签名与加密** | ✘ | ✘ | ✔ (哈希树) | ✘ | Wii 采用巧妙的 Merkle Hash Tree 架构,读取光盘时实时校验每个资源。 | | **存储加密与防篡改** | ✘ | ✘ | ✔ (AES + HMAC) | ⚠️ (仅 AES) | PS3 硬盘采用静态全盘同密钥加密;Wii 额外附带 HMAC 防篡改签名。 | | **内存总线加密与哈希防篡改** | ✘ | ✔ | ✘ | ✘ | Xbox 360 独占特性,内存全程硬件加密与哈希,彻底封杀总线嗅探与故障注入。 | | **特权分级执行环境** | ✘ | 内核 / Hypervisor | 仅内核级 | 用户 / 内核 / Hypervisor | PS3 实现了完整的三层特权隔离;Xbox 360 与 Wii 均无用户态。 | | **硬件熔丝防降级 (eFuses)** | ✘ | ✔ | ✘ | ✘ | 固件升级时硬件烧断片内熔丝,只要信任链未破,物理上绝对无法降级。 | 针对 PS3 的硬盘加密,演讲者特意揭露了其滑稽的安全缺陷:PS3 虽然对硬盘进行了整盘加密,但每个扇区居然使用一模一样的密钥和完全相同的静态 IV(初始化向量),并且没有任何哈希完整性校验。黑客只需向 PS3 拷贝一个已知文件(如一部电影),通过监测硬盘变化定位该文件的写入扇区;然后把硬盘上想要解密的目标扇区直接覆盖拷贝到该位置;最后让系统把该“电影”读取出来——PS3 就会自动用这套固定密钥将目标扇区解密并吐出明文。演讲者讽刺道,这种设计使得 PS3 所谓的加密存储“从一开始就已经彻底完蛋了”。 --- ### [17:40](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1060s) 移除 Other OS:索尼最大的战略昏招与黑客的激怒 演讲者指出,PS3 最初之所以能维持长达数年未被彻底攻破的“金身”,很大程度上归功于其官方支持的 Other OS 功能。Other OS 允许技术极客和开发者在主机上自由安装运行原生 Linux。正如演讲者所言: > “我非常确信它起到了威慑作用,因为大家既然已经能够运行自己的代码了,何必还要去费劲破解它呢?” 然而,索尼在推出 PS3 Slim(薄机)时做出了一个极具争议的商业决策:强行删除了 Other OS 功能。演讲者强调,现在大家已经很清楚,PS3 Slim 在硬件技术上完全不存在无法支持 Linux 的限制,这纯粹是出于市场策略或者某个索尼管理层拍脑袋的决定。但这个举动无异于捅了马蜂窝——它瞬间把全球安全研究人员和黑客的目光聚焦到了 PS3 的安全性上。 为了逼迫所有人就范,索尼随后甚至通过固件升级,将厚机(原版 PS3)上的 Other OS 功能也一并强行剥夺。台下观众随即爆发出热烈的掌声与嘲弄的笑声。演讲者尖锐地指出,这种单方面剥夺售出硬件原有功能的做法极有可能违反了欧洲的消费者权益保护法;而索尼犯下的最致命错误在于:全世界会去使用 Other OS 的人,恰恰就是那帮黑客。通过这一举措,索尼亲手激怒了最不该激怒的人群。演讲者毫不留情地断言: > “换句话说,他们这下彻底死定了,绝对会被黑得体无完肤。” - Other OS 在长达数年的时间里实际上扮演了防御黑客攻击的“安全泄压阀”,满足了极客自制代码的需求。 - 索尼单方面通过系统更新剥离厚机 Other OS 功能,直接将原本只求运行 Linux 的技术爱好者推向了逆向攻防的对立面。 --- ### [18:27](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1107s) geohot 的脉冲故障注入与 PS3 越狱时代的开端 在 Other OS 被移除后不久,著名黑客 geohot(George Hotz)打响了反击的第一枪。演讲者回顾了他们当年在 Wii 上的首个硬件破解——“镊子攻击”(通过用镊子短路 RAM 地址线产生总线毛刺,突破内存访问权限);而 geohot 在 PS3 上采用了几乎如出一辙的思路:内存总线故障注入(Glitch Attack)。 在 PS3 架构中,Hypervisor 与内核共享同一块物理内存,由 Hypervisor 牢牢掌控页表,以分配内核的访问权限。当内核申请内存时,Hypervisor 会建立页表映射;当内核释放内存时,Hypervisor 会抹除映射以吊销访问权。geohot 精准把握了 Hypervisor 抹除映射写入操作的纳秒级瞬间,向内存总线施加电压脉冲毛刺(Glitch),导致该次写入失效。结果造成了一种致命的内存状态不一致:Hypervisor 以为该内存块已被彻底释放,但内核端的页表条目却依然残留着对该内存块的完全读写权限。随后,攻击者只需请求 Hypervisor 分配一个新的虚拟地址空间(即创建一个新页表),一旦这个新页表恰好落在刚才那块未被彻底抹除的“幽灵内存”中,黑客就能通过残留的映射随意篡改 Hypervisor 自身的页表。而一旦能改写页表,就能直接映射并劫持 Hypervisor,从而获得最高执行权限。 演讲者客观评价道,geohot 的漏洞利用更偏向于一种“学术性质的攻击”(Academic Hack)。它不仅需要极其繁琐且昂贵的外部硬件辅助,成功率也十分不稳定;更关键的是,即便成功 Dump 出了 Hypervisor 固件,当时圈内甚至没人清楚该拿它干什么。但索尼对此反应过度,进一步封杀 Other OS,彻底激化了矛盾。在此之后,破解圈沉寂了一段时间,暗流涌动下,有人在幕后开发出了划时代的 USB 漏洞硬件——PSGroove 与 PS Jailbreak,以及随后席卷全球的各种仿制克隆设备,正式揭开了 PS3 全面失守的序幕。 ### [21:07](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1267s) PS Jailbreak 的 USB 漏洞利用原理 PS Jailbreak 是一款能够让用户在 lv2 内核级别及更高权限运行自制代码的硬件装置,其核心机制在于一个极其精妙的 USB 协议栈漏洞。在物理层面上,它是一个把自己伪装成 USB Hub 及其后连接的多个虚拟 USB 设备的硬件插头。在整个利用链路中,最关键的是所谓的 1 号设备和 4 号设备。首先插入的 1 号设备主要负责投递有效载荷(Payload):它将一段 Shellcode 作为 USB 信息描述符的一部分直接写入 lv2 内核内存中,该载荷进驻内存后暂时处于休眠状态;紧接着,真正的“魔法”在 4 号设备加载时爆发。 4 号设备包含多个配置描述符。在操作系统读取 USB 描述符时,存在一个经典的“先有鸡还是先有蛋”的问题:系统必须知道描述符的总长度才能读取它,但长度本身却写在描述符内部。标准 USB 协议的解决方式是先读取开头的 8 个字节,从中解析出实际总长度,随后再发起第二次请求将完整数据拉取出来。PS Jailbreak 利用这一点打出了一个精巧的时间差故障(Glitch):在系统读取前 8 字节时,它返回正常的配置长度;但在系统发起第二次请求读取整个描述符时,它却恶意返回长度 0。这一突变导致 lv2 的 USB 驱动代码发生逻辑错乱,因为误认为长度为 0 而完全没有将新数据拷入目标缓冲区。 荒谬的是,lv2 紧接着却尝试去解析那块根本没有被实际写入的描述符内存,导致它读取的是一段未初始化的脏内存。而在那块内存中残留的数据,恰恰是由此前插入并拔出的 2 号设备预先精心布局好的。在这段未初始化内存的末尾存在四个特定字节:`04 21 b4 2f`。当 lv2 将其作为配置描述符进行解析时,会误认为该描述符长度高达 `0x2FB4` 字节。这一巨大的长度直接击穿了原本的蓝色缓冲区;随后驱动试图加载第 3 项配置,根据这个伪造的长度向后大幅跳转,直接跨界写入了属于 3 号设备的 C++ 对象数组。这次越界彻底覆盖了该 C++ 对象的虚函数表(vtable),将其中的虚析构函数指针直接重定向至最初 1 号设备布下的 Payload 地址。最终,当包含大量构造对象的 3 号设备被触发“拔出”时,内核调用析构函数清理对象,瞬间触发了任意代码执行,攻击者从而一举拿下了 lv2 内核控制权。 ```mermaid flowchart TD accTitle: PS Jailbreak Exploit Flow accDescr: PS Jailbreak exploit steps showing USB glitch and vtable overwrite subgraph Step1 ["1. 载荷注入与内存塑形"] D1["设备 1 (Payload)"] -->|"写入描述符"| BUF["lv2 内核内存"] D2["设备 2"] -->|"插入并拔出"| DIRTY["留下脏数据: 04 21 b4 2f"] end subgraph Step2 ["2. 描述符长度故障与越界"] D4["设备 4"] -->|"初次返回正常长度,二次返回 0"| GLITCH["触发 USB 协议栈 Glitch"] GLITCH -->|"未写入新数据,直接解析脏内存"| OVERFLOW["识别伪造长度 0x2FB4 并发生越界"] end subgraph Step3 ["3. 虚表劫持与控制权获取"] OVERFLOW -->|"覆盖设备 3 的 C++ 对象数组"| VTABLE["劫持 vtable 析构函数指针至 Payload"] VTABLE -->|"拔出设备 3 触发 Destructor"| CODE_EXEC["获得 lv2 内核代码执行权限"] end Step1 --> Step2 Step2 --> Step3 ``` - 设备 1 充当 Payload 运载工具,将代码写入内核缓冲区备用。 - 设备 2 负责对未初始化堆内存进行“风水调整”(Heap Feng Shui),留下用于构造溢出长度的魔数 `04 21 b4 2f`。 - 设备 4 利用 USB 描述符读取过程中的二次应答差错,迫使内核读取包含 `0x2FB4` 的未初始化内存。 - 伪造的超长描述符跨越缓冲区边界,精准覆盖 3 号设备 C++ 对象的虚方法表(vtable)。 --- ### [24:09](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1449s) 荒谬的隔离体系:攻破 20% 安全即溃退 100% PS Jailbreak 方案被公布后,迅速引发了社区的逆向分析与疯狂克隆。但演讲者指出,这一漏洞之所以能造成如此灾难性的后果,根源在于索尼 PlayStation 3 整体安全架构的荒谬设计。在现代操作系统安全防护中,“数据不可执行”(W^X 或 DEP)早已是行业标准解决方案,但索尼在 lv2 内核中竟然完全没有开启这一保护,允许直接从数据内存执行代码。更致命的是位于其底层的 Hypervisor(虚拟机监控器,lv1)对此毫不知情:Hypervisor 会对上层请求全盘照收,毫无保留地将任何请求的内存页映射为可执行属性。 这种设计与微软 Xbox 360 的安全机制形成了尖锐对比。Xbox 360 的 Hypervisor 会对每一个请求映射为可执行状态的内存页面进行严格的数字签名比对,从根源上确保唯有经过官方签名的代码才能运转。而 PS3 的 Hypervisor 本质上只是为了对操作系统进行虚拟化隔离而生,完全不具备安全防御考量,形同虚设。演讲者犀利地总结道,整个 PS3 安全体系最大的笑话在于:攻击者完全不需要动摇底层的 Hypervisor,也不需要触碰安全的隔离协处理器 SPU,仅仅拿下 lv2 就足以实现全盘盗版。 > “So you can break 20% of the security and copy games, which is 100% of what Sony doesn't want you to do.” 只需修改 lv2 内核,便能欺骗系统让其直接从内置硬盘挂载并运行游戏镜像,而下层的 lv1 和安全 SPU 对此根本不闻不问。这使得索尼耗费巨资打造的多层安全防御体系变得极其滑稽——他们严防死守的深层结构没有失守,却在最容易被攻击的浅层失掉了最重要的商业底线。 --- ### [25:51](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1551s) 索尼的修补与工厂服务模式(FSM)降级漏洞 面对市面上泛滥的 USB 越狱狗,索尼迅速推送了新版固件修复了 USB 协议栈中的解析漏洞。正如当年在 PSP 破解社区所上演的历史一样,官方修补漏洞后的第一反应必然是:玩家和黑客们开始寻找降级(Downgrade)回旧版本固件的方法。而这场博弈中率先撕开缺口的,依旧是开发 PS Jailbreak 的原班团队。 他们盯上了索尼官方在售后维修中心使用的“服务模式”(Factory Service Mode,简称 FSM)。该模式允许技术人员将 PS3 置入一种特殊调试状态,从而无需常规校验即可从 USB 闪存盘直接运行经过签名的恢复代码。进入服务模式需要使用专用的维修加密狗(Jig)与主机进行握手认证。然而令人大跌眼镜的是,索尼在这套认证体系中并没有采用非对称加密,而是使用了基于对称密钥的 HMAC 认证机制。 - 随着此前 lv2 权限的彻底失守,黑客们早已直接从主机内存中 Dump 出了所有用于握手的对称密钥。 - 掌握密钥后,社区迅速克隆出了民间的 Service Jig 装置,使普通设备也能诱骗 PS3 进入服务模式。 - 与此同时,索尼内部泄漏出了一个带有官方签名的系统恢复 App(Service App)。 - 该恢复程序在从 USB 安装系统固件(PUP)时,根本不会检查固件版本究竟比当前系统更新还是更旧。 - 最终结果是,用户只需插上自制 Jig 触发认证,配合含有泄漏恢复程序的 U 盘,就能毫无阻碍地刷入任意旧版本固件,再次回到允许运行盗版的低版本系统。 --- ### [27:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1651s) Asbestos 与 PC 端远程控制框架 fail0verflow 团队明确表示,他们对利用这些漏洞去搞游戏盗版毫无兴趣,他们的初衷是为了将索尼剥夺的 Other OS(Linux 支持)夺回来。依托 PS Jailbreak 打开的 lv2 突破口,团队开发了名为 Asbestos 的开源项目,其主要目的是彻底取代原有的 GameOS 内核,将其改造成真正的自由系统加载器。 在系统架构上,GameOS 和被移除的 Other OS 共享完全相同的底层 Hypervisor 接口,二者唯一的区别仅在于权限掩码的划分。Asbestos 接管 lv2 后,能够直接通过网络引导(TFTP/NFS)或本地介质加载标准 Linux 内核。这一尝试带来了一个极具讽刺意味的技术实证:即便是索尼声称“由于架构调整从出厂就完全不支持 Other OS”的超薄版 PS3 Slim,在注入 Asbestos 后也毫无障碍地顺畅运行起了 Linux。这彻底戳穿了索尼官方所谓的“硬件限制”借口,证明超薄机型不支持 Linux 纯粹是索尼单方面的商业封杀。 不仅如此,fail0verflow 还在 Asbestos 中内嵌了一个网络 RPC(远程过程调用)调试引擎。这一工具将 PS3 彻底变成了一台听命于 PC 的“哑奴设备”(Dumb Slave)。安全研究员可以在电脑上编写简单的 Python 脚本,通过网络实时向 PS3 发送指令,进行极其灵活的底层探查: - 自由读写整机任意物理与虚拟内存段; - 随意向 Hypervisor 发起未经验证的 Hypercall 探测潜在漏洞; - 直接向隔离 SPU 协处理器发送自定义请求并观察其反馈; - 无需每次编译固件和烧录,将 PS3 底层安全架构的逆向与攻击周期缩短至几秒钟。 --- ### [28:40](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1720s) 逆向 SELF 格式与将 SPU 沦为解密预言机 虽然通过注入硬件 Jig 配合开机按 Eject 键的骚操作已经拿到了 lv2 权限,但 fail0verflow 对这种繁琐的物理外设入侵并不满意。他们的终极目标是实现纯软件的完美破解——只要按下电源键开机,系统就能无缝启动进入 Linux。为了达成这个目标,黑客必须搞清楚索尼可执行文件(ELF/SELF)的底层加密与签名验证机制。 索尼构建其专有二进制格式 SELF(Signed ELF)的方法,是在标准 ELF 文件外部包裹上一套复杂的加密与完整性元数据头。每个运行在隔离 SPU(Isolated SPU)内部的安全加载器都内置有专属的 Loader Key,用于解密每个文件独有的 SELF Key。该 SELF Key 随后被用于解密头部剩余的元数据区;一旦头部被还原,加载器便会启动 ECDSA 数字签名校验,确保整个头部未被篡改。在头部之中,还包含着一张由 AES 密钥和 SHA-1 哈希值构成的映射表,专门用于对拆分后的各个程序段(Program Headers)进行解密与校验。哪怕整个 SELF 文件中仅有单个 Bit 遭到修改,都会因为 SHA-1 哈希失配或签名验证失败而导致加载立即中断。 ```mermaid flowchart LR accTitle: SELF File Structure and SPU Decryption Oracle accDescr: Structure of Sony SELF files and how fail0verflow used Isolated SPU as a decryption oracle via PC scripts subgraph SELF ["SELF 文件封装结构"] direction TB LKEY["Loader Key"] -->|"解密"| SKEY["SELF Key"] SKEY -->|"解密元数据"| META["头部元数据 (蓝/绿区)"] META -->|"验证签名 & 提取"| TABLES["AES 密钥表 & SHA-1 哈希表"] TABLES -->|"校验并解密"| ELF["真实原始 ELF 代码段"] end subgraph Oracle ["SPU 预言机攻击"] direction TB PC["PC 端 Python 脚本"] -->|"网络 RPC"| ASB["Asbestos (lv2)"] ASB -->|"PowerPC 系统调用"| SPU["隔离 SPU 加载器"] SPU -->|"无权限源校验,自动解密"| RAW["吐出明文 ELF 数据"] end SELF -.->|"送入"| Oracle ``` 索尼企图通过这种高强度的全盘加密,让外界完全无法逆向分析其核心系统组件与游戏二进制代码,从而隐藏底层漏洞。然而,这套自诩坚不可摧的黑盒防御却在一个致命的逻辑缺陷面前轰然崩塌:运行在隔离 SPU 中的解密服务,根本不会去校验“究竟是谁在向它发出解密请求”。 既然 fail0verflow 团队已经通过 Asbestos 掌握了 PowerPC 主处理器的执行权限,他们根本不需要大费周章地去破解底层的密钥算法。他们只需要通过 PC 端运行 Python 脚本,指挥 PS3 将需要解密的系统模块(如 lv2 内核镜像或各类系统应用)一股脑塞给 SPU,命令它执行标准的解密流程,SPU 便会乖乖地将解密后的完整明文 ELF 数据吐出来。 > “So the obfuscation is useless... we can decrypt just about everything now by just asking it to do it so we don't even need to know how it works, we just have to ask it to do it for us.” 这种将硬件安全协处理器降格为“解密预言机”(Decryption Oracle)的手法,彻底粉碎了索尼的代码混淆防护。通过从解密出的明文二进制中提取更多信息,fail0verflow 团队将目光投向了索尼安全信任链的核心——公钥签名体系,为最终彻底摧毁 PS3 的加密防线拉开了序幕。 ### [31:31](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1891s) 降级防线与撤销列表机制的失效 演讲者首先深入剖析了 PlayStation 3 的启动链与更新机制。在整个启动链中,有两个核心组件是索尼无法通过固件进行常规更新的:Boot Loader 与 Metloader。Boot Loader 是整台机器加电后运行的第一个程序,而 Metloader 则负责加载运行在隔离模式下的 SPU(Synergistic Processing Unit)二进制文件。由于它们使用每台主机独一无二的控制台特定密钥加密,索尼无法在后续更新中替换它们,但链条中的其余组件都可以更新。 为了阻止用户降级系统固件,索尼在 NOR 或 NAND Flash 中引入了撤销列表(Revocation List)。每当加载器尝试载入某个二进制文件时,都会先比对撤销列表,一旦发现该版本已被列入黑名单,系统便会直接拒绝启动。然而,处于链条最顶端的早期组件由于根本不支持撤销列表,导致索尼不得不采用了一套设计欠妥的双重读取方案:系统首先从 Flash 读取 Boot Loader、lv0、Metloader、lv1ldr 以及 lv1 并直接运行;随后,当 lv1 启动后,它会把之前的所有组件再次读取一遍以进行完整性校验。这种机制存在严重漏洞——攻击者只要拆下 NOR 芯片并换上微控制器进行欺骗,在系统第一次读取时提供旧版固件,而在第二次校验读取时提供当前合法版本,机器就会误以为正在运行合法系统并继续引导。这意味着撤销列表本身也能被随意降级。 针对这一设计上的严重缺陷,演讲者直接断言: > “So their revocation is useless, it's just some kind of specification thing, there's no revocation there: so as soon as we break one loader, we break it forever and we can forever own all PS3s out there.” ```mermaid flowchart TD accTitle: PS3 Dual-Read Downgrade Bypass accDescr: Diagram showing how a microcontroller feeds different firmware versions during the two read cycles to bypass revocation checks. subgraph Hardware["存储介质欺骗"] MCU["微控制器 (替代 NOR)"] end subgraph Read1["第一次读取 (执行阶段)"] MCU -->|"1. 喂入旧版降级固件"| BOOT["Boot Loader / Metloader / lv1ldr"] BOOT --> RUN["系统开始执行旧版代码"] end subgraph Read2["第二次读取 (校验阶段)"] RUN --> LV1["lv1 启动后重新读取 Flash 校验"] MCU -->|"2. 喂入官方最新合法固件"| LV1 LV1 --> PASS["校验通过,正常继续引导"] end ``` ### [33:19](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1999s) 隔离 SPU 局部存储区溢出与链条断裂 接下来,演讲者展示了 SPU 处于隔离运行模式(Isolated SPU Mode)下的内存状态。在局部存储区(Local Storage)中,受保护的红色区域仅限 SPU 本身访问,外部无法触及;而绿色区域则是外部可读写的。由于撤销列表由外部提供且附带数字签名与加密,如果 SPU 原地解密并验签,攻击者可以掐准时间差通过 PowerPC 核心写入恶意代码进行篡改。因此,SPU 必须先将撤销列表完整复制到受保护的内存区域中。 问题出在复制过程的边界处理上:撤销列表的目标缓冲区恰好紧挨在 lv2ldr 的代码段之前。攻击者完全控制了源数据的内存位置,并且完全控制了源数据的长度字段。攻击者只需要提供一个巨大的长度值,数据拷贝就会越界溢出,直接覆盖掉 lv2ldr 的程序代码。这一步成功后,攻击者便能在隔离 SPU 模式下执行任意代码,进而把核心密钥导出并传输到 PowerPC 端,实现对该加载器的彻底逆向工程。 更致命的是,虽然这只是某一个隔离加载器里的溢出漏洞,但由于 Hypervisor 载入 Flash 上的撤销列表时根本不校验数据尺寸,攻击者可以直接在 NOR Flash 中植入带有恶意超大长度的撤销列表。Hypervisor 照单全收并传给 lv2ldr,代码执行即可打穿信任链。演讲者指出: > “Well, we get our code running at boot time without any kind of dongles or stuff, and this breaks the chain of trust pretty early.” - 隔离模式 SPU 内存划分为外部无法触及的私有空间和主处理器可写入的开放缓冲区。 - 目标缓冲区在内存地址上直接排在执行代码(lv2ldr)之前,拷贝操作缺乏边界检查。 - 利用超长尺寸字段覆写加载器指令,无需 USB 硬件加密狗即可在开机启动阶段运行自制代码。 - 该利用使得系统在极其底层的阶段丧失了信任链的完整性。 ### [35:16](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2116s) “史诗级失败”:ECDSA 签名算法中的随机数常数化 虽然启动链已经遭到破坏,但这只是普通的失误(Fail)。团队承诺呈现的是“史诗级失败”(Epic Fail),于是 Segher 登台深入拆解了索尼在公钥密码学实现上的毁灭性错误。索尼在系统签名机制中采用了椭圆曲线数字签名算法(ECDSA)。在数学层面上,椭圆曲线密码学依赖基点标量乘法等难以逆向求解的离散对数数学难题,公开参数包括椭圆曲线参数与公钥等,而在每次签名运算中,私密的信息包括长期私钥 $K$,以及每次计算签名时必须使用的瞬态随机数 $M$。 ECDSA 签名生成两部分数据:$R$ 和 $S$。其中 $R$ 涉及椭圆曲线复杂的标量乘法难以反解,但 $S$ 仅仅是普通整数的模运算。单次签名公式中存在私钥 $K$ 与随机数 $M$ 两个未知数,在正常情况下仅凭一个方程绝对无法求解。然而,密码学规范严格要求随机数 $M$ 必须是真随机且每次签名各不相同。但在索尼的实现中,他们却在所有签名的计算中复用了完全相同的数值。 Segher 极其幽默地向台下观众指出了这个难以置信的低级漏洞: > “But M is supposed to be a random number, and for some reason Sony uses the same random number all the time.” 由于两次不同的签名共用了同一个数值 $M$,攻击者面对两个方程时依然只有 $M$ 和 $K$ 这两个未知数。此时求解彻底退化成了初中水平的代数运算:只需将两个签名的方程相减消除未知数,就能轻易计算出 $M$ 的具体值;求出 $M$ 之后代入原式,便能瞬间解出索尼官方的私钥 $K$。这个过程甚至完全不需要理会椭圆曲线复杂的群参数。 ```mermaid flowchart LR accTitle: ECDSA Static Nonce Private Key Recovery accDescr: Flowchart demonstrating how reusing the nonce M in two ECDSA signatures allows an attacker to solve for M and extract the private key K. subgraph Signatures["两次不同文件的签名"] S1["签名 1: 包含未知数 (K, M)"] S2["签名 2: 包含未知数 (K, M)"] end subgraph Exploit["代数消元求解"] SUB["方程联立消除私钥 K"] SOLVE_M["成功解出固定随机数 M"] SOLVE_K["代回方程解出官方私钥 K"] end S1 & S2 --> SUB --> SOLVE_M --> SOLVE_K ``` ### [38:45](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2325s) 伪随机数的对比、私钥全失与固件防护全线崩溃 演讲者随后展示了正确的密码学实现方式与索尼做法的鲜明对比。他们在 Wii 的自制软件频道(Homebrew Channel)的网络更新模块中也曾使用 ECDSA 算法,目的是防止攻击者通过中间人攻击劫持并入侵用户的 Wii 主机。在正确的代码实现中,随机数 $M$ 是直接通过 Linux 系统的 `/dev/urandom` 读取的密码学安全真伪随机数。随后,幻灯片切出了一张广为流传的经典 XKCD 漫画——一个函数直接返回固定数字并注释“由掷骰子选定,保证随机”——现场观众席瞬间爆发出雷鸣般的掌声与笑声。 通过解出官方私钥 $K$,攻击者所伪造签署的代码签名与索尼官方签名在二进制上完全没有区别,系统根本无法识别真伪。fail0verflow 团队借此拿到了包括 lv2、撤销列表、Hypervisor 配置文件以及软件包(Packages)等关键组件的私钥。唯一的遗憾是 lv1 依赖某些未解的奇异硬件行为导致加载器尚未提取,但团队强调,只要提取出明文镜像拿到公钥,所有密钥就都唾手可得,因为这套保护机制所需的一切数据都原生锁在 PS3 的硬件内部。 回溯 PS3 的安全防御体系,索尼原本引以为豪的公钥体系彻底破灭,整个安全模型最后竟然只剩下了片上 Boot ROM(On-Die Boot ROM)以及普通的用户态与内核态隔离机制。演讲者毫不留情地讽刺道: > “Well, they botched the public key crypto, so that's a big fail, and we're left with user/kernel mode with in the on-die boot ROM, which are not exactly high-tech security features.” ### [41:04](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2464s) 现场问答与演示技术细节说明 在技术演示环节,团队解释原本计划在现场直接运行还原 Linux 的演示程序,但遇到了视频输出显示故障。这与他们两年前在展示 Wii 的 BootMii 时遭遇的现场视频故障如出一辙,因此他们宣布将尝试排查问题,并计划在次日的闪电演讲(Lightning Talk)中重新进行公开演示。同时,他们开放了现场麦克风与 Hackcenter 线下渠道接受与会者提问。 现场一位与会者首先提问关于最初的 PS Jailbreak 漏洞利用的来源。演讲者坦率地回应,他们对 PS Jailbreak 的真正作者和泄露源头一无所知,没有任何实物证据,只能依据模糊线索猜测其可能来自南半球。对于现有的工具链状态,演讲者明确表示,针对 TI OMAP 处理器的 USB 堆栈利用代码 AsbestOS 早已开源,社区中也存在逆向完成的原版 PS Jailbreak 载荷与各种硬件克隆方案;而 fail0verflow 自行研发的新攻击链由于为了准备大会演示写得非常仓促,充斥着各种极不规范的代码,他们承诺会在未来一个月内进行代码重构与清理,为社区发布一套整洁易用的工具集。 针对 IRC 聊天室转述的“既然能自主签名代码,为何不能直接制作蓝光(Blu-ray)光盘软件载荷来运行游戏”这一问题,演讲者给出了明确的技术回应并申明了立场: > “So we can't sign games, and also we don't really care.” - PS Jailbreak 的来源至今仍是未解之谜,团队仅推测其源自南半球。 - AsbestOS 已支持在 TI OMAP 芯片上实现 USB 漏洞攻击,用于在 PS3 上引导 Linux。 - 团队无意维护盗版生态,无法签署游戏的原因在于他们尚未获取负责游戏执行的 Apploader 密钥,且需要先获取对应加载器的明文公钥。 - fail0verflow 团队将在演示后清理代码,预计一个月内向公众发布这套利用工具。 ### [44:03](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2643s) 专注于底层权限与演讲收尾 在问答环节的尾声,fail0verflow 团队明确回应了关于游戏相关功能(如自制固件运行游戏备份等)的疑问。演讲者重申团队的核心动机是系统控制权与开源计算,而非游戏本身,并坦率地表明态度:“...about games because we care about low-level access. It's probably possible eventually, but we're not planning on working on it.”(……关于游戏,因为我们关心的是底层访问权限。这最终或许是可行的,但我们并不打算在这方面花精力。)这一回答再次强调了 fail0verflow 的黑客哲学:他们的目标是将 Linux 带回 PS3,实现对硬件底层的完全控制,而不是去促进盗版或开发游戏加载工具。 随着该问题的回答结束,主持人登台确认现场是否还有其他提问。在确认没有进一步的观众提问后,主持人宣布演讲结束,并向与会者播报了退场指引等内务事项,提醒大家离场时向右通行、随手带走身边的垃圾,若拾得贵重物品请交至失物招领处。最后,全场爆发出热烈的掌声与欢呼声,标志着这场彻底击穿索尼 PS3 安全防线、载入游戏主机逆向工程史册的经典演讲圆满落幕。 - fail0verflow 团队重申研究重点是底层权限(low-level access)与运行 Linux,明确表示不会投入精力开发针对游戏或盗版的相关工具。 - 会议主持人引导现场观众散场并处理失物招领与现场清理,全场在掌声中结束了 27C3 上的本次演讲。 ## Notable quotes > [05:53](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=353s) Linux 是不可避免的;你要么在你的硬件上主动支持 Linux,要么它就会被黑掉,好让 Linux 迟早能跑上去。 — Michael Steil > [24:09](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=1449s) So you can break 20% of the security and copy games, which is 100% of what Sony doesn't want you to do. > [01:54](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=114s) 对我们而言,在 Wii 上进行黑客攻击最大的挑战其实不是它的防护,而是这台机器太脆弱了,软件极度脆弱,而且有着极多意外变砖的途径,变砖后却根本没有办法修复。 — bushing > [41:04](https://www.youtube.com/watch?v=4loZGYqaZ7I&t=2464s) So we can't sign games, and also we don't really care. ## Mentioned PlayStation 3, Sony, Nintendo Wii, Xbox 360, fail0verflow, bushing, Sven, marcan, Segher, Michael Steil, geohot, Andrew "bunnie" Huang, BootMii, Homebrew Channel, OtherOS, Linux, Cell Broadband Engine, SPU, PowerPC, Hypervisor, GameOS, PS Jailbreak, PSGroove, AsbestOS, ECDSA, XKCD, 27C3 ## Video description 27th Chaos Communication Congress 2010 held in Berlin, Germany. Authors: segher, marcan, sven and bushing — fail0verflow! More information - http://reviews.dcemu.co.uk/synopsis-of-chaos-communication-congress-sony-s-ps3-security-is-epic-fail-350530.html FACTS: - fail0verflow is the name of our 'group'. We are a bunch of curious hackers who have been working on a bunch of things over the last 3 years. - It did not take 4 years to crack the PS3, we only started looking at the ps3 after otheros was killed. - Note: we won't be working long-term on CFW or similar. We'll release tools and a PoC, someone else can take over. The fun part is done ;) - Our current PS3 goal: AsbestOS.pup - Our goal is to have linux running on all existing PS3 consoles, whatever their firmware versions. ------------------------- Over 70 million Wiis, over 40 million Xbox 360s and over 35 million Playstation 3s have been sold in the last few years. That makes over 145 million embedded devices out there and most of them are just used to play games. But what can you do with them if you don't like playing games? You hack them to make them run your own code of course! We're going to talk about the various hacks that you can use to gain control of your hardware and make it do what you want it to do. 2010 saw the first hacks for the Playstation 3, soon after Sony removed Other OS functionality. We will detail the operation of current PS3 exploits, show a few new ones and explain where and how Sony went wrong when designing its security system, and show how these holes can be used to gain control over the system and bring Linux back to the PS3. We will also go over hacks for the other consoles, including the JTAG hack for the Xbox 360 which made running homebrew code more convenient, and the cat-and-mouse games that Nintendo played with us to combat Wii hacks. We might also check out the security of their 'new' handheld console - the DSi. Gamers might find this talk interesting even though it is targeted at those who hack (or design) embedded system security. A basic knowledge of crypto is therefore assumed. We will also be present in the Hackcenter before and after the presentation for those of you who are interested in learning more about the subject. Twitter: http://www.twitter.com/fail0verflow [Source](https://www.youtube.com/watch?v=4loZGYqaZ7I)

Source quotes

[5:53] Michael Steil: Linux 是不可避免的;你要么在你的硬件上主动支持 Linux,要么它就会被黑掉,好让 Linux 迟早能跑上去。 [24:09] So you can break 20% of the security and copy games, which is 100% of what Sony doesn't want you to do. [1:54] bushing: 对我们而言,在 Wii 上进行黑客攻击最大的挑战其实不是它的防护,而是这台机器太脆弱了,软件极度脆弱,而且有着极多意外变砖的途径,变砖后却根本没有办法修复。 [41:04] So we can't sign games, and also we don't really care.

Source quotes

[5:53] Michael Steil: Linux is inevitable: either you support Linux on your hardware, or it will be hacked so it'll run sooner or later. [3:35] Sven: Well, we don't care about piracy: it does not allow homebrew code, and we don't care about running code others wrote; we want to run our own code.

Original transcript

[0:03] um then just a quick survey who of you [0:06] owns a v please put up your [0:17] hands who of you owns an [0:22] Xbox so for you there's a book out there [0:24] by [0:25] bunny who of you owns a [0:28] PS3 [0:31] whoa that's a majority so with all these [0:34] consoles which means a lot of computing [0:36] power at our hands means a lot of stuff [0:38] to do what we want at least to my [0:41] definition of ownership and property so [0:44] how to Peak into the P3 and consol in [0:47] general here's fail overflow all right [0:51] great thank [0:56] [Music] [0:58] you so speaking of owning a PS3 actually [1:01] we'll get to that in a minute you know I [1:02] should start out by saying that I'm [1:04] bushing and here we have Sven Mark and [1:06] Seer uh we are SE SE excuse me uh we are [1:11] just four members of a team fail [1:13] overflow un fortunately we sort of [1:15] overflowed the number of speakers so the [1:17] rest of them are you know here in the [1:19] front aisle uh it's a international team [1:22] with I think we have members on almost [1:23] every continent [1:25] um let's see uh we may be familiar faces [1:29] because uh [1:30] two years ago we presented uh Mark H and [1:32] I presented on some of the hacks we'd [1:35] done for the Wii a year before that I [1:37] had demonstrated the first unsigned code [1:39] execution on the Wii here at 24 C3 uh [1:43] 2008 uh uh was the full reconstruction [1:47] of the allowing to be completely broken [1:51] that was a fun couple of [1:54] weeks so on the subject of the Wii since [1:56] that's really what we have the most [1:58] experience with or our most known for [1:59] for um we's been out for about 3 years [2:02] it's been 3 years since we demonstrated [2:04] that unsigned code execution in that [2:06] time Nintendo has released nine firmware [2:09] updates and of all those updates eight [2:11] of them were contrived only one of them [2:13] had an actual real feature that somebody [2:15] would want namely the ability to run uh [2:17] games off of an SD card every single [2:20] other feature was background [2:21] improvements to improve system [2:23] performance which really was their code [2:25] for patching [2:26] vulnerabilities um according to VG chart [2:30] that they sold about 73 million consoles [2:32] which I think is the highest of all the [2:34] consoles I'm correct and of those we [2:37] estimate that about 30 million of them [2:39] were produced before they fixed the bug [2:42] uh where the hash comparison bug that we [2:45] had disclosed um and so these people [2:47] were fortunate enough to be able to run [2:49] boot me our alternate boot loader that [2:51] we R uh wrote for the Wii uh we actually [2:54] ended up putting a lot of time into that [2:56] because one of the biggest challenges [2:57] for us hacking on the Wii was not really [2:59] the protection but really the fragility [3:01] of the thing the software is very very [3:04] fragile and there are very very very [3:06] many ways to accidentally brick the [3:07] device and no way to fix it so we put [3:10] time into making something that would [3:11] simply let you Unbreak Your Wii um and [3:14] you know as of I believe since since [3:17] September of this year uh we are proud [3:18] to announce we have 1 million unique [3:20] users of the hbre channel so that's over [3:22] 1% of all users of all owners of whis [3:24] have installed our Homer [3:26] channel so I was [3:28] like [3:32] so I'd say we had a pretty good [3:35] run so let's take a look at what [3:37] consoles we have here so there's first [3:39] the Wii which was released at the end of [3:41] 2006 then the Xbox 360 was which was [3:44] released about a year earlier and the [3:46] PS3 was released at about the same time [3:48] like the Xbox and like the Wii and so [3:51] the Wii was pretty much broken from the [3:53] beginning because they were like Drive [3:56] trips which allowed pirated games to be [3:58] run and um GameCube home brew and then [4:01] after a year it was like fully broken [4:03] and Nintendo tried to fix it again and [4:05] again but well they failed so in the end [4:09] it's just broken and it's still broken [4:10] and it probably will be [4:12] broken so then we have the Xbox 360 it [4:16] has a really good security system and [4:17] there were only like two major hacks [4:19] which was the King Kong hack which was [4:21] demonstrated I think two years ago or [4:23] three years and then the jte hack but [4:25] those were minor bucks and Microsoft was [4:27] just able to fix them [4:30] so okay there the drives are completely [4:32] hacked so we could also Mark the whole [4:35] thing here in red and then blood but um [4:37] well we don't care about piracy it does [4:39] not allow home code and we don't care [4:41] about running code others road we want [4:43] to run our own code so and then there's [4:45] finally the [4:47] PS3 so the difference here is that the [4:49] PS3 originally supported Linux so no one [4:53] really cared other than other than one [4:56] single thing where you cannot really use [4:58] the 3D features Linux so they found some [5:02] way to get around that Sony pushed a [5:03] firmware update because they didn't want [5:05] that and they fixed it so well but still [5:08] nothing happened but then Sony decided [5:10] to release the slim so they claimed they [5:13] don't want Linux or they they're not [5:15] going to support Linux because they want [5:16] to save money well today we know that [5:19] this is because Linux just runs [5:21] on the slim without any huge code motive [5:23] modifications so it was just something [5:25] they claimed to do but it's certainly [5:27] not true and after that people actually [5:30] started to care and a few months later [5:32] geohot tried to break the hypervisor [5:35] which is going to be explained later and [5:37] Son's reaction was to remove Linux and [5:39] then finally the jailbreak happened and [5:42] yeah in the end we're going to present [5:43] some new hacks and the PlayStation 3 is [5:45] likely going to look like the Wii [5:53] afterwards so hi my name is Michael [5:55] style and I'm not actually part of those [5:58] guys but um if you remember there's been [6:00] um an a console hacking talk for um at [6:03] least the last eight years every year [6:06] and um every once in a while I get a [6:08] cameo in one of these talks because I [6:10] look at the big picture at the [6:11] statistics about what's going on in the [6:13] hacking space and it's always the same [6:15] thing I want to say which is Linux is [6:17] inevitable um either you support Linux [6:19] on your Hardware or it will be hacked so [6:21] it'll run sooner or [6:24] [Applause] [6:28] later [6:31] correlation is not causation but I have [6:33] some good statistics to back that up so [6:35] if you look at the devices so this this [6:37] is the slide that I gave um that I [6:38] presented three years ago um in another [6:41] one of these talks um with these are [6:44] were the systems that were available at [6:45] that time and the years when they came [6:48] out um the how good the security system [6:51] was so darker darker red colors means [6:54] very good very sophisticated very [6:56] complicated security system and as time [6:58] progressed it got better but the smaller [7:00] systems still had weaker security [7:02] systems because it just wasn't that easy [7:04] to implement them in smaller in smaller [7:06] space this column shows you how long it [7:09] took to have these systems hacked and [7:11] yeah there's some correlation between a [7:13] complicated security system and hacking [7:15] the [7:17] system and the question is why did it [7:21] get hacked and the statistics clearly [7:23] show here that except for the first one [7:24] the PlayStation very long time ago all [7:26] of them were always done for the sole [7:28] purpose of running home bru software [7:30] running Linux just running your own [7:31] codee because you own the hardware and [7:34] there has always been that side effect [7:36] of well if you open it if you can run [7:38] anything on it you can run pirated games [7:41] on it because the keys have leaked or [7:42] the whole DRM system is just not in [7:44] place anymore but there's one here that [7:47] is special no wait let let me first [7:49] update the slide so the [7:52] iPad same thing as the [7:57] iPhone okay so let's uh let's look at [8:01] the PlayStation 3 this one is special [8:03] because while the security system looks [8:04] like it's kind of sophisticated and as [8:08] of well 3 years ago even a year ago it [8:10] it was not [8:11] hacked but so this this has changed so [8:14] now after after four years it has [8:15] finally been hacked and you could say [8:17] it's it's got hacked for piracy home [8:19] brew um I let those guys decide and [8:22] argue on that um and of course there's [8:25] always the side effect so piracy is [8:26] possible or was possible whatever [8:29] but you could also look at it from [8:31] another perspective which [8:33] is um if if you if you just assume that [8:37] PlayStation that we had in that list was [8:39] the old PlayStation where Linux was [8:41] possible and that was the whole reason [8:42] as I argue that it never got hacked it [8:45] ran Linux already it didn't get hacked [8:47] never so now let's update this for how [8:51] long did it take on from the point when [8:55] the system was closed until it got [8:57] hacked and then we have just 12 months [8:59] here which is pretty much the same as [9:01] the Xbox 360 with a with a similar [9:03] security system [9:06] anyway okay [9:08] [Applause] [9:15] thanks okay so before we're going to [9:17] talk about how we can break the security [9:19] system we have to talk about how the PS3 [9:21] actually works so what Sony did was to [9:24] ask IBM for their cell processor which [9:27] is called the cell Broadband engine and [9:28] they put it in their so this is [9:30] essentially just a 64-bit power PC and [9:33] they have like which is on the bottom [9:35] left there and they have like eight SP [9:37] or spus that's synergistic processing [9:40] element it's just a fency name for a [9:42] vector processor so each of those things [9:45] has like [9:47] 265 kilobyte of [9:49] memory head of memory um this memory can [9:54] well it cannot access the rest of the [9:55] memory it can just d m a from and it and [10:00] so they can use this for security [10:02] because there is this this special mode [10:05] so at the bottom you see the local [10:07] storage it's um usually you have like [10:10] the whole thing is available from the [10:11] power PC you can just read it you can [10:13] write to it you can even stop the spus [10:15] and look what they are doing you can [10:17] even write a debugger on the power PC to [10:19] like totally inspect what's in every [10:20] single [10:21] register however when isolation mode is [10:24] enabled an authenticated binary is [10:26] loaded decrypted and verified by [10:28] Hardware and the local storage gets [10:31] closed down all the debu Fe all the debu [10:33] features are disabled so the only thing [10:36] you see is the pirate marked in green [10:37] there which is like a small area used [10:40] for used for communication with the [10:42] power PC and the red area is blocked and [10:44] only accessible from the sbu itself so [10:47] Sony can use this for to like hide [10:49] things or Implement some stuff they [10:51] don't want us to [10:56] see so then we have um [11:00] how code running there we have the [11:01] hypervisor at the top which just which [11:04] can virtualize multiple logic partitions [11:07] and usually the only thing running there [11:09] is level two or game OS which is like [11:11] some kind of Kernel that provides [11:12] support features for games and so on and [11:15] games itself are running in problem [11:16] state which is the power PC user mode [11:19] and level two and level one can [11:21] communicate with the spu in isolation [11:22] mode usually what usually happens or [11:24] what Sony does is that game calls level [11:27] one with some hyper call tells it to [11:29] like load the spu load some loader on [11:32] there and let it decrypt stuff but game [11:34] itself can do this as well so and now [11:38] we're going to talk a bit about the boot [11:40] process so what were we first okay [11:42] that's actually wrong it's actually a [11:44] boot loader [11:46] here well yes so boot loader essentially [11:49] loads level zero which is some power PC [11:52] code running in hypervisor mode the sole [11:54] purpose of this code is to bring up the [11:55] power PC um bring up another spu you to [11:59] load Med loader which then loads level [12:01] one loader so those are just isolated [12:03] binaries used for like loading more [12:05] stuff and finally level one gets loaded [12:08] here and yeah just continues with [12:11] loading another spu loading met loader [12:13] again and loading level two loader so [12:15] what met loer just does decrypts level [12:17] two loader then level two loader [12:18] decrypts level finally level two which [12:20] is then then running in um kernel mode [12:22] on the PS3 so red is SP and blue is [12:26] power PC so the the two CPUs kind of [12:28] interl their call [12:32] code all right so um let's look at the [12:36] security systems of the different [12:37] consoles each there's a whole bunch of [12:39] features that U consults can share in [12:41] their security systems so let's compare [12:43] them so uh the First Security feature [12:46] that uh everyone puts on is a hidden [12:48] boot ROM that can do something special [12:50] uh it was implemented in the Xbox One in [12:52] the uh South Bridge chip and every [12:54] console after that has put it uh in the [12:56] CPU which um is uh very nice cuz you can [12:59] easily read it and obviously you can't [13:01] override it with a mod chip so you [13:02] pretty much need that um after that uh [13:06] of course people use public key [13:08] cryptography to authenticate a code that [13:09] runs on consoles so um both the Wii and [13:13] the 360 uh have that why might talk oh [13:15] read the next side yeah that so yeah no [13:19] looking the next side okay so all the [13:21] four consols have that and with we in [13:23] the 360 also have on di key storage um [13:25] which hides uh Keys uh so that you can [13:28] easily them from external memory or [13:30] anything like that PSV kind of has that [13:32] but it doesn't work very well uh since [13:35] we have public key crypto uh of course [13:37] you want to keep that chain of uh signed [13:39] and verified code running from boots so [13:41] you need a chain of trust the Xbox 360 [13:43] and the PS3 do that the we tries to do [13:45] that but uh they only verify installed [13:47] code at installed time so that kind of [13:49] breaks the chain of trust that's why it [13:51] doesn't get that uh point there uh the [13:54] we the 360 and the PS3 also have for [13:55] console Keys uh the Xbox One did not [13:58] have that uh so these keys can be used [13:59] to encrypt things like internal code and [14:02] um tickets and things like that uh to be [14:05] unique to One [14:07] console uh the Xbox One the 360 and the [14:09] PS3 have signed [14:11] executables uh the Wii doesn't sign [14:13] executables it can signs packages so [14:16] it's an outer layer uh with s executable [14:19] of codes you of course you ensure that [14:22] um that any code that you run on this [14:24] system is authenticated before running [14:28] it okay uh the Wii and the um the Wii [14:31] and the PS3 also have a Cod processor [14:33] you saw the curb on the PS3 and the Wii [14:36] has what we call the startlet which also [14:37] runs all the security code so um this [14:40] helps isolate the security subsystem [14:42] from the rest of the code and you know [14:44] prevent uh exploits from sort of leaking [14:46] into the security [14:48] stuff the wi does something that's [14:50] really interesting which is it fully [14:51] encrypts and signs an entire dis image [14:54] so you can't touch any single resource [14:56] file in a game it uses a hash tree which [14:58] is a clear construction and it [15:01] effectively signs and verifies the [15:03] entire thing as you uh read it from the [15:06] dis so you can't change [15:07] anything the Wii and the PS3 also have [15:10] encrypted storage the hard drive on the [15:12] PS3 and the flash memory on the Wii are [15:15] both encrypted with a per console [15:17] key and uh so that way you can't easily [15:20] read it from the outside and figure out [15:22] what's going on inside the uh the [15:24] internal storage memory of the [15:26] consoles the Wii however also signs that [15:30] uh code with um with an hmax signature [15:34] so that you can't patch stuff into that [15:36] storage even if you can decrypt it [15:38] somehow without knowing a key that's [15:40] particular to that console that lets you [15:42] uh uh do that so that's uh quite [15:44] interesting too quite important too if [15:46] you have encrypted [15:47] storage uh the 360 does memory [15:50] encryption which none none of the other [15:51] consoles do and it also does memory [15:53] hashing so you can't tap a memory Buzz [15:55] or glitch something in the protected [15:57] areas of memory you can't DM to them it [15:59] basically prevents a whole bunch of [16:00] Hardware based and the dma based DM [16:03] memory [16:04] attacks and uh the 360 in the PS3 have a [16:07] hypervisor which uh helps supervise uh [16:10] other application code running on them [16:12] and uh put does some of the security [16:14] stuff in the hypervisor the PS3 however [16:16] also has user mode and kernel mode so [16:18] the PS3 has all three levels user kernel [16:21] and hypervisor mode while 360 only has [16:24] kernel and hypervisor mode it does not [16:26] do um user mode it runs all games in in [16:28] kernel mode and we runs everything in [16:30] kernel mode it doesn't even try to priv [16:32] separate stuff on the main [16:35] CPU uh and uh the 360 has euses which [16:38] are used to prevent downgrades it [16:40] actually blows a fuse inside the CPU [16:42] when uh you update some when you perform [16:44] some system updates and you can't [16:46] reverse that anyway so once you run an [16:48] update there's no way you can downgrade [16:50] unless you can break the chain of trust [16:51] before that check happens which as far [16:53] as I know has not happened so [16:55] far so uh these are the features of uh [16:58] the consoles there's one however on the [16:59] PS3 that's already kind of useless [17:02] because uh it it turns out the PS3 [17:04] encrypts stuff with a key that's the [17:06] same for every sector and the same IV [17:08] and doesn't hatch anything so they [17:10] pulled off this neat trick where you can [17:12] copy a file into your PS3 like a movie [17:14] or something then you can find those [17:17] sectors by watching what changed on the [17:18] drive then you take another chunk of the [17:21] drive copy it on top then read the movie [17:24] back and it decrypts those sectors that [17:26] you copied on top for you so you can do [17:28] that to decrypt any chunk of the hard [17:30] drive and since they don't verify [17:32] anything and everything uses the same [17:33] key and the same [17:35] IV it just works so that encrypted [17:37] storage is pretty much screwed up to [17:39] begin [17:40] with okay so the appears we however have [17:43] others and which is a way to run Linux [17:45] and as you as we saw well it's I'm [17:48] pretty sure it worked as a deterrent [17:50] because people could already run code so [17:51] why break it but then Sony decided to uh [17:54] get rid of it on the PS3 Slim which is [17:57] you know it's it's a way of drawing [17:58] attention [18:00] so [18:02] [Applause] [18:05] [Music] [18:08] yeah cuz now people are going to start [18:11] looking at your system and we know now [18:13] that there's no technical reason not to [18:15] have Linux on the PS3 Slim so it was [18:17] either marketing or some kind of you [18:19] know boss somewhere said we don't want [18:20] Linux we don't want people running their [18:22] own code or we don't know why but they [18:24] definitely Drew people's attention with [18:26] this and now people started trying to [18:27] hack into the PS3 and uh geohot tried to [18:30] give it a shot so uh you may know that [18:33] uh on the Wii our first exploit was a [18:35] tweezer attack which worked by shorting [18:37] out some Ram address lines and glitching [18:39] the ram bus to access areas of memory [18:42] that we were not supposed to access Jad [18:44] did something like that on the PS3 he [18:46] glitched the ram bus to essentially [18:47] access areas that you're not supposed to [18:49] access so the way this works usually is [18:52] uh you have a hypervisor and you have a [18:53] kernel the on the same check of memory [18:55] but the hypervisor controls the Mage [18:57] tables to control uh memory access [18:59] permissions for the kernel so when you [19:01] allocate some memory from the kernel the [19:04] hypervisor gives you a mapping to that [19:05] memory so that you can access it and [19:07] when you uh remove that uh chunk of [19:09] memory it deletes that mapping and you [19:11] cannot access it anymore uh geohot [19:14] glitched the memory bus right when that [19:16] right happened so that even though the [19:18] hypervisor thinks you have that chunk of [19:20] memory allocated in reality it's not [19:22] actually um it's not freed completely [19:25] because the kernel has still a uh a page [19:27] entry that can access it so the [19:29] hypervisor thinks that's free memory but [19:31] you can still read and write for a [19:32] minute which is bad and uh finally all [19:35] you have to do is ask the hypervisor to [19:37] create a new virtual uh address space [19:40] which means create a new page table and [19:42] if you're lucky it ends up in that chunk [19:44] of RAM and then suddenly you have access [19:46] to the page table you can read and write [19:48] from it if you can write to the page [19:49] table you can map the hypervisor if you [19:51] can map the hypervisor you can do [19:52] anything you want in hypervisor [19:55] mode uh so that gets us hyper [20:05] exposure so this was kind of an academic [20:08] hack uh it worked and you could do stuff [20:11] in hypervisor mode but it required [20:13] really annoying Hardware to pull off it [20:14] was really unreliable and even when you [20:16] got hypervisor dumped no one really knew [20:18] what to do with them they were kind of [20:19] there and yeah whatever Sony for some [20:22] reason got really really you know really [20:24] annoyed at this because they decided to [20:26] piss a lot of people off by REM moving [20:28] other OS completely from old PS3s pretty [20:31] sure that violates some European [20:33] consumer protection laws and stuff so [20:36] but the worst part of this is of this is [20:38] that the people who use os are the [20:40] hackers so by doing this Sony pissed off [20:43] the hackers that's a really really bad [20:48] [Music] [20:51] idea well in other words they are so [20:53] getting hacked [20:55] now so for a while interestingly nothing [20:57] really happened uh and uh obviously [21:00] someone was working on this behind the [21:01] scenes because then we got the PS [21:03] jailbreak and then we got a whole ton of [21:06] clones of [21:07] it so the PS jailbreak is a device that [21:09] lets you run your own code at lv2 kernel [21:12] level and above and it uses a clever USB [21:15] exploit to do that uh it's actually a [21:18] USB device that pretends to be multiple [21:20] USB devices behind the [21:22] Hub uh we'll ignore most of those for [21:24] now cuz uh we got to keep this short but [21:27] the important ones are the first one and [21:29] the fourth uh owners devices we call [21:31] them the first one just delivers a [21:33] payload as part of a USB information uh [21:36] descriptor into the the h i mean the uh [21:39] lv2 I yeah the lv2 kernel uh the whole [21:42] purpose is to put the payload into [21:43] memory doesn't really do anything once [21:45] it's there and then device number four [21:49] uh gets loaded and here's where uh the [21:51] magic happens there's some stuff that [21:53] happened before that but so this device [21:55] number four has four has several [21:57] configuration descriptors [21:59] the first one is loaded from the device [22:01] and that works out fine it gets put into [22:02] this blue buffer and then the second [22:04] descriptor gets loaded but something [22:05] weird happens the PS jailbreak um does [22:08] an interesting glitch with USB when you [22:10] read a descriptor it has a total length [22:13] but to read the descriptor you need the [22:14] length through the chicken an neck [22:15] problem USB solves this by reading the [22:17] first eight or so bytes uh to begin with [22:20] then you read the length from that then [22:22] you read the whole descriptor again once [22:23] you know the actual length and you can [22:24] reest all the data so the PS jailbreak [22:29] returns uh a normal descriptor uh length [22:32] the first time around when it reads the [22:33] first eight bytes then the second time [22:35] around it actually returns zero that [22:37] forces the USB uh code to glitch and [22:39] never actually copy the descriptor out [22:41] because now it thinks it's length zero [22:43] even though it read [22:44] it so the funny thing is well um lb2 is [22:49] going to try to parse that descriptor [22:50] that's not actually there so it's [22:53] uninitialized memory what's actually [22:56] there is it turns out that device number [22:58] two [22:59] was plugged in before and then unplugged [23:00] and it sort of uh initialized that [23:02] memory for lv2 and it has these four [23:05] funny bites at the bottom uh 04 21 b42 F [23:10] when you parse that as a configuration [23:11] descriptor which is what it's going to [23:13] try to do it thinks it's a descriptor [23:15] with length to fp4 which is really [23:17] really long it's past the buffer so [23:20] we've overflowed this buffer and it now [23:22] it tries to load configuration number [23:23] three and it jumps to fp4 bytes forward [23:27] out the buffer and into a C++ object [23:30] array that actually belongs to device [23:31] number three or yeah [23:34] three so I put this configuration [23:36] descriptor right on top of C++ objects [23:39] and it overwrites the vtable of C++ [23:41] objects to point to the payload this V [23:44] table holds function pointers for things [23:46] like the destructors and some virtual [23:47] methods and things like that so when [23:49] these objects get [23:52] destroyed um they actually run our own [23:55] code so when device number three which [23:56] has a bunch of crap that created these [23:58] objects gets unplugged we gain lb2 code [24:09] execution so this was implemented by the [24:11] PS jailbreak and then cloned and you [24:13] know there a whole bunch of [24:14] implementations of it um the funny thing [24:17] is okay so this works why does it work [24:19] why can't we just run code from data [24:21] memory this is a solve problem right [24:23] well it turns out that lv2 does not do [24:26] right zor execute on its kernel it does [24:28] not try to protect executable uh I mean [24:31] data from being executed which is kind [24:33] of silly cuz you know we've had this for [24:35] a while now but even more importantly [24:38] the hypervisor doesn't know anything [24:39] about this because the hypervisor will [24:41] happily map any memory you want as [24:43] executable unlike on the 360 where the [24:45] hypervisor actually verifies anything [24:47] mapped as executable so it can it can [24:50] guarantee that any code running has been [24:53] signed on the PS3 the hypervisor doesn't [24:55] even try to do that it's a hypervisor [24:57] meant for vir iing operating systems not [25:00] for security so it's the wrong kind of [25:01] hypervisor it really doesn't do what you [25:03] want it to do for a security system it [25:05] kind of sits there and looks nice and [25:07] doesn't protect you from these kind of [25:09] bugs so okay so we have lb2 compromised [25:12] we have not compromised the hypervisor [25:14] and we have not compromised uh the secur [25:16] spe so all those are fine so what [25:18] happens now [25:21] well so why on Earth can we pirate games [25:25] by just compromising lv2 well it's [25:27] because the security system makes no [25:29] sense so it turns out that you can just [25:31] copy games to the hard drive patch lv2 [25:33] to run them for the hard drive and lv1 [25:35] doesn't care and the security P doesn't [25:37] care so you can break 20% of the [25:39] security and copy games which is 100% of [25:41] what Sony doesn't want you to [25:51] do so let's go back to our overview of [25:53] the security features uh obviously the [25:56] hypervisor is basically useless because [25:58] it's doesn't prevent you from copying [25:59] games so what on Earth is it doing and [26:01] it's not uh preventing you from running [26:03] your own code either because you can [26:04] just use an exploit and uh to sign [26:07] executables are also pretty useless [26:09] because the high Professor does not [26:11] enforce them uh to be signed to be [26:13] loaded into memory you can just ask it [26:14] for some executive Pages it just does [26:17] that okay so Sony fixed this obviously [26:22] and uh when Tony fix fixes something as [26:25] you might know from the PSP uh scene [26:27] everyone thinks okay let's downgrade so [26:30] people started uh looking into this and [26:33] I believe it was the people behind the [26:34] PS jailbreak who also came up with a way [26:36] of downgrading and the way this works is [26:39] that Sony has a service mode that they [26:41] use in um in their service centers that [26:44] puts the PS3 into a special mode where [26:46] it can run some sign code from a USB [26:48] stick this service mode is entered by [26:50] using a USB dongle that does some crypto [26:53] off with the PS3 but it turns out it's a [26:56] symmetric off it's a it's uh H Max and [26:59] since people had broken into the PS3 [27:00] they found the keys dumped them and made [27:02] their own clone jigs which is they call [27:04] them and uh there was a service app that [27:07] was signed that was leaked that lets you [27:10] uh reinstall the operating system on a [27:12] PS3 without any kind of downgrade check [27:14] so you just use this jig then put this [27:16] on a USB stick put a upgrade or an an [27:20] system install file on a USB drive and [27:23] it just installs that without checking [27:24] if it's older or newer or anything like [27:27] that [27:29] and since people can downgrade back to [27:31] piracy okay so what we did with uh this [27:34] whole PSO rck thing is we wrote as [27:37] bestas which is a replacement for game [27:40] OS the idea I mean sorry for other OS [27:42] the idea is that well since game o and [27:44] other o really are kind of the same [27:46] thing with different permissions the [27:47] hypervisor interface is the same you can [27:50] basically replace level two with Linux [27:52] so uh asbestos takes over uh level two [27:57] and uh then uh you can pretty much just [27:59] uh run run a Linux kernel bootload it [28:01] from a network or something like that [28:03] and you can you can run Linux again even [28:05] on a PS3 Slim it turned out it just [28:07] worked there's nothing about the slim [28:08] that makes Linux not work so it was all [28:10] you know the the reason why it doesn't [28:13] uh supported this because they didn't [28:15] want to support [28:16] it and uh we also added a feature to it [28:20] that lets you make your PS3 into a dumb [28:22] slave that you can control from your PC [28:25] and you can use this to experiment with [28:26] Python scripts with uh poking the [28:28] hypervisor poking the SES Reading [28:30] Writing memory making hyper calls [28:32] basically it's a way to experiment with [28:34] PS3 and especially it security system [28:36] really really quickly from a PC [28:39] environment okay yeah so so what have we [28:42] done so far so far we managed to break [28:44] into level two with with some um jig [28:46] where we have to plug some plug [28:48] something into the USB bus then turn it [28:50] on press eject and then it actually runs [28:52] your code but um we want more than that [28:56] we want like some vulnerability [28:58] vulnerability where we can just turn the [29:00] PS2 at PS3 on and just boot into Linux [29:02] for us so to do that we need to figure [29:04] out some more stuff like how does Sony [29:07] encrypt their elves so what they do is [29:10] they take they build a normal F elf [29:13] using uh just some compiler and stick a [29:15] header on top of that so this is their [29:17] crypto header Mark in blue and green [29:19] here and they have each of those loaders [29:22] running on the isolated spus has some [29:25] loader key which can be used to decrypt [29:28] a unique self key this one is then used [29:30] to decrypt the rest of the header and at [29:33] this point the signature is checked so [29:35] the signature we're going to talk about [29:36] that later is essentially um all the [29:38] blue all the stuff marked in blue there [29:41] assigned so you can't modify any [29:43] anything in there and then the header [29:46] also has a table of AES keys and Sh one [29:49] hashes so that they can actually encrypt [29:51] the program headers and make sure that [29:53] you don't modify them so as soon as you [29:55] modify somewhere a bit somewhere in the [29:58] the whole self it will not work anymore [29:59] because either some hash is not uh [30:02] doesn't verify anymore or because the [30:03] signature itself um well is wrong so so [30:08] yeah those are like every code Sony [30:10] gives you is wrapped into those files so [30:12] you can't see [30:13] anything however we can just use the SBS [30:17] to decrypt the code so Sony's idea is [30:19] yeah they can't see our code so they [30:21] can't find find bucks in there well as [30:23] soon as we have power PC access we can [30:25] just ask the spu to nicely decrypt stuff [30:28] for us and it will do so it does not do [30:30] any checks on what actually asks you to [30:32] decry to decrypt things so with this we [30:35] just use Asbestos and some this net RPC [30:38] thing write some Python scripts on the [30:39] PC and use it to like decrypt [30:41] application s or level two or like just [30:44] about every we can decrypt just about [30:46] everything now by just asking it to do [30:48] it so we don't even need to know how it [30:50] works we just have to ask it to do it [30:52] for us but so yeah the alisation is [30:56] useless [30:58] but [31:05] we so but we still want keys but let's [31:08] first take take a look at our table [31:10] again what we did now so we have the [31:12] security code processor there it's [31:18] pointless so and let's go one step back [31:20] to the train of trust I showed at the [31:22] beginning so here we have it again and [31:24] I'm not going to explain the so and on [31:27] the left you just see what is run in [31:29] Chron chronological order and on the [31:31] right you see the usage and there are [31:34] two things there which they can't update [31:36] it's boot loader and Med loader so boot [31:38] loader is the very first thing that runs [31:40] and just um yeah it's just the very [31:42] first thing that runs and meta loader is [31:43] used to um it's used to load isolated s [31:47] spu binaries so they can't update that [31:48] because it's encrypted with a console [31:50] specific key and yeah the rest can all [31:53] they can update all the other things and [31:57] they don't want us to downgrade so they [32:00] added some [32:01] revocation you get the revocation list [32:03] they they are stored on the nor on n [32:04] fles as well and the loaders verify if [32:07] you try to load some binary is this on a [32:09] revocation list and if it is it will [32:11] just refuse to boot so the stuff at the [32:15] top it cannot be revoked because the [32:17] previous loaders do not support any kind [32:18] of revocation lists so Sony did [32:20] something else there so first it reads [32:24] boot loader LV lv0 met loader lv1 load [32:28] and lv1 from the from the N or from the [32:30] nor on your PS3s and just runs them and [32:33] then once lv1 runs it loads all that [32:36] stuff again to verify it so you can just [32:39] remove the nor plug in a MP in there so [32:42] when it's red first you supply your [32:43] downgraded um version then when the PS3 [32:46] reads it for the second time you supply [32:48] the real version It's supposed to run [32:49] and it will just run because it thinks [32:52] like yeah I am running the current [32:54] version so I can just continue to boot [32:56] and this allows us to like downgrade [32:58] everything because we can just downgrade [33:00] the revocation list as well so their [33:02] revocation is [33:03] useless it's just some kind of [33:06] specification thing there's no [33:07] revocation there so as soon as we break [33:10] one loader we break it forever and we [33:12] can forever own all PS3s out [33:15] there so we need to do [33:19] that so here we have the local storage [33:22] again it's an isolated mode so you can't [33:24] access the red stuff only the spu itself [33:26] can do that but you can access the green [33:28] stuff and you need to supply a [33:29] revocation list so this list is of [33:31] course signed and encrypted so they have [33:33] to copy it to the um to the protected [33:36] part because they don't want you if they [33:38] would decrypt it in place and check the [33:40] signature in place you could just like [33:42] wait for it to do that and then at the [33:44] right time write some power PC code to [33:46] modify it so they really have to copy it [33:48] and here's how they do [33:54] that so what's wrong here the problem is [33:57] that we have the destination buffer lies [34:00] before lv2 loader code the saw buffer so [34:03] we control the source and we control the [34:05] length of the source so what if we just [34:07] write some really really huge value [34:10] there well we overwrite lv2 loader code [34:13] and run code in isolated spu mode then [34:15] we can just go ahead and dum their keys [34:17] just write something to put push them [34:18] over to the power PC and then yeah then [34:21] we can actually reverse the whole loer [34:22] and we get some keys [34:26] there [34:28] [Applause] [34:35] so what are the implications of this so [34:38] it's only a bug in one isolated loader [34:41] however if we put such a modified uh [34:43] revocation list onto the um nor fles the [34:46] hypervisor will just load it it does not [34:48] care about the size and that that code [34:50] actually works and will just Supply a [34:52] really huge revocation list to like lb2 [34:55] loader then we patch lv2 loader to ignor [34:58] and well we get our code running at boot [35:00] time without any kind of dongles or [35:02] stuff and this breaks the chain of trust [35:05] pretty [35:16] early so as you can see there this is [35:18] fail but we promised epic fail so we'll [35:20] have to look [35:23] further so let's go back to the table [35:25] well the train of trust is broken [35:30] and back to the S we now like how just [35:33] about everything works here except for [35:35] the signature part so how do they do [35:38] that how does the signature thing work [35:41] so this is ecdsa and it's some crazy [35:43] math stuff that guy over there is going [35:45] to explain [35:48] now [35:56] hi okay so the thing we're trying to do [35:59] is figure out the private key they use [36:01] to to put signature on all the files uh [36:05] you normally cannot do that of course [36:07] that's why it's a good crypto system uh [36:12] uh in ecsa there's a lot of parameters [36:14] that are public that p a b g n q e RS [36:19] whatever uh but there are two things [36:22] that are private uh in a in a single [36:24] signature that's K the private key which [36:27] we want have and it's m which it's [36:29] supposed to be a random number next [36:33] slide okay so how does someone who signs [36:37] something calculate uh the numbers R and [36:40] S which are the signature well R is done [36:43] by uh by Scala multiplication of Base [36:46] point of the elliptic curve blah blah [36:48] difficult stuff it's the difficult [36:50] problem that uh uh that's the base of uh [36:54] the security of all elliptic curve [36:56] crypto [36:58] uh but s is just calculated as normal [37:01] numbers um well so that that first [37:06] equation uh we cannot solve no one in [37:08] the world can solve it so let's just [37:10] ignore it but the second equation uh [37:13] it's it's got two unknowns in it now K [37:15] and M so we cannot solve for it [37:18] either but m is supposed to be a random [37:21] number and for some reason Sony uses the [37:24] same random number all the time [37:27] [Applause] [37:38] so so there at the top are is are the [37:41] two equations again but twice now like [37:43] we have two uh two separate [37:46] signatures uh we're going to ignore that [37:48] top one again because it's difficult [37:50] right uh but now at at uh the equation [37:54] for S1 and S2 uh we still have only two [37:58] unknowns because it's the same M it's [38:01] supposed to be a different M every time [38:02] theyve got three unknowns only two [38:04] equations no way to solve it but now we' [38:07] got uh only two unknowns so uh it's it's [38:11] trivial to just solve for M by just uh [38:14] uh you take the two uh uh the two [38:17] formulas subtract whatever just a bit of [38:20] formula manipulation and then you solve [38:22] M and then you've got M and just fill it [38:24] in and then you solve for Okay so we [38:27] we've got a private key without uh [38:30] without even having to know most of uh [38:33] most of the curve parameters and [38:37] [Applause] [38:45] anything so we actually used ecdsa in [38:49] the homeb channels Network update [38:51] function so that someone can't own your [38:53] Wii through a man in the middle attack [38:54] or something so this is how we do it [38:56] right we do the e math you can see the M [38:58] * EG blah blah blah blah stuff there and [39:00] for M we read cryptographically secure [39:03] random numbers from Dev random on [39:06] Linux uh you know that's what you're [39:07] supposed to do and what Sony does is [39:12] well [39:13] [Applause] [39:19] [Applause] [39:23] yeah and of course as uh SEC explained [39:27] if you use the same M you can calculate [39:29] K once you have two signatures and if [39:31] you have K well that's a private key and [39:33] with a private key you can sign [39:36] [Music] [39:37] [Applause] [39:45] things so these signatures are every bit [39:48] as valid as Sony's official signatures [39:50] they are [39:51] indistinguishable and we can we can get [39:53] keys for lv2 we can get keys for lv1 we [39:56] can get keys keys for revocation lists [39:59] we can get keys for uh Hy Professor [40:01] configuration files which is interesting [40:03] and for packages and a whole bunch of [40:05] stuff so um we actually don't have keys [40:06] for level one because we can't run that [40:08] loader because do weird Hardware stuff [40:10] so we still have to figure that out yeah [40:11] sorry so in fact you can get the keys if [40:13] you have the um plane text for all the [40:16] loaders but right now Sony's security [40:17] for the few loaders that haven't been [40:19] dumped yet hinges on just the a stuff [40:21] that we don't have and the per console [40:23] key but everything that you need to get [40:26] these keys in is inside a PS3 you you [40:28] just have to get to it so back to the [40:31] table here [40:33] well they bot the public key crypto so [40:36] that's a big fail and we're left with [40:38] user Cur mode with in the on di boot R [40:41] which are not exactly high-tech security [40:43] features [40:46] so pretty [40:49] much botch the entire [40:51] [Applause] [40:56] thing [41:00] so thanks [41:02] Sony all right [41:04] so all [41:07] right coming [41:10] soon looks like we might have a little [41:12] bit of time for questions for [41:15] Q&A we're actually going to try to do a [41:18] demo of this and we were going to do it [41:19] now but as usual demos are late or don't [41:22] work uh in fact we have video issues the [41:24] same way we have video issues with the [41:26] bootney demo uh 2 years ago so we're [41:28] going to try to fix that and we're [41:30] trying to schedule a lightning talk [41:31] tomorrow to uh get that uh [41:41] presented so if you have any questions [41:43] we have two microphones on the left and [41:45] the right please line [41:52] up and if you're afraid of asking [41:55] questions in public the people are down [41:58] at the hex [42:03] Center I got a question um do you know [42:06] where the pi jailbreak came from not a [42:09] clue seriously not a clue we can guess [42:12] but we you we don't have any proof of [42:14] absolutely anything we think it's [42:16] somewhere from the Southern [42:21] Hemisphere and uh right now um I noticed [42:25] that the uh not only only the um exploit [42:29] but uh the USB stack exploit but also [42:32] the the the payload has been completely [42:34] reverse engineered so uh there are [42:38] there's source code available right now [42:40] uh for everything yeah well right now as [42:42] best do is public has been for a while [42:44] it contains an implementation of the USB [42:46] exploit that runs on TI omap processors [42:49] there are a whole bunch of clones for [42:50] other chips and of course there's also a [42:53] reverse engineered payload for that if [42:55] you want to replicate the original PS uh [42:57] jailbreak functionality instead of [42:58] running clinics that's out there right [43:00] now our stuff uh we well we did some [43:03] pretty terrible hacks to make it work [43:05] for the demo hopefully tomorrow so we [43:07] need to clean things up and make it [43:08] serer but I mean I expect gu in the next [43:11] month or something like that we'll uh [43:12] release clean tools for the stuff do [43:15] that we did [43:16] here thank [43:18] you okay a question from [43:22] thefc um now that you can sign your own [43:25] code why can't you create a Blu-ray [43:28] software [43:31] payload could you repeat [43:34] that someone asked um now that you can [43:38] sign your own code why can't you create [43:40] a Blu-ray software payload so we [43:43] actually don't have the key to sign uh [43:46] games because that's apploader and uh [43:48] they changed those keys uh several times [43:51] actually no they didn't change but we [43:52] don't have it why don't we have we we [43:53] don't have an exploit ner sorry uh so [43:55] yeah you need the pl of the loader to [43:57] get the public key and once you have the [43:59] public key then that so we can't sign [44:01] games and also we don't really care [44:03] about games because we care about lowle [44:05] access it it's probably possible [44:07] eventually but we're not planning on [44:08] working on it [44:15] yeah so any more [44:18] questions no so if you leave the room [44:20] please go to the right pick all the [44:23] trash which which is around you and [44:25] everything that's valuable please put to [44:27] loss and found thank [44:30] [Music] [44:30] [Applause] [44:38] you