PetitPotam? Microsoft Defender for Identity has it covered!

Published Aug 18 2021 09:13 AM 3,618 Views
Microsoft

If you didn’t grow up in the '90s in France like yours truly, you probably wouldn’t be familiar with the animated kids show named Petit Potam, which was based on the books of the same name by Christine Chagnoux.

 

While I could talk about the TV series for days, the reason Petit Potam came to the news lately is because of a vulnerability that was recently published with the same name which can potentially be used in an attack on Windows domain controllers. PetitPotam is a tool that can exploit the Encrypting File System Remote (EFSRPC) Protocol.

 

Exploiting the MS-EFSRPC

The EFSRPC protocol that PetitPotam exploits is typically used to maintain and manage encrypted data that is stored remotely and accessed over a network. It’s mainly used to manage Windows files that reside on remote file servers and are encrypted using the Encrypting File System (EFS).

DanielNaim_0-1629208438756.png

 

Figure 1. Message sequence for opening a file using EFS

 

Using the PetitPotam vector, an adversary can manipulate MS-EFSRPC API functions without authentication using the OpenEncryptedFileRaw calls. This allows the adversary to force a domain controller to authenticate to an NTLM relay server under the attacker's control.

 

NTLM Relay attack

NTLM relay attacks allow the malicious actor to access services on the network by positioning themselves between the client and the server and usually intercepting the authentication traffic and then attempting to impersonate the client.

To prevent NTLM relay attacks on networks with NTLM enabled, domain administrators must ensure that services that permit NTLM authentication utilize protections such as Extended Protection for Authentication (EPA), or signing features, like SMB signing.

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

 

Microsoft Defender for Identity detection

Starting from version 2.158 onwards, Microsoft Defender for Identity will trigger a security alert whenever an attacker is trying to exploit the EFS-RPC against the domain controller, which is the preliminary step of the PetitPotam attack.

 

MicrosoftTeams-image (8).png

Figure 2. Suspicious Network Connection over EFS-RPC alert information

 

The alert provides visibility into network activity over the protocol and when an attacker is trying to force the domain controller to authenticate against a remote device. The alert will contain the following information:

  • Source context – which can be the user and/or the device originating the request
  • The target domain controller
  • The remote device – including the file the attacker was trying to read

 

How to protect your organization further

On August 10, 2021, Microsoft published CVE-2021-36942 which addresses this vulnerability, named Windows LSA Spoofing Vulnerability. We highly recommend prioritizing updating the domain controllers with this CVE.

To learn more about the CVE, see the details in the MSRC portal with the following link: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-36942

 

What next?

 

If you haven't already got access to Defender for Identity, you can start a trial using this link

 

We're always adding new capabilities to Defender for Identity and we'll make announcements about great new features here in this blog, so check back regularly to see what the latest updates bring to your security teams. 

 

We're always keen on hearing your feedback, so please let us know in the comments section below if you have anything to share with us about this detection. 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2656271%22%20slang%3D%22en-US%22%3EPetitPotam%3F%20Microsoft%20Defender%20for%20Identity%20has%20it%20covered!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2656271%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20didn%E2%80%99t%20grow%20up%20in%20the%20'90s%20in%20France%20like%20yours%20truly%2C%20you%20probably%20wouldn%E2%80%99t%20be%20familiar%20with%20the%20animated%20kids%20show%20named%20%3CEM%3EPetit%3C%2FEM%3E%20%3CEM%3EPotam%2C%20%3C%2FEM%3Ewhich%20was%20based%20on%20the%20books%20of%20the%20same%20name%20by%20Christine%20Chagnoux.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhile%20I%20could%20talk%20about%20the%20TV%20series%20for%20days%2C%20the%20reason%20Petit%20Potam%20came%20to%20the%20news%20lately%20is%20because%20of%20a%20vulnerability%20that%20was%20recently%20published%20with%20the%20same%20name%20which%20can%20potentially%20be%20used%20in%20an%20attack%20on%20Windows%20domain%20controllers.%20PetitPotam%20is%20a%20tool%20that%20can%20exploit%20the%20Encrypting%20File%20System%20Remote%20(EFSRPC)%20Protocol.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--381018457%22%20id%3D%22toc-hId--380241935%22%3EExploiting%20the%20MS-EFSRPC%3C%2FH2%3E%0A%3CP%3EThe%20EFSRPC%20protocol%20that%20PetitPotam%20exploits%20is%20typically%20used%20to%20maintain%20and%20manage%20encrypted%20data%20that%20is%20stored%20remotely%20and%20accessed%20over%20a%20network.%20It%E2%80%99s%20mainly%20used%20to%20manage%20Windows%20files%20that%20reside%20on%20remote%20file%20servers%20and%20are%20encrypted%20using%20the%20Encrypting%20File%20System%20(EFS).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22DanielNaim_0-1629208438756.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303763iC524478B1F9C9E59%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22DanielNaim_0-1629208438756.png%22%20alt%3D%22DanielNaim_0-1629208438756.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%3CEM%3E%3CFONT%20size%3D%222%22%3EFigure%201.%20Message%20sequence%20for%20opening%20a%20file%20using%20EFS%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsing%20the%20PetitPotam%20vector%2C%20an%20adversary%20can%20manipulate%20MS-EFSRPC%20API%20functions%20without%20authentication%20using%20the%20%3CEM%3EOpenEncryptedFileRaw%3C%2FEM%3E%20calls.%20This%20allows%20the%20adversary%20to%20force%20a%20domain%20controller%20to%20authenticate%20to%20an%20NTLM%20relay%20server%20under%20the%20attacker's%20control.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2106494376%22%20id%3D%22toc-hId-2107270898%22%3ENTLM%20Relay%20attack%3C%2FH2%3E%0A%3CP%3ENTLM%20relay%20attacks%20allow%20the%20malicious%20actor%20to%20access%20services%20on%20the%20network%20by%20positioning%20themselves%20between%20the%20client%20and%20the%20server%20and%20usually%20intercepting%20the%20authentication%20traffic%20and%20then%20attempting%20to%20impersonate%20the%20client.%3C%2FP%3E%0A%3CP%3ETo%20prevent%20NTLM%20relay%20attacks%20on%20networks%20with%20NTLM%20enabled%2C%20domain%20administrators%20must%20ensure%20that%20services%20that%20permit%20NTLM%20authentication%20utilize%20protections%20such%20as%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmsrc-blog.microsoft.com%2F2009%2F12%2F08%2Fextended-protection-for-authentication%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EExtended%20Protection%20for%20Authentication%20(EPA)%3C%2FA%3E%3C%2FSPAN%3E%2C%20or%20signing%20features%2C%20like%20SMB%20signing.%3C%2FP%3E%0A%3CP%3EPetitPotam%20takes%20advantage%20of%20servers%20where%20Active%20Directory%20Certificate%20Services%20(AD%20CS)%20is%20not%20configured%20with%20protections%20for%20NTLM%20relay%20attacks.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-299039913%22%20id%3D%22toc-hId-299816435%22%3EMicrosoft%20Defender%20for%20Identity%20detection%3C%2FH2%3E%0A%3CP%3EStarting%20from%20version%202.158%20onwards%2C%20Microsoft%20Defender%20for%20Identity%20will%20trigger%20a%20security%20alert%20whenever%20an%20attacker%20is%20trying%20to%20exploit%20the%20EFS-RPC%20against%20the%20domain%20controller%2C%20which%20is%20the%20preliminary%20step%20of%20the%20PetitPotam%20attack.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22MicrosoftTeams-image%20(8).png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303765i7EDCCCA2DCE67B9E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22MicrosoftTeams-image%20(8).png%22%20alt%3D%22MicrosoftTeams-image%20(8).png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%3CEM%3E%3CFONT%20size%3D%222%22%3EFigure%202.%20Suspicious%20Network%20Connection%20over%20EFS-RPC%20alert%20information%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20alert%20provides%20visibility%20into%20network%20activity%20over%20the%20protocol%20and%20when%20an%20attacker%20is%20trying%20to%20force%20the%20domain%20controller%20to%20authenticate%20against%20a%20remote%20device.%20The%20alert%20will%20contain%20the%20following%20information%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESource%20context%20%E2%80%93%20which%20can%20be%20the%20user%20and%2For%20the%20device%20originating%20the%20request%3C%2FLI%3E%0A%3CLI%3EThe%20target%20domain%20controller%3C%2FLI%3E%0A%3CLI%3EThe%20remote%20device%20%E2%80%93%20including%20the%20file%20the%20attacker%20was%20trying%20to%20read%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--1508414550%22%20id%3D%22toc-hId--1507638028%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId-979098283%22%20id%3D%22toc-hId-979874805%22%3EHow%20to%20protect%20your%20organization%20further%3C%2FH2%3E%0A%3CP%3EOn%20August%2010%2C%202021%2C%20Microsoft%20published%20CVE-2021-36942%20which%20addresses%20this%20vulnerability%2C%20named%20Windows%20LSA%20Spoofing%20Vulnerability.%20We%20highly%20recommend%20prioritizing%20updating%20the%20domain%20controllers%20with%20this%20CVE.%3C%2FP%3E%0A%3CP%3ETo%20learn%20more%20about%20the%20CVE%2C%20see%20the%20details%20in%20the%20MSRC%20portal%20with%20the%20following%20link%3A%20%3CA%20href%3D%22https%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-36942%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsrc.microsoft.com%2Fupdate-guide%2Fvulnerability%2FCVE-2021-36942%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--828356180%22%20id%3D%22toc-hId--827579658%22%3EWhat%20next%3F%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20haven't%20already%20got%20access%20to%20Defender%20for%20Identity%2C%20you%20can%20start%20a%20trial%20%3CA%20href%3D%22https%3A%2F%2Fportal.office.com%2Fsignup%2Flogout%3FOfferId%3D87dd2714-d452-48a0-a809-d2f58c4f68b7%26amp%3Bali%3D1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eusing%20this%20link%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe're%20always%20adding%20new%20capabilities%20to%20Defender%20for%20Identity%20and%20we'll%20make%20announcements%20about%20great%20new%20features%20here%20in%20this%20blog%2C%20so%20check%20back%20regularly%20to%20see%20what%20the%20latest%20updates%20bring%20to%20your%20security%20teams.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe're%20always%20keen%20on%20hearing%20your%20feedback%2C%20so%20please%20let%20us%20know%20in%20the%20comments%20section%20below%20if%20you%20have%20anything%20to%20share%20with%20us%20about%20this%20detection.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2656271%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20didn%E2%80%99t%20grow%20up%20in%20the%20'90s%20in%20France%20like%20yours%20truly%2C%20you%20probably%20wouldn%E2%80%99t%20be%20familiar%20with%20the%20animated%20kids%20show%20named%20%3CEM%3EPetit%3C%2FEM%3E%20%3CEM%3EPotam%2C%20%3C%2FEM%3Ewhich%20was%20based%20on%20the%20books%20of%20the%20same%20name%20by%20Christine%20Chagnoux.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22DanielNaim_0-1629208438756.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303763iC524478B1F9C9E59%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22DanielNaim_0-1629208438756.png%22%20alt%3D%22DanielNaim_0-1629208438756.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2656271%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Defender%20for%20Identity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Aug 18 2021 09:13 AM
Updated by: