Difference between revisions of "FailMail"

From Vita Dev Wiki
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 03:54, 12 May 2022

Introduction[edit]

FailMail is an Exploit in the PSVita Mail application, that allowed for System Uri Calling, (which resulted in an Arbitrary File Read) and Arbitrary File Writing It was patched in 3.55 and above firmware's

Remnants in later firmware[edit]

The FailMail exploit was never entirely patched, they blocked they simply made the email application only have access to the ux0:/calendar folder. the System URI Functionality was also fixed. You can still dump files from ux0:/calendar using email attachments, the only 'interesting' file in there is "ux0:/calendar/calendar.db" - the calendar apps database. to dump it you can do the following: 1- create an event in the calendar with the description set to 'email:send?attach=ux0:/calendar/calendar.db' 2- click on the 3 "dots" and press "Send via E-Mail" 3- send it to an email you have access to you can now download it on a PC or other device, its a SQLLite3 file. so any sqllite database browser should be able to open it.

Arbitrary File Writing[edit]

This is achieved by making the name of the attachment be "../../../" and then the path to the file you wanted to overwrite, this worked because on 3.55 email attachments are saved to ux0:/temp/email/ as there full name which would become ux0:/temp/email/../../../ux0:/id.dat which would overwrite id.dat. however, in 3.55 and above, there is an additional check to get the filename of the email excluding the path and write it there with that name instead, and in later firmwares, you cant do "../" to leave the current partition either.

System URI Calling[edit]

(system uri's are URI's defined in param.sfo surrounded by triangle brackets. and they can only be run by the system and not the browser) This was achieved simply by receiving an email with an <a href to a System URI for example. if you did <a href="psnreg:">Run PSN Reg</a> when you clicked the link inside the email app. it'd run it, this was also fixed in 3.55 simply by adding a check if the URI you clicked on is not a SYSTEM uri.

There was also a bug that came about because of this that allowed you to dump any file you wanted, if you called 'email:send?attach=' and then a path to a file you could add any file on the system that you wanted as an attachment and then send it to yourself. this was addressed in 3.57 where now the email application can only attach files from photo0: and ux0:/calendar anywhere else will result in a 0byte file being sent.