#include <assert.h> | |
#include <stdio.h> | |
#include <time.h> | |
#define COBJMACROS | |
#include <windows.h> | |
#include <d3d11_1.h> | |
#include <d3dcompiler.h> | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
After the recent release of ps5-kstuff with support for PS4 fpkg files, there is a lot of questions about porting this to other firmwares (4.50 and 4.51 are important in particular, because users of those firmwares can't update to 4.03, but they are still vulnerable to all of the used exploits). The main problem with these ports it the bespoke XOM, which prevents finding the offsets by simply examining the dumps. So in this document I'm going to go over what offsets are important for ps5-kstuff, and how I found them for 4.03.
These are the main categories of offsets:
- Kernel data offsets, those can be found from data dumps that are not XOM-protected
- Kernel text offsets pointed to by kernel data
- doreti_iret offset (that's one offset, but it deserves its own word)
- Offsets found from single-stepping of kernel functions
So, how tf do rust modules work? and why tf are they not doing what I want right now???
Note: A bunch of things in here are defined by cargo and a few others by rust. I won't generally care about that distinction because two languages without standard build system is more than enough for my sanity.
➡️ Feel free to ask me on twitter if you have questions or remarks.
Core concepts
bits 64 | |
org 0x4000000 | |
elf_header: | |
.size equ .end - $ | |
.e_ident db 0x7F, 'E', 'L', 'F' ; EI_MAG0 ... EI_MAG3 | |
db 2 ; EI_CLASS: 1 => 32 bits, 2 => 64 bits | |
db 1 ; EI_DATA: 1 => lil endian, 2 => big " | |
db 1 ; EI_VERSION: original version | |
db 0 ; EI_OSABI: 0 => System V ABI |
org 0 ; We use "org 0" so Relative Virtual Addresses (RVAs) are easy. | |
; This means that when we want an absolute Virtual Address we have | |
; to add IMAGE_BASE to the RVA (or whatever the base of that section is) | |
IMAGE_BASE equ 0x400000 | |
SECT_ALIGN equ 0x200 | |
FILE_ALIGN equ 0x200 | |
msdos_header: | |
.magic db 'MZ' |
package d3d11_main | |
import D3D11 "vendor:directx/d3d11" | |
import DXGI "vendor:directx/dxgi" | |
import D3D "vendor:directx/d3d_compiler" | |
import SDL "vendor:sdl2" | |
import glm "core:math/linalg/glsl" | |
// Based off https://gist.github.com/d7samurai/261c69490cce0620d0bfc93003cd1052 |
WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.
- Windows Subsystem for Android or WSA must be Installed.
Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.
- First install Windows Subsystem for Android. [Click here](https://gist.github.com/HimDek/eb8704e2da1d98240153165743
scph5500.bin 26-Aug-2018 20:47 512.0K
scph5501.bin 26-Aug-2018 20:47 512.0K
scph5502.bin 26-Aug-2018 20:47 512.0K
// Simple example code to load a Wav file and play it with WASAPI | |
// This is NOT complete Wav loading code. It is a barebones example | |
// that makes a lot of assumptions, see the assert() calls for details | |
// | |
// References: | |
// http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html | |
// Handmade Hero Day 138: Loading WAV Files | |
#include <windows.h> |