ShawnDEvans / smbmap

SMBMap is a handy SMB enumeration tool
GNU General Public License v3.0
1.79k stars 347 forks source link

Command execution error #49

Open LeapTruTime opened 4 years ago

LeapTruTime commented 4 years ago

Hi, I hope you could help me on the issue I am encountering.

I'm trying to do a command execution but I encountered an issue: [!] Error: (<class 'impacket.dcerpc.v5.rpcrt.DCERPCException'>, 'smbmap.py', 1314)

When I do these two commands below, no issues we encountered. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -r 'C$\Users'

the command I'm trying was just simple first as I'm trying to troubleshoot the issue. Just a simple adding of user. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -x 'net user tryer test123 /add'

ShawnDEvans commented 4 years ago

I'll look into it! Thanks a bunch for the feedback!

On Fri, Apr 17, 2020, 8:25 AM LeapTruTime notifications@github.com wrote:

Hi, I hope you could help me on the issue I am encountering.

I'm trying to do a command execution but I encountered an issue: [!] Error: (<class 'impacket.dcerpc.v5.rpcrt.DCERPCException'>, 'smbmap.py', 1314)

When I do these two commands below, no issues we encountered. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -r 'C$\Users'

the command I'm trying was just simple first as I'm trying to troubleshoot the issue. Just a simple adding of user. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -x 'net user tryer test123 /add'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShawnDEvans/smbmap/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6SKWFGLMXHTS3GSM4TIRTRNBDB7ANCNFSM4MKWQHZA .

ShawnDEvans commented 4 years ago

Can you execute other commands? Like 'ipconfig' or 'whoami'? Anything simple

On Fri, Apr 17, 2020, 8:25 AM LeapTruTime notifications@github.com wrote:

Hi, I hope you could help me on the issue I am encountering.

I'm trying to do a command execution but I encountered an issue: [!] Error: (<class 'impacket.dcerpc.v5.rpcrt.DCERPCException'>, 'smbmap.py', 1314)

When I do these two commands below, no issues we encountered. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -r 'C$\Users'

the command I'm trying was just simple first as I'm trying to troubleshoot the issue. Just a simple adding of user. ./smbmap.py -H 127.0.0.1 -u 'Administrator' -p 'P@ssw0rd08' -x 'net user tryer test123 /add'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShawnDEvans/smbmap/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6SKWFGLMXHTS3GSM4TIRTRNBDB7ANCNFSM4MKWQHZA .

LeapTruTime commented 4 years ago

Hi, apologies for the late reply.

Yes, ipconfig was one of the first thing I tried.

Will still try to troubleshoot this if maybe it's on my side. Thanks :)

ShawnDEvans commented 4 years ago

Ah cool ok. I'm slammed writing reports at the moment, but I'll try to ticket with this over the weekend.

On Fri, Apr 17, 2020, 11:29 AM LeapTruTime notifications@github.com wrote:

Hi, apologies for the late reply.

Yes, ipconfig was one of the first thing I tried.

Will still try to troubleshoot this if maybe it's on my side. Thanks :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ShawnDEvans/smbmap/issues/49#issuecomment-615310498, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6SKWEIUEJAUIWQWCGHBUDRNBYXJANCNFSM4MKWQHZA .

LeapTruTime commented 4 years ago

Just an update. I tried it on other machine and it works as intended.

Additional info: Machine 1 = I used chisel to access the port 445. nmap shows the port is now open and was able to get a shell via psexec. Machine 2 = with 445 open. smbmap works perfectly.

ShawnDEvans commented 4 years ago

I'm not quite sure what is going on here. I'm unable to reproduce the result with the limited number of VMs I have at my disposal. What is the OS of the system you're having issues with? Does SMBMap always return the same error for all commands against the problematic host? Have you tried WMI and PSExec command execution? Let me know!