Skip to content

Commit

Permalink
Fix for issue #43
Browse files Browse the repository at this point in the history
removed the SPN split on "," to support alternate SPN formats
  • Loading branch information
HarmJ0y committed Aug 18, 2020
1 parent 294fd5c commit a44c475
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Rubeus/lib/Roast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -743,18 +743,14 @@ public static void GetTGSRepHash(KRB_CRED TGT, string spn, string userName = "us
byte[] clientKey = TGT.enc_part.ticket_info[0].key.keyvalue;
Interop.KERB_ETYPE etype = (Interop.KERB_ETYPE)TGT.enc_part.ticket_info[0].key.keytype;

string[] services = spn.Split(',');
foreach (string sname in services)
{
// request the new service tickt
byte[] tgsBytes = Ask.TGS(tgtUserName, domain, ticket, clientKey, etype, sname, requestEType, null, false, domainController, false);
// request the new service tickt
byte[] tgsBytes = Ask.TGS(tgtUserName, domain, ticket, clientKey, etype, spn, requestEType, null, false, domainController, false);

if (tgsBytes != null)
{
KRB_CRED tgsKirbi = new KRB_CRED(tgsBytes);
DisplayTGShash(tgsKirbi, true, userName, userDomain, outFile, simpleOutput);
Console.WriteLine();
}
if (tgsBytes != null)
{
KRB_CRED tgsKirbi = new KRB_CRED(tgsBytes);
DisplayTGShash(tgsKirbi, true, userName, userDomain, outFile, simpleOutput);
Console.WriteLine();
}
}

Expand Down

0 comments on commit a44c475

Please sign in to comment.