xfangfang / PPPwn_cpp

C++ rewrite of PPPwn (PlayStation 4 PPPoE RCE)
GNU General Public License v3.0
354 stars 51 forks source link
pppwn ps4 ps4-jailbreak ps4exploit

PPPwn c++

This is the C++ rewrite of PPPwn

Features

Nightly build

You can download the latest build from nightly.link.

For Windows users, you need to install npcap before run this program. There are lots of GUI wrapper for pppwn_cpp, it's better to use them if you are not familiar with command line.

For macOS users, you need to run sudo xattr -rd com.apple.quarantine <path-to-pppwn> after download. Please refer to #10 for more information.

Usage

show help

pppwn

list interfaces

pppwn list

run the exploit

pppwn --interface en0 --fw 1100 --stage1 "stage1.bin" --stage2 "stage2.bin" --timeout 10 --auto-retry

Supplement:

  1. For --timeout, waiting for PADI is not included, which allows you to start pppwn_cpp before the ps4 is launched.
  2. For --no-wait-padi, by default, pppwn_cpp will wait for two PADI request, according to TheOfficialFloW/PPPwn/pull/48 this helps to improve stability. You can turn off this feature with this parameter if you don't need it.
  3. For --wait-after-pin, according to SiSTR0/PPPwn/pull/1 set this parameter to 20 helps to improve stability (not work for me), this option not used in web interface.
  4. For --groom-delay, This is an empirical value. The Python version of pppwn does not set any wait at Heap grooming, but if the C++ version does not add some wait, there is a probability of kernel panic on my ps4. You can set any value within 1-4097 (4097 is equivalent to not doing any wait).
  5. For --buffer-size, When running on low-end devices, this value can be set to reduce memory usage. I tested that setting it to 10240 can run normally, and the memory usage is about 3MB. (Note: A value that is too small may cause some packets to not be captured properly)

Development

This project depends on pcap, cmake will search for it in the system path by default. You can also add cmake option -DUSE_SYSTEM_PCAP=OFF to compile pcap from source (can be used when cross-compiling).

Please refer to the workflow file .github/workflows/ci.yaml for more information.

# native build (macOS, Linux)
cmake -B build
cmake --build build -t pppwn

# cross compile for mipsel linux (soft float)
cmake -B build -DZIG_TARGET=mipsel-linux-musl -DUSE_SYSTEM_PCAP=OFF -DZIG_COMPILE_OPTION="-msoft-float"
cmake --build build -t pppwn

# cross compile for arm linux (armv7 cortex-a7)
cmake -B build -DZIG_TARGET=arm-linux-musleabi -DUSE_SYSTEM_PCAP=OFF -DZIG_COMPILE_OPTION="-mcpu=cortex_a7"
cmake --build build -t pppwn

# cross compile for Windows
# https://npcap.com/dist/npcap-sdk-1.13.zip
cmake -B build -DZIG_TARGET=x86_64-windows-gnu -DUSE_SYSTEM_PCAP=OFF -DPacket_ROOT=<path to npcap sdk>
cmake --build build -t pppwn

Credits

Big thanks to FloW's magical work, you are my hero.