2

I have a school projet that require me to emulate the CVE-2020-1472 (Zerologon) on a local environment. I am currently trying to test following github script but I am facing some issue that I haven't been able to solve since then.

To sumerize, I have a :

  • Ubuntu 16.04 machine with Samba 4.3.8 Domain Controller Active Directory
  • Windows Server 2019 that joined the domain EXAMPLE.COM that I created with Samba.

I've made several test and I can succesfully modify the password of the "Administrator" account with first part of the POC : ./cve-2020-1472-exploit.py -n EXAMPLE-DC -t 1.2.3.4

Problem comes when trying to run impacket to extract some data from the domain :

secretsdump.py -no-pass -just-dc Domain/'DC_NETBIOS_NAME$'@DC_IP_ADDR

It sucesfully log in but then I get this message :

Password:
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
[-] DRSR SessionError: code: 0x20e4 - ERROR_DS_CANT_FIND_EXPECTED_NC - The naming context could not be found.
[*] Something wen't wrong with the DRSUAPI approach. Try again with -use-vss parameter
[*] Cleaning up...

UPDATE 1 : I also tried to use the -use-vss option but it also fails after login in.

[-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied 
[*] Searching for NTDS.dit
[-] 'NoneType' object has no attribute 'request'
[*] Cleaning up...

I tried to get some information about the DRSR SessionError: code: 0x20e4 - ERROR_DS_CANT_FIND_EXPECTED_NC but I didn't found any usefull informations on internet.. I hope someone have already faced this error or have knowledge regarding Active Directory because I'm really stuck

Thanks in advance and have a good week !

UPDATE 2:

I made a post on impacket's github and it seems like the DRSUAPI approach hasn't been tested against a non Windows AD before. So secretsdump wont works.

Every page mentioned SAMBA as vulnerable so I wonder if they really tested to exploit the vulnerability or if it was just a theoretical assumption.

krasseu
  • 21
  • 3
  • Did you `Try again with -use-vss parameter`? – Lieven Keersmaekers Nov 13 '20 at 07:43
  • 1
    Hi, thanks for the answer. I did but unfortunately it didn't work neither. I made a [post](https://github.com/SecureAuthCorp/impacket/issues/991) on impacket's github and it seems like they didn't imlement it thinking about non Windows-AD (I tried the exploit on a Windows AD and evertyhing is working fine) So my guess is that the implementation of the protocols are not exactly the same so I don't understand why everyone is mentioning Samba since nobody really tried the exploit on it. – krasseu Nov 13 '20 at 11:53
  • thank's for the followup. – Lieven Keersmaekers Nov 13 '20 at 12:15

0 Answers0