Class: Metasploit::Framework::LoginScanner::ACPP

Inherits:
Object
  • Object
show all
Includes:
Base, RexSocket, Tcp::Client
Defined in:
lib/metasploit/framework/login_scanner/acpp.rb

Overview

This is the LoginScanner class for dealing with the Apple Airport ACPP protocol. It is responsible for taking a single target, and a list of credentials and attempting them. It then saves the results.

Constant Summary collapse

DEFAULT_PORT =

CONSTANTS

Rex::Proto::ACPP::DEFAULT_PORT
LIKELY_PORTS =
[ DEFAULT_PORT ]
LIKELY_SERVICE_NAMES =
[ 'acpp' ]
PRIVATE_TYPES =
[ :password ]
REALM_KEY =
nil

Instance Attribute Summary

Attributes included from Tcp::Client

#max_send_size, #send_delay, #sock

Instance Method Summary collapse

Methods included from Tcp::Client

#chost, #connect, #cport, #disconnect, #proxies, #rhost, #rport, #set_tcp_evasions, #ssl, #ssl_version

Instance Method Details

#attempt_login(credential) ⇒ Metasploit::Framework::LoginScanner::Result

This method attempts a single login with a single credential against the target

Parameters:

  • credential (Credential)

    The credential object to attmpt to login with

Returns:



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/metasploit/framework/login_scanner/acpp.rb', line 29

def (credential)
  result_options = {
      credential: credential,
      host: host,
      port: port,
      protocol: 'tcp',
      service_name: 'acpp'
  }

  begin
    # Make our initial socket to the target
    disconnect if self.sock
    connect

    client = Rex::Proto::ACPP::Client.new(sock)

    auth_response = client.authenticate(credential.private)
    if auth_response.successful?
      status = Metasploit::Model::Login::Status::SUCCESSFUL
    else
      status = Metasploit::Model::Login::Status::INCORRECT
    end
    result_options.merge!(
      proof: "Status code #{auth_response.status}",
      status: status
    )
  rescue ::EOFError, Errno::ENOTCONN, Rex::ConnectionError, ::Timeout::Error => e
    result_options.merge!(
      proof: e.message,
      status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT
    )
  ensure
    disconnect
  end

  ::Metasploit::Framework::LoginScanner::Result.new(result_options)
end