Skip to content

Instantly share code, notes, and snippets.

@psxdev
Last active January 10, 2016 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psxdev/ed54a96d99e8e88eaeea to your computer and use it in GitHub Desktop.
Save psxdev/ed54a96d99e8e88eaeea to your computer and use it in GitHub Desktop.
ps4link loader with ps4sh elf loader session
First load custom ps4link in ps4 with webkit exploit
We see log initialization on mac/pc to see if there is a problem with bind.
$ debug.sh
[PS4][INFO]: debugnet initialized
[PS4][INFO]: Copyright (C) 2010,2016 Antonio Jose Ramos Marquez aka bigboss @psxdev
[PS4][INFO]: ready to have a lot of fun...
[PS4][DEBUG]: [PS4LINK] Server request thread UID: 0x80678B40
[PS4][DEBUG]: [PS4LINK] Created ps4link_requests_sock: 84
[PS4][DEBUG]: [PS4LINK] bind to ps4link_requests_sock done
[PS4][DEBUG]: [PS4LINK] Ready for connection 1
[PS4][DEBUG]: [PS4LINK] Waiting for connection
[PS4][DEBUG]: [PS4LINK] Server command thread UID: 0x806970E0
[PS4][DEBUG]: [PS4LINK] Command Thread Started.
[PS4][DEBUG]: [PS4LINK] Created ps4link_commands_sock: 86
[PS4][DEBUG]: [PS4LINK] Command listener waiting for commands...
^C
Now we open ps4sh session
$ ps4sh
ps4sh version 1.0
/Users/bigboss/.ps4shrc: No such file or directory
Connecting to fio ps4link ip 192.168.1.17
log: [HOST][INFO]: [PS4SH] Ready
log: [PS4][DEBUG]: [PS4LINK] Client connected from 192.168.1.3 port: 25797
log: [PS4][DEBUG]: [PS4LINK] sock ps4link_fileio set 85 connected 1
log: [PS4][DEBUG]: [PS4LINK] Initialized and connected from pc/mac ready to receive commands
log: [PS4][DEBUG]: [PS4LINK] Waiting for connection
ps4sh> help
? ? :: Synonym for `help'..
cd cd [dir] :: Change pksh directory to [dir]..
debug debug :: Show pksh debug messages. ( alt-d ).
exit exit :: Exits pksh ( alt-q ).
help help :: Display this text..
list list [dir] :: List files in [dir]..
log log [file] :: Log messages from PS4 to [file]..
ls ls [dir] :: Synonym for list.
make make [argn] ... :: Execute make [argn] ....
gmake gmake [argn] ... :: Execute gmake [argn] ....
pwd pwd :: Print the current working directory ( alt-p ).
quit quit :: Quit pksh ( alt-q ).
setroot setroot [dir] :: Sets [dir] to be root dir..
status status :: Display some pksh information. ( alt-s ).
execelf execelf :: Load and exec elf. ....
execsprx execsprx :: Load and exec sprx. ....
exitps4 exitps4 :: Finish ps4link in ps4 side. ....
verbose verbose :: Show verbose pksh messages. ( alt-v ).
ps4sh> execelf /usr/local/ps4dev/sample.elf
log: [HOST][DEBUG]: [PS4SH] argc=1 argv=host0:/usr/local/ps4dev/sample.elf
log: [PS4][DEBUG]: [PS4LINK] commands listener received packet size (266)
log: [PS4][DEBUG]: [PS4LINK] Received command execelf argc=1 argv=host0:/usr/local/ps4dev/sample.elf
log: [PS4][DEBUG]: [PS4LINK] file open req (host0:/usr/local/ps4dev/sample.elf, 0 0)
log: [HOST][DEBUG]: [PS4SH] Opening /usr/local/ps4dev/sample.elf flags 0
log: [HOST][DEBUG]: [PS4SH] Open return 7
log: [PS4][DEBUG]: [PS4LINK] file open reply received (ret 7)
log: [PS4][DEBUG]: [PS4LINK] file lseek req (fd: 7)
log: [HOST][DEBUG]: [PS4SH] 13236 result of lseek 0 offset 2 whence
log: [PS4][DEBUG]: [PS4LINK] ps4link_lseek_file: lseek reply received (ret 13236)
log: [PS4][DEBUG]: [PS4LINK] file lseek req (fd: 7)
log: [HOST][DEBUG]: [PS4SH] 0 result of lseek 0 offset 0 whence
log: [PS4][DEBUG]: [PS4LINK] ps4link_lseek_file: lseek reply received (ret 0)
log: [HOST][DEBUG]: [PS4SH] read 13236 bytes of file descritor 7
log: [PS4][DEBUG]: [PS4LINK] ps4link_read_file: Reply said there's 13236 bytes to read (wanted 13236)
log: [PS4][DEBUG]: [PS4LINK] ps4link_read_file: chunk 0 readed 4096
log: [PS4][DEBUG]: [PS4LINK] ps4link_read_file: chunk 1 readed 4096
log: [PS4][DEBUG]: [PS4LINK] ps4link_read_file: chunk 2 readed 5044
log: [PS4][DEBUG]: [PS4LINK] ps4link_file: file close req (fd: 7)
log: [PS4][DEBUG]: [PS4LINK] ps4link_close_file: close reply received (ret 0)
log: [PS4][DEBUG]: [PS4LINK] in elfCreate
log: [PS4][DEBUG]: [PS4LINK] reserved memory for elf at 880670360
log: [PS4][DEBUG]: [PS4LINK] ready to run elf
log: [PS4][DEBUG]: [PS4LINK] protectedMemoryCreate(2106432) -> [PS4][DEBUG]: ps4ProtectedMemoryCreate(2106432) -> [PS4][DEBUG]: [PS4LINK] elfLoaderLoad(880670360, 200ebc000, 200cb8000) ->
log: [PS4][DEBUG]: [PS4LINK] elfLoaderLoad return 0
log: [PS4][DEBUG]: [PS4LINK] mm->main 200cb8e30
log: [PS4][DEBUG]: PS4LINK run [200cb8000 + elfEntry = 200cb8e30]
log: [PS4][DEBUG]: [PS4LINK] New elf thread UID: 0x80697B40
log: [PS4][DEBUG]: [PS4LINK] commands listener waiting for next command
log: [PS4][DEBUG]: [PS4LINK] Configuration pointer 88066ff00, pointer_conf string 88066ff00
log: [PS4][DEBUG]: [PS4LINK] ps4LinkRunElfMain
log: [PS4][INFO]: debugnet already initialized using configuration from ps4link
log: [PS4][INFO]: debugnet_initialized=1 SocketFD=83 logLevel=3
log: [PS4][INFO]: ready to have a lot of fun...
log: [PS4][DEBUG]: [SAMPLE] 2 elfname=elf ps4linkconf=88066ff00 88066ff00 83
ps4sh> status
log: [HOST][INFO]: [PS4SH] TCP srv fd = 3
log: [HOST][INFO]: [PS4SH] UDP log fd = 5
log: [HOST][INFO]: [PS4SH] PS4SH cmd fd = 6
log: [HOST][INFO]: [PS4SH] Logging to stdout
log: [HOST][INFO]: [PS4SH] Verbose mode is off
log: [HOST][INFO]: [PS4SH] Debug is on
ps4sh> exitps4
log: [HOST][DEBUG]: [PS4SH] argc=0 argv=
ps4sh>
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment