Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
PS4 Jailbreaking       Thread starter PSXHAX       Start date Oct 21, 2017 at 12:50 AM       22      
Status
Not open for further replies.
Yesterday we saw disclosure of a 4.05 PS4 Kexec, and combined with a Userland Exploit like JailbreakMe PS4 4.0x WebKit RCE the PlayStation 4 scene is eagerly awaiting a public PlayStation 4 Jailbreak for Firmware 4.05 to surface. :D

In the meantime, since Porting JailBreakMe and Breaking Down PS4 4.0x WebKit Exploit PlayStation 4 developer @SpecterDev shared on Twitter a PS4 NamedObj kernel exploit strategy overview of the 4.05 Kernel Exploit that Fail0verflow released. :ninja:

To quote from the NamedObj Kernel Exploit Overview.md:

Introduction

So fail0verflow released a writeup today on the namedobj exploit. I and a few others have had this exploit for some time but did not release as we received help indirectly from f0f, so it was not entirely ours to release. Now that it is out however, I'd like to talk about it as it is a really interesting exploit.

Below is not going to be a full write-up, but more of a framework or strategy that those who are interested can use to try to implement this kernel exploit. In due time I will release my implementation after I've edited non-burned components out of the exploit.

The Bug

So the bug is essentially type confusion with the 'kind' field of the 'id_entry' object used in named objects. Named objects are objects that have properties associated to them (such as a name as you might have guessed), that points to the real object in the heap. By specifying a type 0x5000 for your object, you can cause type confusion.

You now need to find another area of the kernel that can abuse to corrupt your object. Luckily, there is sys_mdbg_service(). This will allow you to overwrite the lower 32-bits of a pointer that you can later free() with sys_namedobj_delete(). This allows you to create a use-after-free situation that you can use to obtain code execution by spraying fake objects on the heap and corrupting a function pointer.

Strategy

A good strategy for exploiting this bug is as follows:
  1. Leak a target object from the kernel heap that not only has function pointers you can corrupt, but ideally is also easy to fake to avoid crashing the kernel.
  2. Create type confusion via sys_namedobj_create() with the 0x5000 (or 0x4000 due to the bitwise OR) flag.
  3. Setup a kernel ROP chain in userland. Ideally in this ROP chain you want to disable kernel write protection, make desired patches (such as RWX memory mapping), and pivot to return to userland successfully.
  4. Overwrite the lower 32-bits in your object with sys_mdbg_service() with the lower-32 bits of your target object's address. We cannot overwrite upper 32-bits, however luckily the pointer stored here before was a heap pointer anyway, so the upper 32-bits will be set to FreeBSD's heap address prefix (0xFFFFYYYYxxxxxxxx where YYYY is randomized by ASLR at boot).
  5. Trigger the free() via sys_namedobj_delete()
  6. Spray your fake object on the heap with a function pointer pointing to your kROP chain created earlier
  7. Find a function that uses the object you corrupted and trigger the function pointer to be read
  8. You now have code execution, and your kROP chain is running in ring0! Yay!
  9. Fix your free()'d object because if you don't, as soon as webkit exits, kernel will crash because it will try to free() your object again and lead to a double free().
  10. Return to userland successfully.
Notes
  • You must fix what your exploit did in your kernel ROP chain or a double free() will occur when you exit WebKit, causing a kernel panic.
  • You must make your kernel ROP chain return to userland successfully, or the kernel will crash when your kROP chain is finished executing.
  • Finding an object to leak and exploit blind is VERY difficult. This was the head bashing part for me.
  • I will release an implementation soon but until then, try to implement it yourself and see how far you go, it's a great learning experience! Have fun!
PS4 NamedObj Kernel Exploit Strategy Overview by SpecterDev.jpg
 

Comments

false, there is no host 100% anonymous since the internet gives access to all

at the time I was doing ps unban and psid. Sony did delete all my ps unban links on hosts yet anonymous. Research on internet ps unban by Megago :)

For example, I have many solutions for debanning ps3 that I have never released in public

One of my work that I had done and which was in beta test. A beta testers made it public without my consolation happily I managed to have it removed by jailbreak news site

 
So if I understand these last batch of news as I think I understand them, the scene has Mega Evolved in regards to approach a possible Jailbreak/CFW?
 
I'm locked-and-loaded on 3.55, but just to give myself a self-congratulatory pat on the back, 4.05 and below is hard to find in stores, right?
 
Perfect timing for Sony, the JB will be public a few days before november the 7th. Coincidence ?

If Microsoft are smart, they also have to (indirectly) release a JB for the Xbox (working on a 1 yo FW).
 
false, there is no host 100% anonymous since the internet gives access to all

at the time I was doing ps unban and psid. Sony did delete all my ps unban links on hosts yet anonymous. Research on internet ps unban by Megago :)

For example, I have many solutions for debanning ps3 that I have never released in public

One of my work that I had done and which was in beta test. A beta testers made it public without my consolation happily I managed to have it removed by jailbreak news site


if your still up to it. I'm looking forward to any tools that could deban a ps4 in the near future.
 
Yes No problem. Contact me in private you just have to search on google ps unban by megago and you will see that I was the best in deban of ps3 for free
 
yes yes I remember you
back when console crunch wasn't so cancerous. and Ngu was poppin.
I still have a few of your tools left in my ps3 fever archive.
 
I am waiting for the scene to advance for a real jailbreak and I promise that as soon as a cfw for ps4 or any other option to launch a backup with online access I will propose solutions to protect against banishment.
 
Ha CC was the bad sites from the start even people who where fanboys where making so many CC sites with different domain extenstions.
 
Status
Not open for further replies.
Back
Top