File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed
Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ When /^"metasploit" is installed$/ do
2+ ensure_cli_installed ( "msfconsole" )
3+ end
4+
5+ When /^I launch (?:a|an) "metasploit" attack with:$/ do |command |
6+ if command . include? "exit"
7+ run_with_profile command
8+ else
9+ run_with_profile command + " exit;"
10+ end
11+ end
12+
13+ When /^I launch (?:a|an) "metasploit" vulnerability check with:$/ do |command |
14+ if !( command . include? "check" )
15+ command += "check;"
16+ end
17+ if !( command . include? "exit" )
18+ command += "exit;"
19+ end
20+ run_with_profile command
21+ end
22+
Original file line number Diff line number Diff line change 1+ @slow
2+
3+ Feature: Test a UDP sweep
4+ Background:
5+ Given "metasploit" is installed
6+ And the following profile:
7+ | name | value |
8+ | RHOSTS | localhost |
9+
10+ Scenario: Attempt a UDP sweep with msfconsole
11+
12+
13+ When I launch a "metasploit" attack with:
14+ """
15+ msfconsole -x "use auxiliary/scanner/discovery/udp_sweep;set RHOSTS <RHOSTS>; exploit; exit"
16+
17+ """
18+
19+ Then it should pass with:
20+ """
21+ Auxiliary module execution completed
22+ """
Original file line number Diff line number Diff line change 1+ @slow
2+
3+ Feature: Test if RHOST is vulnerable to ms08_067 exploit
4+ Background:
5+ Given "metasploit" is installed
6+ And the following profile:
7+ | name | value |
8+ | RHOST | 192.168.1.218 |
9+
10+ Scenario: Check if RHOST is vulnerable
11+
12+
13+ When I launch a "metasploit" vulnerability check with:
14+ """
15+ msfconsole -x "use exploit/windows/smb/ms08_067_netapi; set RHOST <RHOST>; check;"
16+ """
17+
18+ Then it should pass with:
19+ """
20+ The target is not exploitable.
21+ """
You can’t perform that action at this time.
0 commit comments