Guest User

hackingteamandroidexploit2

a guest
Jul 8th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. From:
  2. Diego Giubertoni (d.giubertoni@hackingteam.com)
  3. Subject:
  4. Exploit local-to-root Android completed
  5. From You:
  6. 06/06/2015 05:24:58
  7. To:
  8. Alberto Pelliccione <a.pelliccione@hackingteam.com>; Fabrizio Cornelli <f.cornelli@hackingteam.it>; Marco Valleri <m.valleri@hackingteam.com>; Ivan Speziale <i.speziale@hackingteam.com>;
  9. CC:
  10. Marco Valleri; Ivan Speziale
  11. Hello everyone.
  12.  
  13. With some delay I completed the exploit local-to-root Android. It took a little longer than expected because it was not easy to make it more or less "universal" of all devices. In particular, I implemented two methods of exploits based on the kernel symbols exported (not export all the same, so sometimes you have to go parallel roads). Also when I integrated an apk noticed that the S4 via KNOX adds a new sandbox that brings up the popup to the user if the application behaves "strange".
  14.  
  15. To summarize the protections to bypass these are:
  16.  
  17. - Sandbox KNOX on zygote
  18. - Samsung rooting features
  19. - SELinux policy
  20.  
  21. the apk file that will contain 4 cache: the exploit, the executable to be launched as Shell server, the client part of the shell and a script to run at boot
  22.  
  23. EXPLOIT:
  24.  
  25. - The application launches the exploit simply by using a system of its cache so that it created a new process in its own right. If the application it becomes the root KNOX killa and exits the popup.
  26.  
  27. - The exploit ForKa immediately and the father comes out. This allows us to get init as a father that will be critical as we shall see.
  28.  
  29. - The exploit dumps the kernel using the search vuln and symbols needed to run code
  30.  
  31. - According to the symbols found using one of two methods to get the root through the vuln:
  32. - If symbol is ptmx_fops overwrites ptmx_fsync with a pointer to the shellcode directly in the process and running a fsync on device / dev / ptmx
  33. - Otherwise patcha directly a syscall in memory and triggers (then put it back in place)
  34.  
  35. - At this point we are both children of init, both root and we can execute code without being intercepted by Samsung Rooting Feature. They are copied to the server and the client shell in / system / bin and the script sh to start on boot in / system / etc
  36.  
  37. - The exploit ends launching the shell process
  38.  
  39.  
  40. When you first start the shell and kernel context will the next reboot context init. This allows us to execute commands bypassing SELinux.
Add Comment
Please, Sign In to add comment