Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smb-enum-services script broken? #1946

Open
Stefan-mcp opened this issue Mar 4, 2020 · 2 comments
Open

smb-enum-services script broken? #1946

Stefan-mcp opened this issue Mar 4, 2020 · 2 comments

Comments

@Stefan-mcp
Copy link

@Stefan-mcp Stefan-mcp commented Mar 4, 2020

fired against a windows 2k8 (metasploitable 3) this is generating the below error

_NSE: Starting smb-enum-services against 10.0.2.6:139.
NSE: Starting smb-enum-services against 10.0.2.6:445.
NSE: [smb-enum-services 10.0.2.6:139] SMB: Added account '' to account list
NSE: [smb-enum-services 10.0.2.6:139] SMB: Added account 'guest' to account list
NSE: [smb-enum-services 10.0.2.6:139] SMB: Extended login to 10.0.2.6 as VAGRANT-2008R2\guest failed (NT_STATUS_ACCOUNT_DISABLED)
NSE: smb-enum-services against 10.0.2.6:139 threw an error!
/usr/local/bin/../share/nmap/nselib/smb.lua:1971: bad argument #5 to 'pack' (number expected, got nil)
stack traceback:
[C]: in function 'string.pack'
/usr/local/bin/../share/nmap/nselib/smb.lua:1971: in function 'smb.write_file'
/usr/local/bin/../share/nmap/nselib/msrpc.lua:270: in function 'msrpc.bind'
/usr/local/bin/../share/nmap/scripts/smb-enum-services.nse:865: in function </usr/local/bin/../share/nmap/scripts/smb-enum-services.nse:857>
(...tail calls...)

NSE: smb-enum-services against 10.0.2.6:445 threw an error!
/usr/local/bin/../share/nmap/nselib/smb.lua:1971: bad argument #5 to 'pack' (number expected, got nil)
stack traceback:
[C]: in function 'string.pack'
/usr/local/bin/../share/nmap/nselib/smb.lua:1971: in function 'smb.write_file'
/usr/local/bin/../share/nmap/nselib/msrpc.lua:270: in function 'msrpc.bind'
/usr/local/bin/../share/nmap/scripts/smb-enum-services.nse:865: in function </usr/local/bin/../share/nmap/scripts/smb-enum-services.nse:857>
(...tail calls...)_

fired against a linux (metasploitable2) is runs for about 7mins, looking in debug like its perhaps stuck in a loop, than ulitmately returns an error in the result as below

139/tcp open netbios-ssn syn-ack ttl 64
| smb-enum-services:
|
ERROR: SMB: ERROR: Server returned less data than needed for header
445/tcp open microsoft-ds syn-ack ttl 64
| smb-enum-services:
|_ ERROR: SMB: ERROR: Server returned less data than needed for header
MAC Address: 08:00:27:A9:C5:6B (Oracle VirtualBox virtual NIC)_

@cldrn

This comment has been minimized.

Copy link
Member

@cldrn cldrn commented Mar 5, 2020

I believe this and all the recent weird pack/unpack errors are caused by some other issue that is making nsock not return the complete packet.

Can you try using older versions to check if the problem is gone?

@Stefan-mcp

This comment has been minimized.

Copy link
Author

@Stefan-mcp Stefan-mcp commented Mar 6, 2020

I tried in 7.8 kali repo version, 7.8svn and 7.4 from the nmap site and found the same outcome. Not sure if that's crossing any nsock versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.