Jump to content

[Tutorial] How to install Payload-SDK by IDC (3226:2143) in Ubuntu

Recommended Posts

This is a tutorial for those of you who want to build payloads from source in Ubuntu. This tutorial is written for Ubuntu 16.04 - 17.10, but with an extra and necessary step for Ubuntu 17.10 users because otherwise it'll throw you an error. If you run a lower version, you should be able to build payloads without the extra step. This should in theory also work for other Ubuntu distributions as long as they are installed with ENGLISH as main language (Xubuntu etc.).



  • Ubuntu 16.04 or higher installed and configured
  • IDC's Payload SDK (download here (click on clone or download and choose Download Zip))


Step 1: Put the required files in Desktop

  1. Extract ps4-payload-sdk-master.zip that you downloaded earlier
  2. Open the extracted folder and copy/cut all files and folders
  3. Navigate to your Desktop and create a new folder PS4SDK
  4. Paste the folders and files in the PS4SDK folder

Your directory should now look like this:



Step 2: Getting the SDK to work

  1. Open Terminal (CTRL+ALT+T) and typ: sudo apt-get update
  2. In Terminal typ: sudo apt-get install binutils
  3. In Terminal typ: sudo apt-get install llvm
  4. In Terminal typ: sudo nano /etc/environment and press enter
  5. Start a new line and typ: PS4SDK="/home/yourusername/Desktop/PS4SDK"
  6. Press CTRL+X to exit and save changes by pressing Y


IMPORTANT: After the installation of both packages is completed, restart Ubuntu.



Step 3: Prevent errors

  1. Navigate to /Desktop/PS4SDK/libPS4/source and open syscall.s with a text editor
  2. Uncomment the line: .section .sc_rop, "w"
  3. Comment the line: .section .sc_rop, "wb"

It should look like this:




  1. Navigate to /Desktop/PS4SDK/libPS4/include and open types.h with a text editor
  2. Comment the line: typedef uint32_t __dev_t; (change it to /* typedef uint32_t __dev_t; */)



  1. Open PS4SDK/libusbfatfs and right click in the folder
  2. Choose 'Open in terminal'
  3. Typ: make



  1. Open PS4SDK/libPS4 and right click in the folder
  2. Choose 'Open in terminal'
  3. Typ: make


Done! You should now be able to compile payloads. To be sure navigate to examples, choose an example, open the folder, right click, choose open in terminal and typ make. You should now see a .bin file in the folder, that's an example payload.

Share this post

Link to post
Share on other sites

You are doing it wrong. ^__~


You should not modify the system environment, simply use the export command in the shell, without the need to reboot the system:

"export PS4SDK=~/path/to/ps4-payload-sdk" or if inside the SDK dir "export PS4SDK=$(pwd)" less typing.


If GCC is already available, it can be used instead of installing CLANG.


And it seems the version of binutils to use is critical to avoid errors at linking time, the provided linker script seems to target binutils 2.25 or earlier, with 2.28 (the version available on Debian Stretch) the ld command fails or produces executables of 1 MB instead of few KBs...


Edit: forgot my other hypothesis, instead of GNU binutils they used the BSD binutils, if they exist as I don't have experience with the BSDs.  ^__^


2nd edit: replied in haste, if you want to it to be permanent, instead of /etc/environment you should put it in your shell init, like ".profile" for Bash or ".zshenv" for Zsh. To apply the change you use the "source" command (source initfilename) instead of reopening the shell...

Edited by 0x20man
2nd Addendum

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...