Metasploit Module NoMethodError undefined method 'get_once' for nil:NilClass

1.6k Views Asked by At

I am running a number of Metasploit modules for exploiting Siemens S7-300/400 and S7-1200 PLCs that were created from a Blackhat talk by Dillion Beresford in 2011.

The modules are not supplied with Metasploit but have been added to the auxiliary/admin/scada/ directory. This is a link to the Modules https://github.com/moki-ics/s7-metasploit-modules

The modules are showing up in Metasploit correctly and can be configured but when they are run there are a number of errors.

The module shown in the screen shot is simatic_s7_1200_command.rb

Errors are:

thread_manager.rb:100:in 'block in spawn'

rb:111:in 'block (2 levels) in run'

NoMethodError undefined method 'get_once' for nil:NilClass

I suspect the issue I am having is due to the version of Ruby being used with Metasploit is not compatible with the modules.

I have run the modules in Metasploit running on Mac OSx, Metasploit on Kali running on a VM and Metasploit running on Kali on Raspberry Pi, all with same results.

The versions of Metasploit I tested this on:

Kali Raspberrypi Metasploit Framework: 5.0.0-dev-0e3b8a2253 Console : 5.0.0-dev-0e3b8a2253

Mac OSx Metasploit Framework: 4.17.3-dev-771462f765226974b2298e0fafd804f4523f75d7 Console : 4.17.3-dev-771462f765226974b2298e0fafd804f4523f75d7

Kali VM Metasploit Framework: 4.16.17-dev Console : 4.16.17-dev

Greatly appreciate any help any1 can give me on this 1!

1

There are 1 best solutions below

0
On

I had the same problem and got it working by using a newer version of the exploit: https://www.exploit-db.com/exploits/38964