Advertisement
Guest User

iOS 9.3.2 web-based jailbreak

a guest
Jul 20th, 2016
7,135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. How to jailbreak iOS 9.3.2
  2.  
  3. This document describes a theoretical chain of vulnerabilities
  4. which could theoretically be exploited by an experienced security
  5. researcher in order to theoretically preform a tethered jailbreak
  6. of iOS 9.3.2, install Cydia, obtain root access. After a reboot,
  7. any devices on which this method are applied will need to be
  8. subject to a restore in order to restore functionality, thus
  9. updating said devices to the latest version of iOS. For this
  10. reason, it is highly not recommended that this guide be followed
  11. by anyone who does not wish to bare the consequences of such a
  12. device restore.
  13.  
  14. Prerequisits
  15.  
  16. In order to preform this jailbreak, it is necisary that we exploit
  17. a bug in the WebCore which requires an Apache (or simular) web
  18. server. It is also necisary that you have a method of sending
  19. raw TCP and UDP packets over a network to the device, an SSH
  20. client, and software such as telnet, netcat, or simular software.
  21.  
  22. Setting up WebCore
  23.  
  24. It is next required to test your exploitation environment. Set up
  25. a basic implementation of the WebCore bug. The code for this
  26. vulnerability can be found on GitHub, but a sample is available
  27. below for convenience. A file should be created at the index of
  28. the web server: index.html
  29.  
  30. <html>
  31. <script>
  32. document.write('<iframe src="1.html"</iframe>');
  33. </script>
  34. </html>
  35.  
  36. another file with the name 1.html should then be created, with
  37. the following contents:
  38.  
  39. <html>
  40. <iframe src='2.html'></iframe>
  41. <iframe src='3.html'></iframe>
  42. </html>
  43.  
  44. 2.html will contain the following code:
  45.  
  46. <html>
  47. <script>
  48. parent.stop();
  49. </script>
  50. </html>
  51.  
  52. finally, 3.html should contain
  53.  
  54. <html>
  55. </html>
  56.  
  57. This vulnerability will create an OutOfMemoryException, which,
  58. unless other action (detailed below) is taken, will cause the
  59. WebCore process to stop.
  60.  
  61. Memory manipulation in preparation for arbitrary code execution
  62.  
  63. It is the next required step to manipulate the contents of the
  64. memory assiciated with the WebCore process. This can be achieved
  65. by the utilization of arbitrary and seemingly random webpage
  66. content being loaded into the memory. Upon the occurance fo the
  67. OutOfMemoryException, the process would usually be killed, unless
  68. it continues to respond to prompts from the kernel. First, a small
  69. binary should be compiled that will be downloaded into the memory
  70. in order to cause the process to continue to seem to respond, even
  71. after the original process has crashed. This procedure is known
  72. as process hijacking, or the arbitrary replacement of a process
  73. by another process. A binary file should be downloaded to the
  74. device from the web server before the execution of the WebCore
  75. crash. This will cause the process to seem to continue to respond
  76. as normal. This arbitrary process zombie should then contact the
  77. web server, requrest a larger payload containing further
  78. vulnerabilities (detailed below) and execute said payload.
  79.  
  80. Further exploitation
  81.  
  82. At this point, a payload containing the GasGague (or simular)
  83. vulnerability can be executed, with the permissions of the
  84. mobile user. In effect, this serves as the sandbox
  85. escape that this vulnerability requires. The memory maps obtained
  86. from this vulnerability can then be used to exploit the kernel.
  87.  
  88. Kernel access
  89.  
  90. The kernel vulnerability that is utilized for the completion of
  91. this jailbreak is CVE-2016-1863. The memory maps obtained by
  92. GasGague can be used to locate a memory position where this
  93. vulnerability can then be implemented. This will allow for the
  94. execution of code with kernel priveleges. At this point, more
  95. binaries can be downloaded from the web server, verified with
  96. AMFID, and executed with AMFI (vuln due to a recent change).
  97. The cydia binary could then be downloaded and installed onto
  98. the system, allowing for the installation of pachages and tweaks.
  99.  
  100. Now if only I could compile English into Objective-C :/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement