Skip to content

Commit

Permalink
Merge pull request #84 from eladshamir/master
Browse files Browse the repository at this point in the history
Add the option to load a certificate from a Base64 blob
  • Loading branch information
HarmJ0y committed Jun 8, 2021
2 parents b5d09df + ffbf0dd commit e93119a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Rubeus/lib/Ask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,16 @@ public static X509Certificate2 FindCertificate(string certificate, string storeP

public static byte[] TGT(string userName, string domain, string certFile, string certPass, Interop.KERB_ETYPE etype, string outfile, bool ptt, string domainController = "", LUID luid = new LUID(), bool describe = false, bool verifyCerts = false) {
try {
X509Certificate2 cert;

X509Certificate2 cert = FindCertificate(certFile, certPass);
if (Helpers.IsBase64String(certFile))
{
cert = new X509Certificate2(Convert.FromBase64String(certFile), certPass);
}
else
{
cert = FindCertificate(certFile, certPass);
}

if(cert == null) {
Console.WriteLine("[!] Failed to find certificate for {0}", certFile);
Expand Down

0 comments on commit e93119a

Please # to comment.