3/ The whitepaper Certified Pre-Owned: Abusing Active Directory Certificate Services by Will Schroeder and Lee Christensen showcased new possibilities and attack vectors to gain domain administrative rights as an attacker. [1]
4/ Attackers (and we as Defenders!) can use the Certify tool published by @SpecterOps to find vulnerable certificates.
Below are parts of a vulnerable certificate (from [2]).
5/ In the screenshot above, we see ENROLLEE_SUPPLIES_SUBJECT, which means the user requesting a new certificate based on this template can request a certificate for any user, including domain admins! 🤯
6/ Client Authentication at PkiExtendedKeyUsage means that the newly created certificate, based on this template, can also be used for authentication against computers in AD.
7/ Based on "Enrollment Rights: NT Authority\Authenticated Users," any authenticated user can create a new certificate based on this template.
8/ Further details and more profound descriptions can be found in [2]. 📖
9/ "Once the vulnerable certificate template has been identified, we can request a new certificate on behalf of a domain administrator using Certify." [2]
10/ "Once we have the certificate in cert.pfx, we can request a Kerberos TGT for the user for which we minted the new certificate." [2]
11/ In a nutshell - it's practically game over at this point.
More attacks against vulnerable certificates exist than outlined here (check the original whitepaper from SpecterOps), and there is constant research in this area.
12/ In our AD assessments, we find regularly vulnerable certificates.
In discussions with customers, it becomes clear that this topic is still too little known among administrators and IT security personnel.
A circumstance that needs to be changed.
13/ As always, we cannot protect our networks 100%, but we should raise the bar as high as possible, eliminating vulnerable certificates and misconfigurations in our AD Certificate Services.
2/ In our AD assessments or IR cases, we repeatedly see that service accounts are highly privileged, often also part of the domain administrators group.
This can be disastrous, especially with a weak password for the service account:
3/ @Synacktiv took a closer look at the detection capabilities of Defender for Identity, including whether and how Kerberoasting could be detected. [1]
A TA brute-forced the password of the domain admin.
The customer first suspected an internal compromise, but upon a deeper investigation of this incident, we quickly realized that the IP address was the internal address of a Cisco ASA VPN box.
2/ The customer disabled the login mask a long time ago on the public internet-facing IP address of the Cisco ASA, as depicted in the image below.
3/ But, if we take a closer look at the @metasploit module 'Cisco SSL VPN Bruteforce Login Utility', we see that the URL "+CSCOE+/logon.htm" is used for the password guessing, at least in this module. [1]
2/ When I saw this for the first time I was quite confused and scratched my head, because I always look for suspicious user agents or deviating user agents of the compromised user.
It took a moment to realise that the phishing kit spoofed the UA from the user's browser. 👉😏
3/ This behavior of Evilginx2 makes it harder to find outliers in the recorded login information, because as nicely described in the blog the user agent from the user performs the login as if the user would log in himself.
2/ The screenshot above depicts the content of the config.json file, which is located in the installation directory of DWservice, and could be interesting for LEA purposes (the key could be linked to an account).
Below is another screenshot with various features of the service.
3/ In our case, the path to the binary was C:\Programdata\DWAgent\native\dwagsvc.exe, but the path can be changed during installation.
1/ Playing around with the BatLoader sample showcased first in the @VMware blog [1][2].
"The novaPDF installer is edited using the tool Advanced Installer to add a PowerShellScriptInline custom action that executes a malicious PowerShell script."
2/ What is exciting for us as analysts: After installing the Advanced Installer on my VM, the BatLoader MSI package can be opened inside Advanced Installer, and the PowerShell code can be copied out (see above).
How to create PS custom actions is described here [3].
3/ After the initial infection, in this case, Nsudo was used for performing configuration changes on the infected machine.
In the commands presented in the VMware blog, we can see the typical Nsudo command line "-U:T", as I also describe here: