This is a simple FTP server that can be executed on a Playstation 4 or Playstation 5 that has been jailbroken and is running an ELF loader. The FTP server accepts connection on port 2121.
Client software that has been tested include gFTP, Filezilla, curl, and Thunar. The payload supports a couple of custom SITE commands specifically for the PS4 and PS5 (executed without prepending SITE). In particular:
- KILL - kill the FTP server.
- MTRW - remount /system and /system_ex with write permissions.
- SELF - toggle on-the-fly SELF to ELF decryption (enabled by default).
- SCHK - toggle SELF digest verification.
Note: the SELF command operates on induvidual connections so use e.g.,
john@localhost:ftpsrv$ curl -o libkernel.sprx -Q SELF ftp://ps5:2121/system/common/lib/libkernel.sprxThese commands are implemented but were not previously documented here:
- DSIZ - report recursive directory size (errors if path is a file).
- RMDA - delete a directory tree (alias: SITE RMDIR).
- AVBL - available space in bytes for the given path.
- XQUOTA - report file count/limits and disk usage/limits.
- SITE CHMOD - change permissions.
- SITE UMASK [mode] - get/set file creation mask.
- SITE SYMLINK - create a symlink.
- SITE CPFR / SITE CPTO - server-side copy (asynchronous).
- SITE COPY - server-side copy (asynchronous).
Note: the copy commands return immediately with "250 Copy started in background"; errors during the background copy are not reported to the client.
Some clients (e.g. WinSCP) can be configured to use these extra commands for file management operations.
Assuming you have the ps4-payload-sdk installed on a POSIX machine, the FTP server can be compiled using the following two commands:
john@localhost:ftpsrv$ export PS4_PAYLOAD_SDK=/opt/ps4-payload-sdk
john@localhost:ftpsrv$ make -f Makefile.ps4Assuming you have the ps5-payload-sdk installed on a POSIX machine, the FTP server can be compiled using the following two commands:
john@localhost:ftpsrv$ export PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk
john@localhost:ftpsrv$ make -f Makefile.ps5Assuming you have a compiler toolchain installed on your GNU/Linux system, the FTP server can be compiled using the following command:
john@localhost:ftpsrv$ make -f Makefile.posixSome PS5 firmwares below vesion 4 contains a kernel bug where reading from some SELF files causes the read syscall to stall.
If you encounter problems with ftpsrv, 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.
ftpsrv is licensed under the GPLv3+.