worawit / MS17-010

MS17-010
2.14k stars 1.1k forks source link

Problem with mysmb.py #2

Closed danielhuynh97 closed 7 years ago

danielhuynh97 commented 7 years ago

I create a folder with name is mysmb in dist-packages and I download mysmb.py in this folder but when I run scripts zzz_exploit.py it said ImportError: No module named mysmb

Do you tutorial how to install Extended Impacket SMB ? I hope you reply me. Thank you

benichmt1 commented 7 years ago

Just clone the full repository with git and it should work fine.

danielhuynh97 commented 7 years ago

Yeah, It work but it have another problem. And do you tell me what is the 'pipe_name' ?

Traceback (most recent call last): File "zzz_exploit.py", line 473, in exploit(target, pipe_name) File "zzz_exploit.py", line 270, in exploit conn = MYSMB(target) TypeError: 'module' object is not callable

danielhuynh97 commented 7 years ago

python2.7 zzz_exploit.py 192.168.0.5 445 Target OS: Windows Server 2008 R2 Datacenter 7601 Service Pack 1 Traceback (most recent call last): File "zzz_exploit.py", line 473, in exploit(target, pipe_name) File "zzz_exploit.py", line 296, in exploit fid = conn.nt_create_andx(tid, pipe_name) File "/root/Desktop/MS17-010-master/mysmb.py", line 155, in nt_create_andx self._last_fid = smb.SMB.nt_create_andx(self, tid, filename, smb_packet, cmd, shareAccessMode, disposition, accessMask) File "/usr/lib/python2.7/dist-packages/impacket/smb.py", line 3741, in nt_create_andx if smb.isValidAnswer(SMB.SMB_COM_NT_CREATE_ANDX): File "/usr/lib/python2.7/dist-packages/impacket/smb.py", line 712, in isValidAnswer raise SessionError, ("SMB Library Error", self['ErrorClass'] + (self['_reserved'] << 8), self['ErrorCode'], self['Flags2'] & SMB.FLAGS2_NT_STATUS) impacket.smb.SessionError: SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)

Help me, please ?

benichmt1 commented 7 years ago

You need a named pipe, not a port in that last arg (eg, netlogon)

kalifan commented 7 years ago

@benichmt1 hi, thanks for answering, so the named pipe ¿is it a process? ¿is it not a shared folder?

i found this https://technet.microsoft.com/en-us/library/jj852278(v=ws.11).aspx

Roan89 commented 7 years ago

Hi, I am working on Windows7 with python2.7. I had given an available named pipe, but the same isuue (impacket.smb.SessionError: SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)) persists. Why is it so? Should I create a new named pipe?

ParsingTeam commented 6 years ago

any way to bruteforce for pip name base .net?