diff --git a/modules/auxiliary/admin/kerberos/get_ticket.rb b/modules/auxiliary/admin/kerberos/get_ticket.rb index aeb2638d753b..c5eaf3d13e3b 100644 --- a/modules/auxiliary/admin/kerberos/get_ticket.rb +++ b/modules/auxiliary/admin/kerberos/get_ticket.rb @@ -142,7 +142,7 @@ def validate_options def run validate_options - send("action_#{action.name.downcase}") + result = send("action_#{action.name.downcase}") report_service( host: rhost, @@ -151,6 +151,8 @@ def run name: 'kerberos', info: "Module: #{fullname}, KDC for domain #{@realm}" ) + + result rescue ::Rex::ConnectionError => e elog('Connection error', error: e) fail_with(Failure::Unreachable, e.message) @@ -276,6 +278,7 @@ def action_get_hash print_good("Found NTLM hash for #{@username}: #{ntlm_hash}") report_ntlm(ntlm_hash) + ntlm_hash end def report_ntlm(hash)