AutoBlue-MS17-010 icon indicating copy to clipboard operation
AutoBlue-MS17-010 copied to clipboard

Python3 related issue.

Open leoleogeek opened this issue 3 years ago • 1 comments

My Kali Release: 2021.1

when I run the command, I got the error message below:

┌──(kali㉿kali)-[~/blue] └─$ python3 ./eternalblue_exploit10.py 10.10.10.40 ./shellcode/sc_all.bin Traceback (most recent call last): File "/home/kali/blue/./eternalblue_exploit10.py", line 74, in ntfea9000 = (pack('<BBH', 0, 0, 0) + '\x00')*0x260 # with these fea, ntfea size is 0x1c80 TypeError: can't concat str to byt

I have run the command line below before running it.

┌──(kali㉿kali)-[~/blue] └─$ pip install -r requirements.txt 1 ⨯ Requirement already satisfied: impacket in /usr/local/lib/python3.9/dist-packages/impacket-0.9.23-py3.9.egg (from -r requirements.txt (line 1)) (0.9.23) Requirement already satisfied: chardet in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (4.0.0) Requirement already satisfied: flask>=1.0 in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (1.1.2) Requirement already satisfied: future in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (0.18.2) Requirement already satisfied: ldap3!=2.5.0,!=2.5.2,!=2.6,>=2.5 in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (2.8.1) Requirement already satisfied: ldapdomaindump>=0.9.0 in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (0.9.3) Requirement already satisfied: pyOpenSSL>=0.16.2 in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (20.0.1) Requirement already satisfied: pyasn1>=0.2.3 in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (0.4.8) Requirement already satisfied: pycryptodomex in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (3.9.7) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from impacket->-r requirements.txt (line 1)) (1.15.0)

I thought it is related to python version issue, but don't know how to fix it. As you mentioned it support Python3, would you please have a look? I am new to python :(

leoleogeek avatar Aug 06 '21 18:08 leoleogeek

Hey there! This does seem like a valid potential bug missed in the Python3 upgrade. I'll look into this ASAP.

That said I highly encourage you as a beginner to attempt a fix and submit a PR! I am happy to review it and take on contributions, and this is a very simple str to bytes conversion fix that would be an excellent start for a beginner. Consider it if you have the time otherwise I'll attempt to replicate and determine if this is valid and Push a fix as soon as I am able!

3ndG4me avatar Sep 23 '21 06:09 3ndG4me

Looks like this might be fixed as of python 3.11. Just tried with a clean install. I did have a byte concat issue in the mysmb.py file that I am PR'ing soon. I also did see this in other scenarios even with the checker script during recent testing. A few community patches plus the mysmb.py patch seems to have fixed it. If it arises again I'll have to track down the error source, but it's all just related to changes in byte conversion.

3ndG4me avatar May 19 '23 18:05 3ndG4me

This issue seems to have come back up. Removing https://github.com/3ndG4me/AutoBlue-MS17-010/commit/af832e0ec62a290c9365fd5c24f6a451576922c2 fixes it

soxrok2212 avatar Jun 20 '23 04:06 soxrok2212