Editing Vulnerabilities

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 101: Line 101:
== Usermode Exploits (Game Savedata) ==
== Usermode Exploits (Game Savedata) ==


=== PS1 games savedata exploits ===
=== PS2 games savedata exploits ===


See [https://www.psdevwiki.com/ps1/Vulnerabilities PS1 savedata exploits on PS1 Dev Wiki].
==== GTA III ====


Official PS Classic games (warning: some may be remastered, to check) on PS4/PS5 available on PS Store:
* [https://github.com/halpz/re3/blob/9a7fa478578beaba947ea867c15a25e411d641d8/src/save/MemoryCard.cpp#L358 vulnerability]
* Ape Escape - First-time NA re-release on PS4/PS5
* Cool Boarders (2000)
* Hot Shots Golf - First-time NA re-release on PS4/PS5
* I.Q. Intelligence Qube - First-time NA re-release on PS4/PS5
* Jumping Flash! - Free PS4/PS5 version for PS3 PSone Classics owners
* MediEvil (1998)
* Mr. Driller - PlayStation Plus Premium subscription only (?)
* Oddworld: Abe’s Oddysee - Free PS4/PS5 version for PS3 PSone Classics owners
* G-Police (1997)
* R4: Ridge Racer Type 4 (1998)
* Resident Evil: Director’s Cut - PlayStation Plus Premium subscription only
* Syphon Filter - Free PS4/PS5 version for PS3 PSone Classics owners
* Tekken 2 - PlayStation Plus Premium subscription only
* The Legend of Dragoon (1999)
* Toy Story 2: Buzz Lightyear To The Rescue! - Free PS4/PS5 version for PS3 PSone Classics owners
* Twisted Metal (1995) UP9000-CUSA43359_00-SCUS943040000000 or JP9000-CUSA43360_00-SIPS600070000000
* Twisted Metal 2 / Twisted Metal EX UP9000-CUSA43361_00-SCUS943060000000 or JP9000-CUSA43362_00-SIPS600210000000
* Wild Arms - Free PS4/PS5 version for PS3 PSone Classics owners
* Worms World Party - First-time NA re-release on PS4/PS5
* Worms Armageddon - First-time NA re-release on PS4/PS5


* https://www.playstation.com/en-us/editorial/iconic-must-play-titles-on-playstation-plus-classics-catalog/
The game does a copy from the memory card into a fixed-size buffer with size supplied by the savedata.
* https://www.reddit.com/r/PS3/comments/1cscsb2/all_ps1pspps3_games_that_have_crossbuy_or_free/
* https://www.reddit.com/r/PlayStationPlus/comments/vfg39t/is_there_a_clear_list_of_which_ps1_classic_ps4ps5/


"I have bought some of them on the PS3/Vita and the ones I could claim on the PS4/PS5 were Tekken 2 (which previously was not redeemable), all Syphon Filter games, all Wild Arms games, Legend of Dragoon, Ridge Racer Type 4 and Jumping Flash. Resident Evil Director's Cut is NOT redeemable. The rule of thumb is: if you can buy it on PS4/PS5 - and not only claim it through plus premium/deluxe sub, like Resident Evil 1 - they are redeemable from a previous purchase on PS3/PSP/Vita."
==== Dark Cloud ====


=== PS2 games savedata exploits ===
* [https://www.youtube.com/results?search_query=%22dark+cloud%22+item+glitch+menu+before%3A2008-01-01 video of bug triggering]


See [https://www.psdevwiki.com/ps2/Vulnerabilities#PS2_Savedata_exploits PS2 savedata exploits on PS2 Dev Wiki].
Moving the cursor and pressing X on the same frame in the items menu allows us to pick up an item from out-of-bounds memory, which results in exploitable behaviour.


Official PS2onPS4 games sold on the PS Store (as of September, 2024):
==== Okage Shadow King ====
* ADK DAMASHII™ UP0576-CUSA03783_00-SLPS259060000001 https://image.api.playstation.com/cdn/UP0576/CUSA03783_00/BpMMUC8q1MRAsL9iWDh6vbW844hq3JXK.png
* Arc the Lad: Twilight of the Spirits
* Art of Fighting Anthology
* Ape Escape 2
* Bully (Canis Canem Edit)
* Dark Chronicle (Dark Cloud 2) UP9000-CUSA02037_00-SCUS972130000001 https://image.api.playstation.com/cdn/UP9000/CUSA02037_00/hIKSKqBMerypNW49TCECATZSBBUcSBph.png
* Dark Cloud
* Destroy All Humans!
* Destroy All Humans! 2
* Eternal Ring UP1022-CUSA04654_00-SLUS200150000001 https://image.api.playstation.com/cdn/UP1022/CUSA04654_00/DRIS0z7mtNMYZPchoqLnKlhJqyNvM8mZ.png
* FantaVision
* Fatal Fury Battle Archives Vol. 2
* Forbidden Siren
* Fu'un Super Combo UP0576-CUSA03784_00-SLPS257810000001 https://image.api.playstation.com/cdn/UP0576/CUSA03784_00/QWsetumZLYupFHsOIkoGbKYpySGBdtlp.png
* Ghosthunter (English, Japanese) UP9000-CUSA47996_00-SLUS209930000000
* GTA III
* GTA Vice City
* GTA San Andreas
* Harvest Moon: Save the Homeland
* Harvest Moon: A Wonderful Life Special Edition
* Hot Shots® Tennis (Everybody's Tennis) UP9000-CUSA02193_00-SCUS976100000001 https://image.api.playstation.com/cdn/UP9000/CUSA02193_00/FrJXexHruy7pjB6bCgDidXRbakNfNJJc.png
* Indigo Prophecy
* Jak and Daxter: The Precursor Legacy
* Jak II: Renegade
* Jak 3
* Jak X: Combat Racing
* Kinetica UP9000-CUSA01725_00-SCUS971320000001 https://image.api.playstation.com/cdn/UP9000/CUSA01725_00/EKH34FKOEt3dTXLCiccuawdS8iGIqGLF.png
* Manhunt
* Max Payne
* Metal Slug Anthology
* Okage: Shadow King UP9000-CUSA02199_00-SCUS971290000001, requires PS4 FW version 3.15, although it was compiled with PS4 SDK version 3.008.000, latest patch requires PS4 FW 4.05
* PaRappa the Rapper 2
* Primal
* Psychonauts
* Puzzle Quest: Challenge of the Warlords
* Red Dead Revolver
* Red Faction
* Red Faction II
* Resident Evil Code: Veronica X
* Rise of the Kasai
* Rogue Galaxy
* Samurai Shodown VI
* Sly Raccoon (2002), Sly Cooper and the Thievius Racoonus UP9000-CUSA47431_00-SCUS971980000000 requires PS4 FW ?11.00? (update requires PS4 11.508.000)
* Star Ocean Till The End Of Time
* Star Wars Bounty Hunter
* Star Wars Racer Revenge
* STAR WARS: Jedi Starfighter UP1082-CUSA03473_00-SLUS202930000001 https://image.api.playstation.com/cdn/UP1082/CUSA03473_00/PGRyqtcRKUoAsP4bJAhcoziTwL8940k1.png
EP1006-CUSA03494_00-SLES503710000001
https://image.api.playstation.com/cdn/EP1006/CUSA03494_00/9MsXVY5UULzSHB5BTreuKhwep3KZwvQP.png
* STAR WARS The Clone Wars UP1082-CUSA48010_00-SLUS205100000000
* The King of Fighters Collection: The Orochi Saga
* The King of Fighters '98 Ultimate Match
* The King of Fighters 2000
* The Mark of Kri
* The Warriors
* Tomb Raider: Legend UP8489-CUSA48389_00-SLUS212030000000 https://store.playstation.com/store/api/chihiro/00_09_000/titlecontainer/SE/en/999/CUSA48389_00/image
* Twisted Metal: Black
* War of the Monsters
* Wild Arms 3


* See [https://www.playstation.com/en-us/editorial/iconic-must-play-titles-on-playstation-plus-classics-catalog/].
===== Credits =====
 
* CTurt for discovering these vulnerabilities in September 2021.
Official PS2onPS4 games sold on Bluray Discs:
* CTurt for public disclosure [https://twitter.com/CTurtE/status/1570189920844804097 on twitter] https://twitter.com/CTurtE/status/1570189920844804097(2022-09-14)
* ADK DAMASHII™ UP0576-CUSA03783_00-SLPS259060000001 https://image.api.playstation.com/cdn/UP0576/CUSA03783_00/BpMMUC8q1MRAsL9iWDh6vbW844hq3JXK.png
* flatz, balika011, theflow0, chicken(s), PlayStation for helping CTurt
* Art of Fighting Anthology (by Limited Run #375) UP0576-CUSA03754_00-SLUS214870000001 https://image.api.playstation.com/cdn/UP0576/CUSA03754_00/Hf5lUn48Ds3UDNp8NNjdzv7f1BZWGaai.png
* McCaulay for sharing publicly his implementation in February 2023.
* Destroy All Humans! (2005) (PS2 Classic by Limited Run #370, not to be confused with the remake EP4389-CUSA14910_00-DAH1REMAKEEU0000) UP4389-CUSA05232_00-SLUS209450000001 https://image.api.playstation.com/cdn/UP4389/CUSA05232_00/XrgVkqoR5rvZk4tAGi2j7OFfHpAZWKUu.png
* Fatal Fury Battle Archives Vol. 2 (by Limited Run #371) UP0576-CUSA03750_00-SLUS217230000001 https://image.api.playstation.com/cdn/UP0576/CUSA03750_00/gFCLAhlGZwvFkra1p2sozwIZ5SH1OyZO.png
* Fu'un Super Combo UP0576-CUSA03784_00-SLPS257810000001 https://image.api.playstation.com/cdn/UP0576/CUSA03784_00/QWsetumZLYupFHsOIkoGbKYpySGBdtlp.png
* Indigo Prophecy™ (aka Fahrenheit 2005, by Limited Run #331) UP1642-CUSA04798_00-SLUS211960000001 https://image.api.playstation.com/cdn/UP1642/CUSA04798_00/WJFDq83f1tcZ0E2PkEa1rXOba8laaZUV.png
* Jak and Daxter: The Precursor Legacy™ UP9000-CUSA02522_00-SCUS971240000001 https://image.api.playstation.com/cdn/UP9000/CUSA02522_00/o9zJoXqpd4lzarjIbvvZLFjYGLsLvqCp.png
* Jak X Combat Racing™® UP9000-CUSA07842
* Jak II UP9000-CUSA07840
* Jak 3 UP9000-CUSA07841
* METAL SLUG ANTHOLOGY™ (US version by Limited Run #364) UP0576-CUSA03749_00-SLUS215500000001 https://image.api.playstation.com/cdn/UP0576/CUSA03749_00/ImHDRENlttkdiXlm3K8ejNVgLURd3uTw.png
* METAL SLUG ANTHOLOGY™ (EU version by SNK) EP0576-CUSA04156_00-SLES546770000001 https://image.api.playstation.com/cdn/EP0576/CUSA04156_00/NN7npbsEvxIRGI8lBVhm9I5BwFzdGlOK.png
* Psychonauts UP2154-CUSA03881
* Red Faction (by Limited Run #281) UP4389-CUSA06402_00-SLUS200730000001 https://image.api.playstation.com/cdn/UP4389/CUSA06402_00/T07Bf136claKzP3SHF30QLa2xMAFjSpP.png
* Samurai Shodown VI (by Limited Run #329) UP0576-CUSA03787_00-SLUS216290000001 or EP0576-CUSA04158_00-SLES552920000001 https://image.api.playstation.com/cdn/UP0576/CUSA03787_00/CuLRRdOYvdge0IW9LL9Vewj44RCc6OAU.png https://image.api.playstation.com/cdn/EP0576/CUSA04158_00/7SrtqugKMJixAcbprEE0ExGUOHlhL0F7.png
* STAR WARS™ BOUNTY HUNTER™ (US version) UP1082-CUSA03472_00-SLUS204200000001
* STAR WARS™ BOUNTY HUNTER™ (EU version) EP1006-CUSA03493_00-SLES508310000001
* Star Wars Racer Revenge UP1082-CUSA03474, requires PS4 FW version ?3.15, although it was compiled with SDK version 3.008.000?
* The King of Fighters '98 Ultimate Match (by Limited Run #344) UP0576-CUSA03751_00-SLUS218160000001 https://image.api.playstation.com/cdn/UP0576/CUSA03751_00/bp4LfKIjcVTMfKP3O4LrDJHWzY6vZDar.png
* The King of Fighters 2000 (by Limited Run #386) UP0576-CUSA03748_00-SLUS208340000001 https://image.api.playstation.com/cdn/UP0576/CUSA03748_00/tvXJmFqa9zkXAAKCij20B3spadkqGuka.png
* The King of Fighters™ Collection: the Orochi Saga (by Limited Run #393) UP0576-CUSA03753_00-SLUS215540000001 https://image.api.playstation.com/cdn/UP0576/CUSA03753_00/E3gFtUUjCu2WDBSIGeXMV40sfF4uHzZi.png
 
These PS2onPS4 games can be bought online directly via Limited Run Games for brand new or for example on Ebay for second hand or like new.


=== PSP games savedata exploits ===
===== Analysis =====
* [https://mccaulay.co.uk/mast1c0re-part-1-modifying-ps2-game-save-files Writeup part 1 by McCaulay (2023-02-08)]
* [https://mccaulay.co.uk/mast1c0re-part-2-arbitrary-ps2-code-execution Writeup part 2 by McCaulay (2023-02-10)]


See [https://www.psdevwiki.com/psp/Vulnerabilities PSP savedata exploits on PSP Dev Wiki].
===== Bug Description =====
Okage Shadow King has a typical stack buffer overflow if you extend the player or town name in a savedata.
* [https://store.playstation.com/en-us/product/UP9000-CUSA02199_00-SCUS971290000001 PS4 digital version CUSA02199 of SCUS97129 on PS Store]
Okage Shadow King for PS4 (CUSA02282) base version (1.00) requires FW version 3.15, although it was compiled with SDK version 3.008.000. Okage Shadow King for PS4 (CUSA02199 and CUSA02282) patch 1.01 requires FW version 4.05.


* https://wololo.net/2012/09/01/when-the-psp-and-the-vita-show-their-battle-scars/
===== Exploit Implementation =====
* https://wololo.net/talk/viewtopic.php?f=52&t=11183&start=10#p143779
* [https://github.com/McCaulay/okrager Okrager by McCaulay (2023-02-04)]
* https://www.playstation.com/en-us/editorial/iconic-must-play-titles-on-playstation-plus-classics-catalog/


Official PS2onPS4 games sold on the PS Store (as of September, 2024):
===== Patched =====
* Tekken 6 UP0700-CUSA33754_00-TEKKEN6000000000
'''No'''. Unpatchable in theory.
* Killzone: Liberation (2006) EP9000-CUSA37875_00-UCES002790000000
* Ratchet & Clank: Size Matters (2007) UP9000-CUSA41395_00-UCUS986330000000
* Syphon Filter: Logan's Shadow (2007) EP9000-CUSA32631_00-UCES007100000000
* Pursuit Force (2005) UP9000-CUSA37191_00-UCUS986400000000 or EP9000-CUSA37192_00-UCES000190000000 or HP9000-CUSA37193_00-UCKS450160000000
* Pursuit Force: Extreme Justice UP9000-CUSA34853_00-UCUS987030000000
* Super Stardust Portable (2007) EP9000-CUSA33036_00-NPEG000080000000
* Resistance: Retribution (2009) UP9000-CUSA32636_00-UCUS986680000000 or EP9000-CUSA32637_00-UCES011840000000
* Jeanne d’Arc (2006) UP9000-CUSA41018_00-UCUS987000000000


=== PS4/PS5 PS2emu sandbox escape (mast1c0re) ===
=== PS4/PS5 PS2emu sandbox escape (mast1c0re) ===


Advantages of the PS4/PS5 PS2emu sandbox escape exploit over most WebKit exploits:
Advantages of the PS4/PS5 PS2emu sandbox escape exploit over most WebKit exploits:
* Bigger kernel attack surface (more usermode privileges) versus WebKit very restricted and becoming more and more with firmware revisions. For example, the PS2emu process uses libkernel_sys, which supports nmount and so mounting of system partitions, whilst neither libkernel_web nor regular libkernel do.
* Bigger kernel attack surface (more usermode privileges) versus WebKit very restricted and becoming more and more with firmware revisions. For example, the PS2emu process uses libkernel_sys, which supports nmount and so mount of system partitions, whilst neither libkernel_web nor regular libkernel do.
* 100% reliable versus WebKit exploits becoming less and less stable with firmware revisions
* 100% reliable versus WebKit exploits becoming less and less stable with firmware revisions
* Firmware agnostic (ROP-less code execution) versus almost one WebKit revision every three firmware update
* Firmware agnostic (ROP-less code execution) versus almost one WebKit revision every three firmware update
Line 266: Line 160:


==== Exploit Implementation ====
==== Exploit Implementation ====
* [https://github.com/McCaulay/mast1c0re mast1c0re implementation by McCaulay (2023-02-18)]
* [https://github.com/McCaulay/mast1c0re (2023-02-18)]


==== Patched ====
==== Patched ====
'''No''' as of PS4 FW 11.50 and PS5 FW 8.00. Using the PS2onPS4 game Okage Shadow King, the exploit should work starting from PS4 FW 3.15 and PS5 FW 1.00.
'''No''' as of PS4 FW 11.00 and PS5 FW 8.00. Using the game Okage Shadow King, the exploit should work starting from PS4 FW 3.15 and PS5 FW 1.00.
 
=== PS4/PS5 game savedata LUA exploit ===
 
* Used by Flatz on 2023-07-27 in [https://wololo.net/2023/07/28/ps5-flat_z-dumps-ps5-secure-processor-confirms-he-has-a-ps5-hypervisor-exploit-via-a-ps4-game-save-exploit/ his Hypervisor exploit].
 
* Used by Flatz on 2024-09-14 in [https://gist.github.com/flatz/5e12f75cdb210516d31df03069f7ed0a his implementation of the umtx UaF kernel exploit].
 
* Some PS4 (or maybe PS5) games, in disc version (probably also available in PS Store version but potentially patched), can be exploited as they use some LUA interpreter, by crafting an evil save data.
 
* Possible vulnerable games: Pay Day 2, Mafia III, God of War (which one?).
 
* Not patched as of PS4 FW ?12.00? and PS5 FW 7.61.


== Usermode Exploits (BD-J) ==
== Usermode Exploits (BD-J) ==
Line 349: Line 231:


=== WebKit sources ===
=== WebKit sources ===
[https://web.archive.org/web/20231108165430/https://doc.dl.playstation.net/doc/ps4-oss/webkit.html WebKit sources] Currently archived up to version 10.01. Useful for developers that can't access PlayStation URLs and also for when Sony inevitably stops hosting the sources in the future.
[https://web.archive.org/web/20231108165430/https://doc.dl.playstation.net/doc/ps4-oss/webkit.html WebKit sources] Currently archived up to version 10.01. Useful for developers that can't access PlayStation URLs and also for when Sony inevitably stops hosting the sources in the future.
=== FW ?10.00?-11.52 - Unknown heap and string overflow (no CVE) leading to crash ===
==== Credits ====
* Debty for PoC public disclose (2024-08-29)
==== Analysis ====
* [https://github.com/Debvt/Wm/tree/Root0 PoC and analysis by Debty (2024-08-29)]
==== Bug Description ====
* TODO
Implementation description by Debty:<br />
String exploit is not actually an exploit but just a memory exhauster. It is not actually viable so instead there is a feature called "latest iteration".
==== Exploit Implementation ====
* [https://github.com/Debvt/Wm/tree/Root0 PoC by Debty (2024-08-29)]
==== Patched ====
'''Yes''' on PS4 FW 12.00 and PS5 FW 10.00.
Tested working on PS4 FWs 10.00-11.52 and PS5 FWs 6.00-9.60.
=== FW 10.00-11.02 - JSC DFG Abstract Intepreter clobberWorld Type Confusion (no CVE) leading to arbitrary RW ===
==== Credits ====
* ENKI for public disclose and analysis (2024-06-03)
==== Analysis ====
* [https://medium.com/@enki-techblog/ios-16-5-1-safari-rce-analysis-cve-2023-37450-89bb8583bebc Analysis by ENKI (2024-06-03)]
* [https://github.com/WebKit/WebKit/commit/1b0741f400ee2d31931ae30f2ddebe66e8fb0945 Patch commit #1 (2023-07-31)]
* [https://github.com/WebKit/WebKit/commit/39476b8c83f0ac6c9a06582e4d8e5aef0bb0a88f Patch commit #2 (2023-05-01)]
* [https://www.zerodayinitiative.com/blog/2018/4/12/inverting-your-assumptions-a-guide-to-jit-comparisons Inverting Your Assumptions: A Guide to JIT Comparisons by Jasiel Spelman (2018-04-12)]
==== Bug Description ====
* TODO
==== Exploit Implementation ====
* [https://medium.com/@enki-techblog/ios-16-5-1-safari-rce-analysis-cve-2023-37450-89bb8583bebc PoC by ENKI (2024-06-03)]
==== Patched ====
'''Yes''' on PS4 FW 11.50 and PS5 FW 9.00.
Tested working on PS4 FWs 10.00-11.02 and PS5 FWs 6.00-8.60. PS4 FWs <= ?9.60? and PS5 FWs <= ?5.50? are invulnerable.


=== FW 6.00-9.60 - FrameLoader::loadInSameDocument() UaF (CVE-2022-22620) leading to arbitrary RW ===
=== FW 6.00-9.60 - FrameLoader::loadInSameDocument() UaF (CVE-2022-22620) leading to arbitrary RW ===
Line 401: Line 238:
* Sergei Glazunov, Google Project Zero, for reporting the bug in 2013-01 and answering Maddie Stone's questions in 2022 (2013)
* Sergei Glazunov, Google Project Zero, for reporting the bug in 2013-01 and answering Maddie Stone's questions in 2022 (2013)
* Maddie Stone, Google Project Zero, for sharing a write-up describing this vulnerability (2022-06-14)
* Maddie Stone, Google Project Zero, for sharing a write-up describing this vulnerability (2022-06-14)
* Abc (anonymous person) for making an OOM PoC for webkit-gtk, PS4 and PS5 (2023-10-03) then making an arbitrary RW PoC (PSFree) for webkit-gtk, PS4 6.00-9.60 and PS5 1.00-5.50 (2023-10-24)
* Anonymous for making an OOM PoC for webkit-gtk, PS4 and PS5 (2023-10-03) then making an arbitrary RW PoC (PSFree) for webkit-gtk, PS4 6.00-9.60 and PS5 1.00-5.50 (2023-10-24)
* CelesteBlue for testing and porting abc' PSFree to PS4 6.00-9.60 and PS5 1.00-5.50 (2023-11-04)
* CelesteBlue for testing and porting anonymous' PSFree to PS4 6.00-9.60 and PS5 1.00-5.50 (2023-11-04)


==== Analysis ====
==== Analysis ====
Line 456: Line 293:
* Simple PoC for ASAN webkit-gtk by Maddie Stone in Maddie Stone's writeups
* Simple PoC for ASAN webkit-gtk by Maddie Stone in Maddie Stone's writeups
* [https://github.com/springsec/CVE-2022-22620/blob/main/CVE-2022-22620_infoleak_exploit.html Information leak PoC for webkit-gtk by springsec]
* [https://github.com/springsec/CVE-2022-22620/blob/main/CVE-2022-22620_infoleak_exploit.html Information leak PoC for webkit-gtk by springsec]
* [https://discord.com OOM PoC for PS4 and PS5 by abc on ps4-dev discord (to mirror)]
* [https://discord.com OOM PoC for PS4 and PS5 by anonymous on ps4-dev discord (to mirror)]
* [https://discord.com Arbitrary RW PoC (PSFree) for PS4 6.00-9.60 and PS5 1.00-5.50 by abc on ps4-dev discord (to mirror)]
* [https://discord.com Arbitrary RW PoC (PSFree) for PS4 6.00-9.60 and PS5 1.00-5.50 by anonymous on ps4-dev discord (to mirror)]


==== Patched ====
==== Patched ====
Line 797: Line 634:
==== Tested ====
==== Tested ====
Works on 3.15, 3.50 FW. Maybe working on 3.51 FW.
Works on 3.15, 3.50 FW. Maybe working on 3.51 FW.
----
=== FW <= ?2.50? - JavaScript OnLoad Handler Remote Code Execution Vulnerability (CVE-2005-1790) leading to crash or lag ===
==== Credits ====
* Benjamin Tobias Franz for the vulnerability discovery (2005-11-21)
* Stuart Pearson for the Proof of Concept on Microsoft Internet Explorer
* Sam Sharps for the Metasploit port (2012-01)
* Jeerum for disclosing that the vulnerability affects PS4 <=2.50 (2014-10-31).
==== Analysis ====
* [https://web.archive.org/web/20150617052519/http://sebug.net:80/paper/Exploits-Archives/2012-exploits/1201-exploits/ms05_054_onload.rb.txt Metasploit file by Sam Sharps (2012-01)]
* [https://malware.wicar.org/data/ms05_054_onload.html PoC by wicar.org (before 2012-11-10)]
* [https://wololo.net/talk/viewtopic.php?f=63&t=40446 PoC for PS4 by Jeerum (2014-10-31)]
* [https://www.youtube.com/watch?v=J_-1nyfCo84 PS4 4.55 test of 1js by Jeerum]
==== Bug Description ====
This bug is triggered when the browser handles a JavaScript 'onLoad' handler in conjunction with an improperly initialized 'window()' JavaScript function. This exploit results in a call to an address lower than the heap. The javascript prompt() places our shellcode near where the call operand points to. We call prompt() multiple times in separate iframes to place our return address. We hide the prompts in a popup window behind the main window. We spray the heap a second time with our shellcode and point the return address to the heap. I use a fairly high address to make this exploit more reliable. Microsoft Internet Explorer will crash when the exploit completes. Also, please note that Microsoft Internet Explorer must allow popups in order to continue exploitation.
==== Exploit Implementation ====
==== Patched ====
'''Maybe'''
==== Tested ====
* Working on 1.76-2.50 FW: crash. 3.00-5.50 error CE-36329-3. 4.55 lag in background TV application (for example Netflix application).
----
----


Line 935: Line 746:
=== Module imports table cleaned before execution ===
=== Module imports table cleaned before execution ===


* Between 1.76 and 4.05, Sony did that to prevent WebKit exploiters from defeating usermode ASLR easily.
* Between 1.76 and 4.05, Sony did that to prevent webkit exploiters from defeating usermode ASLR easily.
* Now we have to dump entire usermode sandboxed memory, and by studying it we can defeat ASLR:
* Now we have to dump entire usermode sandboxed memory, and by studying it we can defeat ASLR:
1. Chose a function (ex: __stack_chk_fail) imported from libkernel.sprx by libSceWebkit2.sprx
1. Chose a function (ex: __stack_chk_fail) imported from libkernel.sprx by libSceWebkit2.sprx
Line 948: Line 759:


=== DEP / NX ===
=== DEP / NX ===
* "Data Execution Prevention" / "No eXecute" is enabled on all firmwares. It prevents allocating memory as both RW and RX at same time (RWX) so preventing us from writing shellcode to usermode memory then executing it.
* "Data Execution Prevention" / "No eXecute" is enabled on all firmwares. It prevents allocating memory as both RW and RX at same time (RWX) so preventing us from writing shellcode to usermode memory then executing it.
* 2 ways to bypass this security: JiT vulnerability (FW <= 1.76) or ROP (all FWs).
* 2 ways to bypass this security: JiT vulnerability (FW <= 1.76) or ROP (all FWs).


=== JiT removed from webbrowser ===
=== JiT removed from webbrowser ===
* On FW <= 1.76, you could map RWX memory from ROP by abusing the JiT functionality and the sys_jitshm_create and sys_jitshm_alias system calls. This however was fixed after 1.76, as WebKit has been split into two processes. One handles javascript compilation and the other handles other web page elements like image rendering and DOM. The second process will request JiT memory upon hitting JavaScript via IPC (Inter-Process Communication). Since we no longer have access to the process responsible for JiT, we can no longer (at least currently), map RWX memory for proper code execution unless the kernel is patched.
* On FW <= 1.76, you could map RWX memory from ROP by abusing the JiT functionality and the sys_jitshm_create and sys_jitshm_alias system calls. This however was fixed after 1.76, as WebKit has been split into two processes. One handles javascript compilation and the other handles other web page elements like image rendering and DOM. The second process will request JiT memory upon hitting JavaScript via IPC (Inter-Process Communication). Since we no longer have access to the process responsible for JiT, we can no longer (at least currently), map RWX memory for proper code execution unless the kernel is patched.
* Checking the source code at [https://doc.dl.playstation.net/doc/ps4-oss/webkit.html ps4-oss], starting as early as FW 6.00, ENABLE_JIT=OFF for -DPORT=PlayStation4. It means that JIT functionality is completely removed from WebKit and there is no JIT coprocess that is allowed to request RWX memory to even attack. Even if there are JIT bugs that can lead us to request RWX memory in other platforms, we can't on the PS4 as there is no longer any JIT process. Unchecked all source codes, JIT process could have been removed earlier than 6.00. All exploits must use ROP.
* Checking the source code at [https://doc.dl.playstation.net/doc/ps4-oss/webkit.html ps4-oss], starting as early as FW 6.00, ENABLE_JIT=OFF for -DPORT=PlayStation4. It means that JIT functionality is completely removed from WebKit and there is no JIT coprocess that is allowed to request RWX memory to even attack. Even if there are JIT bugs that can lead us to request RWX memory in other platforms, we can't on the PS4 as there is no longer any JIT process. Unchecked all source codes, JIT process could have been removed earlier than 6.00. All exploits must use ROP.
Line 959: Line 768:


=== Syscalls removed ===
=== Syscalls removed ===
* See the PS4 [[Syscalls]] list.


=== Syscall 0 disabled i.e Error Kernel: The application directly issues a syscall instruction (24) ===
=== Syscall 0 disabled i.e Error Kernel: The application directly issues a syscall instruction (24) ===
Line 973: Line 780:


=== bpf_open function blocked for unprivileged processes ===
=== bpf_open function blocked for unprivileged processes ===
* On 5.50, opening BPF has been blocked for unprivileged processes such as WebKit and other apps/games. It's still present in the sandbox, however attempting to open it will fail and yield EPERM. This aims blocking BPF kernel exploits especially qwertyoruiop's BPF double free UAF.
* On 5.50, opening BPF has been blocked for unprivileged processes such as WebKit and other apps/games. It's still present in the sandbox, however attempting to open it will fail and yield EPERM. This aims blocking BPF kernel exploits especially qwertyoruiop's BPF double free UAF.


=== bpf_ioctl function blocked or removed ===
=== bpf_ioctl function blocked or removed ===
 
* Moreover, on FW 5.50+, opening BPF is still possible in less sandboxed apps like test/devkits fselfs. But this is useless because ioctl does not work.
* On FW 5.50+, opening BPF is still possible in less sandboxed apps like TestKit/DevKits fSELFs. But this is useless because ioctl does not work.


=== Device access blocked/removed from webbrowser ===
=== Device access blocked/removed from webbrowser ===


* Around 6.50-6.70, device access got blocked or removed. Now you can no longer access devices from the web browser.
* Around 6.50-6.70, device access got blocked or removed. Now you can no longer access devices from webbrowser


=== Pointer poisoning in WebKit on 6.xx firmwares ===
=== WebKit implements pointer poisoning for 6.xx firmwares ===


* For select types implemented by WebKit (such as JSC::JSFunction), certain pointer fields are XOR'ed by a cryptographic key generated at runtime. The key is generated once every process launch, one must recover it to unpoison the pointers.
* For select types implemented by WebKit (such as JSC::JSFunction), certain pointer fields are XOR'ed by a cryptographic key generated at runtime. The key is generated once every process launch, one must recover it to unpoison the pointers.
Line 998: Line 803:
* 2024-03 iMrDJAi for porting CVE-2006-4304 to PS4 and PS5.
* 2024-03 iMrDJAi for porting CVE-2006-4304 to PS4 and PS5.
* 2024-04-25 TheFloW for disclosing his HackerOne report including the second spp bug description.
* 2024-04-25 TheFloW for disclosing his HackerOne report including the second spp bug description.
* 2024-04-30 TheFloW for releasing his exploit code for PS4 9.00 and 11.00.


==== Analysis ====
==== Analysis ====
Line 1,005: Line 809:


==== Bug Description ====
==== Bug Description ====
A malicious PPPoE server can cause denial-of-service or remote code execution in kernel context on the PS4/PS5. It does not require any usermode code execution to be triggered. There are two vulnerabilities that can be chained together to cause remote kernel Denial of Service, kernel ASLR defeat or kernel code execution : Heap buffer overwrite and overread in sppp_lcp_RCR and sppp_ipcp_RCR (CVE-2006-4304) and Integer underflow in sppp_pap_input leading to heap-buffer overread (no-CVE).
A malicious PPPoE server can cause denial-of-service or potentially remote code execution in kernel context on the PS4/PS5. There are two vulnerabilities that can be chained together to cause remote kernel Denial of Service, kernel ASLR defeat or kernel code execution : Heap buffer overwrite and overread in sppp_lcp_RCR and sppp_ipcp_RCR (CVE-2006-4304) and Integer underflow in sppp_pap_input leading to heap-buffer overread (no-CVE).
 
The PS4/PS5 must be connected using an ethernet cable to a device able to trigger PPPoE requests and analyze the responses.


==== Exploit Implementation ====
==== Exploit Implementation ====
* [https://github.com/iMrDJAi/FreeBSD9-CVE-2006-4304 CVE-2006-4304 PoC for FreeBSD9 by iMrDJAi (2024-04-07)]
* [https://github.com/iMrDJAi/FreeBSD9-CVE-2006-4304 CVE-2006-4304 PoC for FreeBSD9 by iMrDJAi (2024-04-07)]
* [https://gist.github.com/iMrDJAi/847a4f2eeff9669657ffcdf85ac7a901 CVE-2006-4304 PoC for PS4 and PS5 by iMrDJAi (2024-04-07)]
* [https://gist.github.com/iMrDJAi/847a4f2eeff9669657ffcdf85ac7a901 CVE-2006-4304 PoC for PS4 and PS5 by iMrDJAi (2024-04-07)]
* [https://github.com/TheOfficialFloW/PPPwn spp exploit for PS4 9.00 and 11.00 by TheFloW (2024-04-30)]


==== Patched ====
==== Patched ====
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)