EternalBlue Windows7 -- can't get the reverse shell

Hi Jesse!

The link for IE8 on Win7 (x86) from your video is removed by MS, so I downloaded the next version – IE9 on Win7 (x86). I’m not sure if could use it, but the nmap scan of IE9 confirmed that the ms17-010 vulnerability exists.
Although, at the final step, while running the python script, I got an error:

I skimmed through the python code, and found that it needs the impacket==0.9.15. I was wondering if a simple pip install of that module could solve the issue? If yes, where should I run that command from (which directory), so the module is installed where it needs to be installed?

Thank you!

Yes, you can update any python library using pip command. You can run it from any directory as python and pip are mostly included in your environment variables so it will run and install it globally.

Running and installing it from root didn’t fix the problem. I still get the same error.

What error are you getting? What happened when you tried to update the impacket? Also, you are already in root as seen from your previous screenshot.

Yes, I’m already in root.

then I’m trying to run python code and get this:

Btw, if I try the latest version of impacket==0.9.22, the error message is the same.

In addition to my last reply, I have noticed that pip list --outdated shows me that impacket package is of a source distribution type:

root@kali:~# pip list --outdated
Package Version Latest Type


impacket 0.9.15 0.9.22 sdist

I learned that sdist, as opposed to wheel type, requires a built step before it can be installed. But I’m not sure if this has anything to do with my issue… :confused:

If you are getting the ImportError, it means that impacket is not installed on your system.
Just try running these commands:
pip install impacket
python
import impacket

What do you get? If it imports correctly then it means you have it installed correctly. I tried installing both the versions on my python 3.8 and it worked perfectly.

You were right, I forgot to import the package. But still, you are saying it worked perfectly for you? Very strange.
I also use python 3.8. If I install impacket 0.9.22, it now complains about concatenating strings to bytes:

That means that eternalblue_exploit7.py script is made for python2. How come you did not get this error?

If I run the command with impacket 0.9.15, I get many non-stopping syntax errors in the impacket’s files. Like if I fix one, there’s another and another…

I found another user having the same issue as I do, but they have no solution (https://forum.hackthebox.eu/discussion/4061/need-help-with-manual-py-exploit-cant-concat-str-to-bytes)

No, I didn’t run that script. I was just saying about impacket. For the script, if it is written in python 2 then you have to convert it to python3 or run python2 itself.

python2 is not supported any longer… :frowning:

Then you have to convert it to python 3. Try searching on Google, you may get some script related to this.