Skip to content

Commit

Permalink
Fix for issue #43
Browse files Browse the repository at this point in the history
Fix for issue #43 - kerberoasting/TGS-REQ compatibility for SPNs with 3 parts.
  • Loading branch information
HarmJ0y committed Apr 14, 2020
1 parent 1ff1306 commit f7c614e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Rubeus/lib/krb_structures/TGS_REQ.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ public static byte[] NewTGSReq(string userName, string domain, string sname, Tic
req.req_body.sname.name_string.Add(parts[0]);
req.req_body.sname.name_string.Add(parts[1]);
}
else if (parts.Length == 3)
{
// KRB_NT_SRV_HST = 3
// SPN (sname/server.domain.com/blah)
req.req_body.sname.name_type = 3;
req.req_body.sname.name_string.Add(parts[0]);
req.req_body.sname.name_string.Add(parts[1]);
req.req_body.sname.name_string.Add(parts[2]);
}
else
{
Console.WriteLine("[X] Error: invalid TGS_REQ sname '{0}'", sname);
Expand Down

0 comments on commit f7c614e

Please sign in to comment.