-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Framework for persisting kernel read/write primitives across JAR exec…
…utions (requires new JAR loader): - Exploit independent base mechanism for kernel memory access persistance - Implement kernel r/w using ipv6 sockets - Refactored pointer classes to add some protection against kernel-space page faults - Added firmware-specific key offsets class. For now, only 1.02 is supported
- Loading branch information
Showing
13 changed files
with
410 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
sdk/src/main/java/org/ps5jb/sdk/core/SdkSoftwareVersionUnsupportedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.ps5jb.sdk.core; | ||
|
||
/** | ||
* Raised by SDK when a certain functionality requires firmware-specific knowledge, | ||
* but it is not available. | ||
*/ | ||
public class SdkSoftwareVersionUnsupportedException extends SdkRuntimeException { | ||
private static final long serialVersionUID = -2958319099920522L; | ||
|
||
/** | ||
* Default constructor with no message or cause. | ||
*/ | ||
public SdkSoftwareVersionUnsupportedException() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Constructor with an error message. | ||
* | ||
* @param message Message corresponding to the error condition. | ||
*/ | ||
public SdkSoftwareVersionUnsupportedException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructor with a cause. | ||
* | ||
* @param cause Original exception that prompted this exception to be raised. | ||
*/ | ||
public SdkSoftwareVersionUnsupportedException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
/** | ||
* Constructor with error message and cause. | ||
* | ||
* @param message Message corresponding to the error condition. | ||
* @param cause Original exception that prompted this exception to be raised. | ||
*/ | ||
public SdkSoftwareVersionUnsupportedException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
sdk/src/main/java/org/ps5jb/sdk/core/kernel/KernelOffsets.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.ps5jb.sdk.core.kernel; | ||
|
||
import java.text.MessageFormat; | ||
|
||
import org.ps5jb.sdk.core.SdkSoftwareVersionUnsupportedException; | ||
|
||
/** | ||
* Class which is able to return various interesting offsets in kernel based on the console firmware version. | ||
* Note that currently not many firmware versions are supported | ||
*/ | ||
public class KernelOffsets { | ||
// Kernel text-relative offsets | ||
public final long OFFSET_KERNEL_DATA; | ||
|
||
// Kernel data-relative offsets | ||
public final long OFFSET_KERNEL_DATA_BASE_ALLPROC; | ||
public final long OFFSET_KERNEL_DATA_BASE_SECURITYFLAGS; | ||
public final long OFFSET_KERNEL_DATA_BASE_ROOTVNODE; | ||
|
||
/** | ||
* Constructor. The firmware version can be obtained | ||
* by making a call to <code>sceKernelGetProsperoSystemSwVersion</code> | ||
* method in <code>libkernel</code>. Last two bytes of the result return | ||
* the minor and the major version of the firmware. | ||
* | ||
* @param softwareVersion Firmware version in the form 0x[MAJOR BYTE][MINOR BYTE] | ||
*/ | ||
public KernelOffsets(int softwareVersion) { | ||
switch (softwareVersion) { | ||
case 0x0102: | ||
{ | ||
OFFSET_KERNEL_DATA = 0x01B40000; | ||
|
||
OFFSET_KERNEL_DATA_BASE_ALLPROC = 0x026D1BF8; | ||
OFFSET_KERNEL_DATA_BASE_SECURITYFLAGS = 0x06241074; | ||
OFFSET_KERNEL_DATA_BASE_ROOTVNODE = 0x06565540; | ||
break; | ||
} | ||
default: | ||
String strSwVersion = MessageFormat.format( | ||
"{0,number,#0}.{1,number,00}", | ||
new Object[] { | ||
new Integer((softwareVersion >> 8) & 0xFF), | ||
new Integer(softwareVersion & 0xFF) | ||
} | ||
); | ||
throw new SdkSoftwareVersionUnsupportedException(strSwVersion); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.