/tiny-ps4-shell

Primary LanguageCGNU General Public License v3.0GPL-3.0

Tiny PS4 Shell

tiny-ps4-shell is a small telnet server for the PS4 with a couple of basic UNIX-like commands, e.g., cd, mkdir, stat, etc.

Building

Assuming you have the Open Orbis SDK installed on you machine, tiny-ps4-shell can be compiled using the following two commands:

john@localhost:tiny-ps4-shell$ export OO_PS4_TOOLCHAIN=/path/to/open/orbis
john@localhost:tiny-ps4-shell$ make

You can also compile for POSIX-like systems:

john@localhost:tiny-ps4-shell$ make -f Makefile.posix
john@localhost:tiny-ps4-shell$ ./main_term.bin

Usage

Install the compiled pkg on a PS4 with homebrew and the kexec syscall enabled, launch the application, and telnet to the PS4 (port 2323). There are a handful of rudimentary commands available, e.g., cd, ls, and mkdir. Type help in a connected telnet shell for more information. Below are a couple of commands I have found useful.

To obtain root permissions:

/$ seteuid 0

To mount procfs and get list of processes:

/$ mkdir /proc
/$ mount -t procfs proc /proc
/$ ps
     PID      PPID     PGID      SID    TTY    COMMAND
       0         0        0        0      -    kernel
       1         0        1        1  ttyu0    mini-syscore.elf
...

To escape the initial jailed sandbox:

/$ jailbreak

To monitor kernel log:

/$ cat /dev/klog

To decrypt SELF and SPRX files:

/$  self2elf /mini-syscore.elf /mnt/usb0/mini-syscore.elf

Limitations

The login session is not attached to a TTY, so you cannot signal for, e.g., SIGINT with Ctrl+C. Furthermore, most of the commands are only partially implemneted. If you find some limitation extra anoying, file a github issue and perhaps it will be addressed.

Reporting Bugs

If you encounter problems with tiny-ps4-shell, please file a github issue. If you plan on sending pull requests which affect more than a few lines of code, please file an issue before you start to work on you changes. This will allow us to discuss the solution properly before you commit time and effort.

License

tiny-ps4-shell is licensed under the GPLv3+.