Module: Msf::Exploit::Remote::Kerberos::Ticket::Storage::ReadMixin
- Defined in:
- lib/msf/core/exploit/remote/kerberos/ticket/storage/read_mixin.rb
Overview
A mixin providing the ability to read previously stored tickets.
Instance Method Summary collapse
-
#load_credential(options = {}) ⇒ Rex::Proto::Kerberos::CredentialCache::Krb5CcacheCredential?
Load a stored credential object that is suitable for authentication.
-
#tickets(options = {}, &block) ⇒ Array<StoredTicket>
Get stored tickets matching the options query.
Instance Method Details
#load_credential(options = {}) ⇒ Rex::Proto::Kerberos::CredentialCache::Krb5CcacheCredential?
Load a stored credential object that is suitable for authentication.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/msf/core/exploit/remote/kerberos/ticket/storage/read_mixin.rb', line 5 def load_credential( = {}) return nil unless active_db? now = Time.now.utc tickets() do |ticket| next if ticket.expired?(now) return ticket.ccache.credentials.first end nil end |
#tickets(options = {}, &block) ⇒ Array<StoredTicket>
Get stored tickets matching the options query.
19 20 21 22 23 24 25 |
# File 'lib/msf/core/exploit/remote/kerberos/ticket/storage/read_mixin.rb', line 19 def tickets( = {}, &block) objects().map do |stored_loot| stored_ticket = StoredTicket.new(stored_loot) block.call(stored_ticket) if block_given? stored_ticket end end |