(SOLUTION)IMPACKET ERROR MS17–010

Abhishekgk
2 min readOct 19, 2021

--

Greetings Everyone,

If you are reading this post, it seems you are struggling with the famous

“no module named impacket” error when exploiting ms17–010. It is a

common vulnerability which you will have to face while solving machines

from hackthebox, tryhackme or oscp labs.

The famous impacket error.

Without wasting your time, I will give you the solution which worked for me

after trying and giving up on different steps suggested on hack the box forums, medium articles, reddit, and oscp forums.

The error happens because, even after using “pip install impacket”, your system shows that “requirement already satisified”, but, when you execute it, it shows the same error, as impacket is by default getting installed in python3.

The exploit runs using python 2.7 , which makes things hard.

So, Immediate solution for that is to use python2.7 virtual environment which will run install and run impacket in python2.7 and you are ready to go.

If you never heard of virtual environments, dont worry, i will guide you with 3 simple steps which will save you for now. But, make sure to do your own recon on this topic.

STEP1:

sudo apt install virtualenv

virtualenv for python2.7

STEP2:

Virtualenv — python=python2 env

sorry, if picture is blurred.

STEP3:

source env/bin/activate

pip install impacket

impacket installation.

Now , you can run your exploit.

I hope it worked for you.

If it worked, I am glad, and spend some time to share this article with others to help them, and give some claps if you liked it.

You can ping me on twitter @abhishek3141pie .

Thank you for spending your valuable time reading this.

--

--