Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Security | Vulnerability Scans and Assessment » PetitPotam attack on Active Directory Certificate Services: How to mitigate NTLM Relay PetitPotam attack on AD CS
  • How to Turn Off Windows 11 Tips and Suggestions Notifications
    How to Turn Off Windows 11 Tips and Suggestions Notifications Windows
  • maxresdefault
    How to extend a VM Hard Disk on VMware Workstation Virtualization
  • PowerShell Exec
    Determine the execution policy configured on Windows PC Windows
  • ftpwindows
    How to install and configure an FTP server on Windows 10 Windows Server
  • ddedw
    You require permission from trustedinstaller: How to delete or rename files protected by Trusted Installer Network | Monitoring
  • dvssvd
    Windows Cached Credentials: How does cached domain logon work? Windows
  • Screenshot 2020 06 22 at 10.17.18
    How to disable Outlook and Yahoo Auto-Complete Network | Monitoring
  • PUA copy
    Enable or disable Reputation-Based Protection on Windows 10 and 11 Network | Monitoring

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

Posted on 28/07/202104/01/2024 Christian By Christian No Comments on 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.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to 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

  • azure just in time
    How to secure access to your Virtual Machine with Just-in-Time (JIT) VM Access AWS/Azure/OpenShift
  • Feature image
    When Should I Use TPM or TPM + PIN Security | Vulnerability Scans and Assessment
  • 1 8y62mmvjlr 5uovgoq6zmq
    How to download and install DriveLock on Windows Security | Vulnerability Scans and Assessment
  • Complete Guide on TestRail as a Test Management Tool   banner
    Complete Guide on TestRail as a Test Management Tool Security | Vulnerability Scans and Assessment
  • drivelock 1280x720 1
    The server could not be reached or validated: Timeout expired. The Time out expired prior to obtaining a connection from the pool Security | Vulnerability Scans and Assessment
  • How to enable or disable Microsoft Defender Antivirus Active or Mode Mode
    Set Microsoft Defender Antivirus to Passive or Active Mode Anti-Virus Solution

More Related Articles

azure just in time How to secure access to your Virtual Machine with Just-in-Time (JIT) VM Access AWS/Azure/OpenShift
Feature image When Should I Use TPM or TPM + PIN Security | Vulnerability Scans and Assessment
1 8y62mmvjlr 5uovgoq6zmq How to download and install DriveLock on Windows Security | Vulnerability Scans and Assessment
Complete Guide on TestRail as a Test Management Tool   banner Complete Guide on TestRail as a Test Management Tool Security | Vulnerability Scans and Assessment
drivelock 1280x720 1 The server could not be reached or validated: Timeout expired. The Time out expired prior to obtaining a connection from the pool Security | Vulnerability Scans and Assessment
How to enable or disable Microsoft Defender Antivirus Active or Mode Mode Set Microsoft Defender Antivirus to Passive or Active Mode Anti-Virus Solution

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

sysadmin top30a

  • How to Turn Off Windows 11 Tips and Suggestions Notifications
    How to Turn Off Windows 11 Tips and Suggestions Notifications Windows
  • maxresdefault
    How to extend a VM Hard Disk on VMware Workstation Virtualization
  • PowerShell Exec
    Determine the execution policy configured on Windows PC Windows
  • ftpwindows
    How to install and configure an FTP server on Windows 10 Windows Server
  • ddedw
    You require permission from trustedinstaller: How to delete or rename files protected by Trusted Installer Network | Monitoring
  • dvssvd
    Windows Cached Credentials: How does cached domain logon work? Windows
  • Screenshot 2020 06 22 at 10.17.18
    How to disable Outlook and Yahoo Auto-Complete Network | Monitoring
  • PUA copy
    Enable or disable Reputation-Based Protection on Windows 10 and 11 Network | Monitoring

Subscribe to Blog via Email

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

Join 1,836 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 AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.