Open tquentin opened 4 years ago
Requirement check: Python 3.8.5 E:\GitHub\CVE-2020-1472>e:\Python\Python38\python -m pip install -r requirements.txt Requirement already satisfied: cffi==1.14.2 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 1)) (1.14.2) Requirement already satisfied: click==7.1.2 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 2)) (7.1.2) Requirement already satisfied: cryptography==3.1 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 3)) (3.1) Requirement already satisfied: dnspython==2.0.0 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 4)) (2.0.0) Requirement already satisfied: Flask==1.1.2 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 5)) (1.1.2) Requirement already satisfied: future==0.18.2 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 6)) (0.18.2) Requirement already satisfied: impacket==0.9.21 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 7)) (0.9.21) Requirement already satisfied: itsdangerous==1.1.0 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 8)) (1.1.0) Requirement already satisfied: Jinja2==2.11.2 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 9)) (2.11.2) Requirement already satisfied: ldap3==2.8 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 10)) (2.8) Requirement already satisfied: ldapdomaindump==0.9.3 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 11)) (0.9.3) Requirement already satisfied: MarkupSafe==1.1.1 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 12)) (1.1.1) Requirement already satisfied: pyasn1==0.4.8 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 13)) (0.4.8) Requirement already satisfied: pycparser==2.20 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 14)) (2.20) Requirement already satisfied: pycryptodomex==3.9.8 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 15)) (3.9.8) Requirement already satisfied: pyOpenSSL==19.1.0 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 16)) (19.1.0) Requirement already satisfied: six==1.15.0 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 17)) (1.15.0) Requirement already satisfied: Werkzeug==1.0.1 in e:\python\python38\lib\site-packages (from -r requirements.txt (line 18)) (1.0.1)
Python 3.7.1 E:\GitHub\CVE-2020-1472>e:\Python\Python37\python -m pip install -r requirements.txt Requirement already satisfied: cffi==1.14.2 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 1)) (1.14.2) Requirement already satisfied: click==7.1.2 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 2)) (7.1.2) Requirement already satisfied: cryptography==3.1 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 3)) (3.1) Requirement already satisfied: dnspython==2.0.0 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 4)) (2.0.0) Requirement already satisfied: Flask==1.1.2 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 5)) (1.1.2) Requirement already satisfied: future==0.18.2 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 6)) (0.18.2) Requirement already satisfied: impacket==0.9.21 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 7)) (0.9.21) Requirement already satisfied: itsdangerous==1.1.0 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 8)) (1.1.0) Requirement already satisfied: Jinja2==2.11.2 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 9)) (2.11.2) Requirement already satisfied: ldap3==2.8 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 10)) (2.8) Requirement already satisfied: ldapdomaindump==0.9.3 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 11)) (0.9.3) Requirement already satisfied: MarkupSafe==1.1.1 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 12)) (1.1.1) Requirement already satisfied: pyasn1==0.4.8 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 13)) (0.4.8) Requirement already satisfied: pycparser==2.20 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 14)) (2.20) Requirement already satisfied: pycryptodomex==3.9.8 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 15)) (3.9.8) Requirement already satisfied: pyOpenSSL==19.1.0 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 16)) (19.1.0) Requirement already satisfied: six==1.15.0 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 17)) (1.15.0) Requirement already satisfied: Werkzeug==1.0.1 in e:\python\python37\lib\site-packages (from -r requirements.txt (line 18)) (1.0.1)
I'm not sure it is because my working environment has some control on the DC access OR the script problem. I tried on both Windows and Kali env. Below are the error messages:
Kali (Python 3.8.5): root@kali:~/GitHub/CVE-2020-1472# python3 zerologon_tester.py EXAMPLEHOST 192.168.0.1 Performing authentication attempts... Traceback (most recent call last): File "zerologon_tester.py", line 86, in
perform_attack('\\' + dc_name, dc_ip, dc_name)
File "zerologon_tester.py", line 62, in perform_attack
rpc_con = try_zero_authenticate(dc_handle, dc_ip, target_computer)
File "zerologon_tester.py", line 35, in try_zero_authenticate
nrpc.hNetrServerReqChallenge(rpc_con, dc_handle + '\x00', target_computer + '\x00', plaintext)
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/nrpc.py", line 2668, in hNetrServerReqChallenge
return dce.request(request)
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 856, in request
answer = self.recv()
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 1307, in recv
response_data = self._transport.recv(forceRecv, count=MSRPCRespHeader._SIZE)
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/transport.py", line 345, in recv
buffer += self.__socket.recv(count-len(buffer))
ConnectionResetError: [Errno 104] Connection reset by peer
Windows 10 (Python 3.8.5): E:\GitHub\CVE-2020-1472>e:\Python\Python38\python zerologon_tester.py EXAMPLEHOST 192.168.0.1 Performing authentication attempts... Traceback (most recent call last): File "zerologon_tester.py", line 86, in
perform_attack('\\' + dc_name, dc_ip, dc_name)
File "zerologon_tester.py", line 62, in perform_attack
rpc_con = try_zero_authenticate(dc_handle, dc_ip, target_computer)
File "zerologon_tester.py", line 35, in try_zero_authenticate
nrpc.hNetrServerReqChallenge(rpc_con, dc_handle + '\x00', target_computer + '\x00', plaintext)
File "e:\Python\Python38\lib\site-packages\impacket\dcerpc\v5\nrpc.py", line 2668, in hNetrServerReqChallenge
return dce.request(request)
File "e:\Python\Python38\lib\site-packages\impacket\dcerpc\v5\rpcrt.py", line 856, in request
answer = self.recv()
File "e:\Python\Python38\lib\site-packages\impacket\dcerpc\v5\rpcrt.py", line 1307, in recv
response_data = self._transport.recv(forceRecv, count=MSRPCRespHeader._SIZE)
File "e:\Python\Python38\lib\site-packages\impacket\dcerpc\v5\transport.py", line 345, in recv
buffer += self.__socket.recv(count-len(buffer))
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
the same using Python 3.7