Skip to content

Commit

Permalink
Update to catch tgtdeleg error
Browse files Browse the repository at this point in the history
  • Loading branch information
4ndr3w6 authored Aug 8, 2022
1 parent 41c95e7 commit 9c44f68
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Rubeus/Commands/Diamond.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,16 @@ public void Execute(Dictionary<string, string> arguments)
}

if (tgtdeleg)
{
ForgeTickets.ModifyTicket(new KRB_CRED(LSA.RequestFakeDelegTicket()), krbKey, krbKey, outfile, ptt, luid, ticketUser, groups, ticketUserId, sids);
{
KRB_CRED cred = null;
try {
cred = new KRB_CRED(LSA.RequestFakeDelegTicket());
}
catch {
Console.WriteLine("[X] Unable to retrieve TGT using tgtdeleg");
return;
}
ForgeTickets.ModifyTicket(cred, krbKey, krbKey, outfile, ptt, luid, ticketUser, groups, ticketUserId, sids);
}
else
{
Expand Down

0 comments on commit 9c44f68

Please sign in to comment.