Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

PetitPotam attack on Active Directory Certificate Services: How to mitigate NTLM Relay PetitPotam attack on AD CS

Posted on 28/07/202104/01/2024 IT Expert By IT Expert No Comments on PetitPotam attack on Active Directory Certificate Services: How to mitigate NTLM Relay PetitPotam attack on AD CS
  1. Home
  2. Security | Vulnerability Scans and Assessment
  3. PetitPotam attack on Active Directory Certificate Services: How to mitigate NTLM Relay PetitPotam attack on AD CS
Active Directory

In this guide, we will discuss “PetitPotam attack on AD Certificate Services: mitigate NTLM”. Recently, Lionel Gilles, a French-based Offensive Computer Security researcher based in Paris, France published a PoC tool on NTLM Relay Attacks known as PetitPotam that exploits the MS-EFSRPC (Encrypting File Services Remote Protocol). Here is an example of such documents: NT LAN Manager: How to prevent NTLM credentials from being sent to remote servers.

PetitPotam is a classic NTLM Relay Attack. Such attacks have been previously documented by Microsoft along with numerous mitigation options to protect users.

Below are some related guides: Active Directory Authentication methods: How do Kerberos and NTLM work? how does cached domain logon work?, and What is Pass the Hash Attack and how to mitigate the attack.

PetitPotam takes advantage of servers where the Active Directory Certificate Services (AD CS) is not configured with protections for NTLM Relay Attacks. 

The mitigations below outline to customers how to protect their AD CS servers from such attacks and help in mitigating the Windows Domain Controllers (environment) Compromise.

Here are some guides on how to install and configure Active Directory Certificate Services. Also, see how to create a certificate template for BitLocker Network Unlock.

Active Directory CS NTLM Vulnerability Check

Furthermore, Devices running Active Directory Certificate Services (AD CS) with the following roles (services) enabled. “Certificate Authority Web Enrollment” and “Certificate Enrollment Web Service” are susceptible to this attack when NTLM is utilized.

Run the following PowerShell command in the console to check if your hosts have the installed feature. In the image below, note that this specific server does not have the following role installed.

Get-WindowsFeature adcs-web-enrollment
Certificate Services

But if you have the role installed, it will look like this in the image below.

NTLM Relay

How does this work?

Threat actors can target a DC to send its credentials using the MS-EFSRPC protocol. Moreover, to enrol a DC certificate. Relaying the Domain Controller NTLM credentials to the Active Directory Certificate Services AD CS Web Enrollment pages.

In addition, this will effectively grant the attacker an authentication certificate that they can use to access domain services and compromise the entire domain.

NTLM Authentication in AD CS Vulnerability

If NTLM authentication is enabled in your domain, you are potentially vulnerable to this attack.And you are using Active Directory Certificate Services (AD CS) with any of the following services: 

  • Certificate Authority Web Enrollment,
  • Certificate Enrollment Web Service

Consequently, To prevent NTLM Relay Attacks on networks with NTLM enabled. Domain administrators must ensure that services that permit NTLM authentication use protections such as Extended Protection for Authentication (EPA) or signing features such as SMB signing.

Similarly, PetitPotam takes advantage of servers where the Active Directory Certificate Services (AD CS) is not configured with protections for NTLM Relay Attacks.

Microsoft has released ADV210003 and KB5005413 in response to the published PoC. They recommend that you disable NTLM authentication on your Windows domain controller as the simplest mitigation. 

This hyperlink “Network Security: Restrict NTLM: NTLM authentication in this domain” is Microsoft preferred mitigation steps. Launch Gpedit.msc as shown below

Mitigate

This will open the Group Policy console. Navigate to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options and select the Network Security: Restrict NTLM: NTLM authentication in this domain and ensure it is disabled.

Mitigate
Certificate Services
Screenshot 2021 07 28 at 00.42.35
Active Directory

As you can see below, the NTLM authentication in this domain is being disabled as shown below.

Active Directory

The potential impact of PetitPotam attack on AD

If you configure this policy setting, numerous NTLM authentication requests could fail within the domain, which could degrade productivity.

Before implementing this change through this policy setting. Set Network security: Restrict NTLM: Audit NTLM authentication in this domain to the same option so that you can review the log for the potential impact.

Perform an analysis of servers, and create an exception list of servers to exclude from this policy setting by using Network security: Restrict NTLM: Add server exceptions in this domain.

Other Mitigations against PetitPotam’s attack on AD Certificate Services

If you are unable to disable NTLM on your domain for compatibility reasons, you can do one of the following.

They are listed in order of more secure to less secure.

Method 1

Disable NTLM on any AD CS Servers in your domain using the group policy Network security: Restrict NTLM: Incoming NTLM traffic.To configure this GPO, open Group Policy and go to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options and set “Network security: Restrict NTLM: Incoming NTLM traffic” to “Deny All Accounts” or “Deny All domain accounts”. 

If needed you can add exceptions as necessary. You can use the setting “Restrict NTLM: Add server exceptions in this domain.”  

Mitigate
NTLM Relay

You will be required to confirm the Setting Change by click on Yes as shown below.

Certificate Services
As you can see, the incomming NTLM traffic has been disabled for all Domain accounts. 

Note: The domain controller will deny all NTLM authentication logon attempts using accounts from this domain to all servers in the domain.

The NTLM authentication attempts will be blocked. And will return an NTLM blocked error unless the server name is on the exception list

Screenshot-2021-07-28-at-00.38.19

Method 2

Disable NTLM for Internet Information Services (IIS) on AD CS Servers in your domain running the “Certificate Authority Web Enrollment”. Or “Certificate Enrollment Web Service” services.

To do so open Server Manager, click on Tools and launch the Internet Information Services (IIS) Manager as shown below.

Screenshot-2021-07-28-at-01.03.42

This will open the IIS Manager UI (snap-in). Disable/remove the NTLM provider: Nevertheless, You must set the Windows authentication to “Negotiate:Kerberos” and click on Add, as shown below. 

Screenshot-2021-07-28-at-01.41.09
Screenshot 2021 07 28 at 01.41.09
Screenshot-2021-07-28-at-01.28.07
Screenshot-2021-07-28-at-01.28.22

Remove the available Providers as shown below and Click on Ok.

Screenshot-2021-07-28-at-01.28.42
Screenshot-2021-07-28-at-01.28.58

However, if you can’t disable NTLM outright. We recommend enabling Extended Protection for Authentication (EPA) on AD CS services (Certificate Authority Web Enrollment).

Screenshot-2021-07-28-at-01.47.40
Screenshot-2021-07-28-at-01.48.04

After enabling EPA in the UI, the Web.config file created by CES role at ” %windir%>\systemdata\CES\<CA Name>_CES_Kerberos\web.config” .

Screenshot-2021-07-28-at-01.51.04

The web.config should also be updated by adding <extendedProtectionPolicy> element with either “WhenSupported | Always” value based on the Extended Protection option selected in above IIS UI. 

Therefore, The settings most likely to be used are as follows: 

                <binding name="TransportWithHeaderClientAuth"> 
<security mode="Transport">
<transport clientCredentialType="Windows">
<extendedProtectionPolicy policyEnforcement="Always" />
</transport>
<message clientCredentialType="None" establishSecurityContext="false" negotiateServiceCredential="false" />
</security>
<readerQuotas maxStringContentLength="131072" />
</binding>

I hope you found this blog post on “PetitPotam attack on AD Certificate Services: mitigate NTLM” helpful. Please let me know in the comment session if you have any questions.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Security | Vulnerability Scans and Assessment Tags:Active Directory Certificate Services, Active Directory Domain Services, DC, Domain, Domain Controller, Microsoft Windows, Windows 10, Windows Server 2016

Post navigation

Previous Post: Workaround for “SeriousSAM or HiveNightmare” registry vulnerability for Windows 10 and 11
Next Post: The application /Certsrv does not exist: How to configure Certificate Enrollment Web Services and Certificate Authority Web Enrolment

Related Posts

  • PrintNightMare
    Mitigating ‘PrintNightmare’ Vulnerability: Print Spooler Solutions Security | Vulnerability Scans and Assessment
  • Trellix configurations after ePo setup
    ePO Server Settings: Trellix ePO AD integration and ENS Agents Installation Security | Vulnerability Scans and Assessment
  • PrintNightMare 1
    PrintNightmare security update for Windows Server and Windows 10 Security | Vulnerability Scans and Assessment
  • Fix Windows Security Blank Screen Issue
    How to Fix Windows Security Blank Screen Issue Network | Monitoring
  • update powershell
    Fix WDAC vulnerabilities by updating PowerShell Security | Vulnerability Scans and Assessment
  • Feature image msert tool
    How to remove malware using Microsoft Safety Scanner on Windows 10 and 11 Security | Vulnerability Scans and Assessment

More Related Articles

PrintNightMare Mitigating ‘PrintNightmare’ Vulnerability: Print Spooler Solutions Security | Vulnerability Scans and Assessment
Trellix configurations after ePo setup ePO Server Settings: Trellix ePO AD integration and ENS Agents Installation Security | Vulnerability Scans and Assessment
PrintNightMare 1 PrintNightmare security update for Windows Server and Windows 10 Security | Vulnerability Scans and Assessment
Fix Windows Security Blank Screen Issue How to Fix Windows Security Blank Screen Issue Network | Monitoring
update powershell Fix WDAC vulnerabilities by updating PowerShell Security | Vulnerability Scans and Assessment
Feature image msert tool How to remove malware using Microsoft Safety Scanner on Windows 10 and 11 Security | Vulnerability Scans and Assessment

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Veeam Vanguard

  • xp cmdshell MSSQL
    How to verify whether the xp_cmdshell feature is enabled or disabled in MSSQL Server Oracle/MSSQL/MySQL
  • linkyourandriodtoyourpc
    Microsoft Phone Link: Connect Android to Windows 11 Windows
  • banner
    How to create a password reset disk: Reset Windows Password Windows
  • Featured image BitLocker AES XTX 256
    Enable BitLocker AES-XTX 256 Encryption Security | Vulnerability Scans and Assessment
  • sql server installation
    How to Install all Editions of Microsoft SQL Server 2025 Oracle/MSSQL/MySQL
  • ext
    How to install a standalone DriveLock Encryption software on Windows Security | Vulnerability Scans and Assessment
  • Root
    Change your root password: Manage the root user on your macOS Mac
  • Mendeley Cite with MSWord Issue resolved
    Mendeley Cite ECITE40001 Error: Fix issue using Microsoft Word Desktop application Mac

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,796 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.