NoMethodError in auxiliary/scanner/smb/smb_ms17_010
Steps to reproduce
How'd you do it?
- Run the following command: msfconsole -q -n -x "use auxiliary/scanner/smb/smb_ms17_010; set RHOSTS 10.0.0.38 ; run; exit"
- Get output [-] 10.0.0.38:445 - NoMethodError: undefined method `[]' for nil:NilClass
This section should also tell us any relevant information about the environment; for example, if an exploit that used to work is failing, tell us the victim operating system and service versions.
└─$ sudo nmap -sS -sV -p139,445 10.0.0.38
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-10-01 12:18 CEST
Nmap scan report for WINSRV38.customer.global (10.0.0.38)
Host is up (0.00085s latency).
PORT STATE SERVICE VERSION
139/tcp filtered netbios-ssn
445/tcp open microsoft-ds Microsoft Windows Server 2008 R2 - 2012 microsoft-ds
Service Info: OS: Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.49 seconds
Were you following a specific guide/tutorial or reading documentation?
If yes link the guide/tutorial or documentation you were following here, otherwise you may omit this section.
Expected behavior
Scan shoud run without errors.
Current behavior
Error on specific host on specific Configuration
Metasploit version
Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).
Framework Version: 6.3.55-dev
Additional Information
If your version is less than 5.0.96, please update to the latest version and ensure your issue is still present.
If the issue is encountered within msfconsole, please run the debug command using the instructions below. If the issue is encountered outisde msfconsole, or the issue causes msfconsole to crash on startup, please delete this section.
- Start
msfconsole - Run the command
set loglevel 3 - Take the steps necessary recreate your issue
- Run the
debugcommand ===8<=== CUT AND PASTE EVERYTHING BELOW THIS LINE ===8<===
Module/Datastore
The following global/module datastore, and database setup was configured before the issue occurred:
Collapse
[framework/core]
loglevel=3
RHOSTS=10.0.0.38
[framework/ui/console]
ActiveModule=auxiliary/scanner/smb/smb_ms17_010
[scanner/smb/smb_ms17_010]
WORKSPACE=
VERBOSE=false
RHOSTS=10.0.0.38
RPORT=445
SSL=false
SSLServerNameIndication=
SSLVersion=Auto
SSLVerifyMode=PEER
SSLCipher=
Proxies=
CPORT=
CHOST=
ConnectTimeout=10
TCP::max_send_size=0
TCP::send_delay=0
DCERPC::max_frag_size=4096
DCERPC::fake_bind_multi=true
DCERPC::fake_bind_multi_prepend=0
DCERPC::fake_bind_multi_append=0
DCERPC::smb_pipeio=rw
DCERPC::ReadTimeout=10
NTLM::UseNTLMv2=true
NTLM::UseNTLM2_session=true
NTLM::SendLM=true
NTLM::UseLMKey=false
NTLM::SendNTLM=true
NTLM::SendSPN=true
SMB::pipe_evasion=false
SMB::pipe_write_min_size=1
SMB::pipe_write_max_size=1024
SMB::pipe_read_min_size=1
SMB::pipe_read_max_size=1024
SMB::pad_data_level=0
SMB::pad_file_level=0
SMB::obscure_trans_pipe_level=0
SMBDirect=true
SMBUser=
SMBPass=
SMBDomain=.
SMBName=*SMBSERVER
SMB::VerifySignature=false
SMB::ChunkSize=500
SMB::Native_OS=Windows 2000 2195
SMB::Native_LM=Windows 2000 5.0
SMB::ProtocolVersion=1,2,3
SMB::AlwaysEncrypt=true
KrbCacheMode=read-write
SMB::Auth=auto
SMB::Rhostname=
DomainControllerRhost=
SMB::Krb5Ccname=
SMB::KrbOfferedEncryptionTypes=AES256,AES128,RC4-HMAC,DES-CBC-MD5,DES3-CBC-SHA1
NAMED_PIPES=/usr/share/metasploit-framework/data/wordlists/named_pipes.txt
THREADS=1
ShowProgress=true
ShowProgressPercent=10
CHECK_DOPU=true
CHECK_ARCH=true
CHECK_PIPE=false
Database Configuration
The database contains the following information:
Collapse
Session Type: postgresql selected, no connection
History
The following commands were ran during the session and before this issue occurred:
Collapse
0 set loglevel 3
1 setg RHOSTS 10.0.0.38
2 use auxiliary/scanner/smb/smb_ms17_010
3 run
4 debug
Framework Errors
The following framework errors occurred before the issue occurred:
Collapse
[10/01/2024 12:21:57] [e(0)] core: Failed to connect to the database: No database YAML file
Web Service Errors
The following web service errors occurred before the issue occurred:
Collapse
msf-ws.log does not exist.
Framework Logs
The following framework logs were recorded before the issue occurred:
Collapse
[10/01/2024 12:21:57] [e(0)] core: Failed to connect to the database: No database YAML file
[10/01/2024 12:23:24] [i(2)] core: Reloading auxiliary module scanner/smb/smb_ms17_010. Ambiguous module warnings are safe to ignore
[10/01/2024 12:23:26] [d(0)] core: SMB version(s) to negotiate: [1]
[10/01/2024 12:23:26] [d(0)] core: Negotiated SMB version: SMB1
Web Service Logs
The following web service logs were recorded before the issue occurred:
Collapse
msf-ws.log does not exist.
Version/Install
The versions and install method of your Metasploit setup:
Collapse
Framework: 6.3.55-dev
Ruby: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]
OpenSSL: OpenSSL 3.1.4 24 Oct 2023
Install Root: /usr/share/metasploit-framework
Session Type: postgresql selected, no connection
Install Method: Other - Please specify