-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working in non domain computer #13
Comments
Try the /domain and /ldapserver with the find function. E.g. certify.exe find /domain:github.com /ldapserver:4.2.2.2 |
If you just need to query the ldap server you can do that from a non-domain joined machine using:
and then run the commands you need:
All the information about templates and permissions are correctly listed. The problem is when you need to request a certificate that Certify errors out:
If I join the machine to the domain the same command succeed. |
I have the same problem, even on a runas netonly session, the certificate request takes the current user context (not the runas) in a non domain joined computer. |
Same problem here too. |
certipy (https://github.com/ly4k/Certipy) can solve this, which also work out with my issue on #27 . e.g.
|
I hit the same issue too. While the scenario is a bit different where i am requesting the certificate from a trusted domain in a one way outbound trust environment. Would like to know if there are any workaround for certify. Certipy shall work but haven’t test out. |
I'm in the same boat. Did u figure out a solution yet? |
Hello, I ended up a similar situation and I think I found a solution so I'm sharing my experience in the hope that it helps. My scenario was :
So I'm in a PTT session on a computer outside of Domain B and when I try to use Certify I have the same error saying that "An enrollment policy server cannot be located." To fix this issue I ended up changing Certify source code in Cert.cs line 89 from : objPkcs10.InitializeFromPrivateKey(context, privateKey, templateName); To : objPkcs10.InitializeFromPrivateKey(context, privateKey, "");
CX509ExtensionTemplateName templateExtension = new CX509ExtensionTemplateName();
templateExtension.InitializeEncode(templateName);
objPkcs10.X509Extensions.Add((CX509Extension)templateExtension); Why does it work ? I have no clue but I saw similar issues on Stackoverflow so I gave it a shot and I was then able to request a certificate for a high privilege user, then a TGT, etc. |
Hello Achmad,
I dont exectly remember but I suppose that when I retrieved A$'s TGT I used the "Rubeus createprocess" method where you give Rubeus the TGT and it creates a process with that TGT. You can then steal the token of the newly created process to impersonate the user. This was all done through a Cobalt Strike beacon.
…________________________________
De : achmad-yusuf ***@***.***>
Envoyé : samedi 5 octobre 2024 16:48
À : GhostPack/Certify ***@***.***>
Cc : Eliotsehr ***@***.***>; Comment ***@***.***>
Objet : Re: [GhostPack/Certify] Not working in non domain computer (Issue #13)
Hello,
I ended up a similar situation and I think I found a solution so I'm sharing my experience in the hope that it helps.
My scenario was :
* I have Domain Admin access in Domain A which has a One-Way Outbound Trust with Domain B
* I dumped the shared key in the Trusted Domain Object using Mimikatz on Domain A DC
* I used that key to request a TGT for the Domain A trusted account the exists in Domain B
* I used that TGT to impersonate this user (let's say A$)
So I'm in a PTT session on a computer outside of Domain B and when I try to use Certify I have the same error saying that "An enrollment policy server cannot be located."
To fix this issue I ended up changing Certify source code in Cert.cs line 89 from :
objPkcs10.InitializeFromPrivateKey(context, privateKey, templateName);
To :
objPkcs10.InitializeFromPrivateKey(context, privateKey, "");
CX509ExtensionTemplateName templateExtension = new CX509ExtensionTemplateName();
templateExtension.InitializeEncode(templateName);
objPkcs10.X509Extensions.Add((CX509Extension)templateExtension);
Why does it work ? I have no clue but I saw similar issues on Stackoverflow so I gave it a shot and I was then able to request a certificate for a high privilege user, then a TGT, etc.
hi Eliotsher you mention in point 4.I used that TGT to impersonate this user (let's say A$)
what command that you used to impersonate A$?
thanks
—
Reply to this email directly, view it on GitHub<#13 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJFGAYM6HW53YXCWNRJZ6ELZZ732HAVCNFSM6AAAAABPNNAIQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGA4DCNRTGM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi, Probably you already aware about problems related to running certify in non domain machine. Even if I tried different test cases (runas, netonly, ptt, cmd over pth) each time I got exception and I was not able to request certificate. Could you please recommend me what can I do for this in case if you don't plan any code updates for this issue?
Thanks
The text was updated successfully, but these errors were encountered: