Module: Msf::Exploit::Remote::Kerberos::Client::ApRequest
- Included in:
- Msf::Exploit::Remote::Kerberos::Client
- Defined in:
- lib/msf/core/exploit/remote/kerberos/client/ap_request.rb
Overview
Helpers for constructing and wrapping Kerberos AP-REQ messages.
Constant Summary collapse
- AP_USE_SESSION_KEY =
0x40000000- AP_MUTUAL_REQUIRED =
0x20000000
Instance Method Summary collapse
- #build_service_ap_request(opts = {}) ⇒ Object
-
#encode_gss_kerberos_ap_request(ap_request_asn1, ap_request_der: nil) ⇒ String
A GSS-Kerberos token.
-
#encode_gss_spnego_ap_request(ap_request_asn1, ap_request_mech: nil) ⇒ String
A SPNEGO GSS blob.
Instance Method Details
#build_service_ap_request(opts = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/msf/core/exploit/remote/kerberos/client/ap_request.rb', line 16 def build_service_ap_request(opts = {}) authenticator = opts.fetch(:authenticator) do build_authenticator(opts.merge( subkey: nil, authenticator_enc_key_usage: Rex::Proto::Kerberos::Crypto::KeyUsage::AP_REQ_AUTHENTICATOR )) end = 0 |= AP_MUTUAL_REQUIRED if mutual_auth ap_req = opts.fetch(:ap_req) do build_ap_req(opts.merge(authenticator: authenticator, ap_req_options: )) end ap_req end |
#encode_gss_kerberos_ap_request(ap_request_asn1, ap_request_der: nil) ⇒ String
Returns a GSS-Kerberos token.
38 39 40 41 42 |
# File 'lib/msf/core/exploit/remote/kerberos/client/ap_request.rb', line 38 def encode_gss_kerberos_ap_request(ap_request_asn1, ap_request_der: nil) Rex::Proto::Gss::KerberosToken.build_gss_ap_req( ap_request_der || ap_request_asn1.to_der ) end |
#encode_gss_spnego_ap_request(ap_request_asn1, ap_request_mech: nil) ⇒ String
Returns a SPNEGO GSS blob.
48 49 50 51 |
# File 'lib/msf/core/exploit/remote/kerberos/client/ap_request.rb', line 48 def encode_gss_spnego_ap_request(ap_request_asn1, ap_request_mech: nil) ap_request_mech ||= encode_gss_kerberos_ap_request(ap_request_asn1) Rex::Proto::Gss::KerberosToken.build_spnego_init(ap_request_mech) end |