Impacket issue

I’m really REALLY struggling with impacket. I’m trying various scripts on boxes where MS08-067 is suspected.

For instance, this script:

searchsploit -m 40279.py

What I tried so far:

  • new Kali 2021.1 download (fresh install)
  • all variations of pip, pip3, python, python2.7, python3).
  • redownloaded impacket from bitbucket, various version.
  • tried some pycryptodome advice from this forum
  • pip install pycrypto
  • pip install impacket
  • sudo apt-get install python3-pip
  • etc…

All I end up with if I try to execute this script (doing “python 40279.py”) is

Install the following library to make this script work
Impacket : http://oss.coresecurity.com/projects/impacket.html
PyCrypto : http://www.amk.ca/python/code/crypto.html

If I try pip install pycrypto or pip install impacket it’s an already satisfied dependency. I feel like a total complete noob, I googled the ■■■■ out of it, but I am really stuck.

Any help would be greatly appreciated!

This looks like a python 2 script. I have the impression that Kali moved to python3, they kept python2 though but I think the default is python3, which means that you probably do something like pip2 install or do it withing a virtualenv. On my system. It is not Kali, nor Parrot I can use the script as follows (you need to have pip for python2 and virtualenv) virtualenv2 venv source venv/bin/activate pip install impacket pycrypto python 40279.py ####################################################################### # MS08-067 Exploit # This is a modified verion of Debasis Mohanty’s code (Microsoft Windows Server 2000/2003 - Code Execution (MS08-067) - Windows remote Exploit). # The return addresses and the ROP parts are ported from metasploit module exploit/windows/smb/ms08_067_netapi ####################################################################### Usage: 40279.py

Example: MS08_067.py 192.168.1.1 1 for Windows XP SP0/SP1 Universal

Example: MS08_067.py 192.168.1.1 2 for Windows 2000 Universal