Skip to content

Commit 04c4701

Browse files
committed
Added functionality and edit .attack file to reflect
1 parent 0c62cb9 commit 04c4701

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

gauntlt/attack_adapters/metasploit.rb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,20 @@
33
end
44

55
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
620
run_with_profile command
7-
end
21+
end
22+

gauntlt/attacks/metasploit-ms-08_067-check.attack

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Feature: Test if RHOST is vulnerable to ms08_067 exploit
1010
Scenario: Check if RHOST is vulnerable
1111

1212

13-
When I launch a "metasploit" attack with:
13+
When I launch a "metasploit" vulnerability check with:
1414
"""
15-
msfconsole -x "use exploit/windows/smb/ms08_067_netapi; set RHOST <RHOST>; check; exit"
15+
msfconsole -x "use exploit/windows/smb/ms08_067_netapi; set RHOST <RHOST>; check;"
1616
"""
1717

1818
Then it should pass with:

0 commit comments

Comments
 (0)