risksense / zerologon

Exploit for zerologon cve-2020-1472
MIT License
635 stars 146 forks source link

module "impacket.dcerpc.v5.nrpc" has no attribute "NetrServerPasswordSet2" #7

Open oscillate123 opened 4 years ago

oscillate123 commented 4 years ago

Hi!

The title shows every time I run the "set_empty_pw.py" script, but right after the 'error' your script says: "success! dc should now have the empty string as its machine password". But btw, it doesn't!

I've reinstalled impacket, with "pip3 install impacket" downloaded the impacket repo from source "python3.6 setup.py install" "python3.6 setup.py build" "sudo apt install python-impacket" I've tried to change all the "#!/usr/bin/env " to "!/usr/bin/python3.6" and the script keep complaining on that "has no attribute". I wrote a python3.6 script using NetrServerPasswordSet2 and then it doesn't get error.

D4rkC0m3t commented 4 years ago

Hi There,

I`m facing the below issue please provide fix for this

Traceback (most recent call last): File "set_empty_pw.py", line 3, in from impacket.dcerpc.v5 import nrpc, epm ModuleNotFoundError: No module named 'impacket.dcerpc'

Aareon commented 3 years ago

Hi!

The title shows every time I run the "set_empty_pw.py" script, but right after the 'error' your script says: "success! dc should now have the empty string as its machine password". But btw, it doesn't!

I've reinstalled impacket, with "pip3 install impacket" downloaded the impacket repo from source "python3.6 setup.py install" "python3.6 setup.py build" "sudo apt install python-impacket" I've tried to change all the "#!/usr/bin/env " to "!/usr/bin/python3.6" and the script keep complaining on that "has no attribute". I wrote a python3.6 script using NetrServerPasswordSet2 and then it doesn't get error.

You should use a virtual environment. Make sure you’re using Python 3.6+

cd zerologon/
python3 -m venv venv
./venv/Scripts/activate

Ensure the env is active python3 --version pip install impacket just in-case venv doesn’t work, use --user

python3 setup.py install

Aareon commented 3 years ago

Hi There,

I`m facing the below issue please provide fix for this

Traceback (most recent call last): File "set_empty_pw.py", line 3, in from impacket.dcerpc.v5 import nrpc, epm ModuleNotFoundError: No module named 'impacket.dcerpc'

Follow the same instructions in my previous comment