@@ -100,3 +100,207 @@ cucumber /app/gauntlt/simple-env-var.attack:16 # Scenario: Verify server is avai
1001006 scenarios (1 failed, 5 passed)
10110127 steps (1 failed, 2 skipped, 24 passed)
1021020m14.558s
103+ Feature: OS detection
104+
105+ Background: # /app/gauntlt/os_detection.attack:3
106+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
107+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
108+ | name | value |
109+ | hostname | scanme.nmap.org |
110+
111+ @slow
112+ Scenario: Detect OS # /app/gauntlt/os_detection.attack:10
113+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
114+ """
115+ nmap -sV -p80 -PN <hostname>
116+ """
117+ Then the output should contain: # aruba-0.7.4/lib/aruba/cucumber.rb:182
118+ """
119+ Apache
120+ """
121+
122+ @slow
123+ Feature: nmap attacks for scanme.nmap.org and to use this for your tests, change the value in the profile
124+
125+ Background: # /app/gauntlt/nmap.attack:4
126+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
127+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
128+ | name | value |
129+ | hostname | scanme.nmap.org |
130+ | host | scanme.nmap.org |
131+ | tcp_ping_ports | 22,25,80,443 |
132+
133+ Scenario: Verify server is open on expected set of ports using the nmap-fast attack step # /app/gauntlt/nmap.attack:12
134+ Checking nmap-fast and nmap-fastRunning a nmap-fast attack. This attack has this description:
135+ This is a fast nmap scan that should run in 10 seconds or less on most networks. It looks for the most common ports and services.
136+ When I launch a "nmap-fast" attack # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:12
137+ Then the output should match /80.tcp\s+open/ # aruba-0.7.4/lib/aruba/cucumber.rb:206
138+
139+ Scenario: Verify server is open on expected set of ports using the nmap fast flag # /app/gauntlt/nmap.attack:16
140+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
141+ """
142+ nmap -F <hostname>
143+ """
144+ Then the output should match: # aruba-0.7.4/lib/aruba/cucumber.rb:210
145+ """
146+ 80/tcp\s+open
147+ """
148+
149+ Scenario: Verify that there are no unexpected ports open # /app/gauntlt/nmap.attack:26
150+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
151+ """
152+ nmap -F <hostname>
153+ """
154+ Then the output should not contain: # aruba-0.7.4/lib/aruba/cucumber.rb:186
155+ """
156+ 22/tcp
157+ 25/tcp
158+ """
159+
160+ Scenario: Output to XML # /app/gauntlt/nmap.attack:37
161+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
162+ """
163+ nmap -p 80,443 -oX foo.xml <hostname>
164+ """
165+ And the file "foo.xml" should contain XML: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:15
166+ | css |
167+ | ports port[protocol="tcp"][portid="80"] state[state="open"] |
168+ And the file "foo.xml" should not contain XML: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:21
169+ | css |
170+ | ports port[protocol="tcp"][portid="123"] state[state="open"] |
171+ | ports port[protocol="tcp"][portid="443"] state[state="open"] |
172+
173+ @slow
174+ Feature: simple nmap attack (sanity check)
175+
176+ Background: # /app/gauntlt/simple-env-var.attack:4
177+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
178+ And the following environment variables: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:3
179+ | name | environment_variable_name |
180+ | hostname | TEST_HOSTNAME |
181+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
182+ | name | value |
183+ | https_port | 443 |
184+ | http_port | 80 |
185+
186+ Scenario: Verify server is available on standard web ports # /app/gauntlt/simple-env-var.attack:16
187+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
188+ """
189+ nmap -p <http_port>,<https_port> <hostname>
190+ """
191+ no implicit conversion of nil into String (TypeError)
192+ /app/gauntlt/simple-env-var.attack:17:in `When I launch an "nmap" attack with:'
193+ Then the output should match /80.tcp\s+open/ # aruba-0.7.4/lib/aruba/cucumber.rb:206
194+ And the output should not match: # aruba-0.7.4/lib/aruba/cucumber.rb:219
195+ """
196+ 443/tcp\s+open
197+ """
198+
199+ Failing Scenarios:
200+ cucumber /app/gauntlt/simple-env-var.attack:16 # Scenario: Verify server is available on standard web ports
201+
202+ 6 scenarios (1 failed, 5 passed)
203+ 27 steps (1 failed, 2 skipped, 24 passed)
204+ 0m17.076s
205+ Feature: OS detection
206+
207+ Background: # /app/gauntlt/os_detection.attack:3
208+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
209+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
210+ | name | value |
211+ | hostname | scanme.nmap.org |
212+
213+ @slow
214+ Scenario: Detect OS # /app/gauntlt/os_detection.attack:10
215+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
216+ """
217+ nmap -sV -p80 -PN <hostname>
218+ """
219+ Then the output should contain: # aruba-0.7.4/lib/aruba/cucumber.rb:182
220+ """
221+ Apache
222+ """
223+
224+ @slow
225+ Feature: nmap attacks for scanme.nmap.org and to use this for your tests, change the value in the profile
226+
227+ Background: # /app/gauntlt/nmap.attack:4
228+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
229+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
230+ | name | value |
231+ | hostname | scanme.nmap.org |
232+ | host | scanme.nmap.org |
233+ | tcp_ping_ports | 22,25,80,443 |
234+
235+ Scenario: Verify server is open on expected set of ports using the nmap-fast attack step # /app/gauntlt/nmap.attack:12
236+ Checking nmap-fast and nmap-fastRunning a nmap-fast attack. This attack has this description:
237+ This is a fast nmap scan that should run in 10 seconds or less on most networks. It looks for the most common ports and services.
238+ When I launch a "nmap-fast" attack # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:12
239+ Then the output should match /80.tcp\s+open/ # aruba-0.7.4/lib/aruba/cucumber.rb:206
240+
241+ Scenario: Verify server is open on expected set of ports using the nmap fast flag # /app/gauntlt/nmap.attack:16
242+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
243+ """
244+ nmap -F <hostname>
245+ """
246+ Then the output should match: # aruba-0.7.4/lib/aruba/cucumber.rb:210
247+ """
248+ 80/tcp\s+open
249+ """
250+
251+ Scenario: Verify that there are no unexpected ports open # /app/gauntlt/nmap.attack:26
252+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
253+ """
254+ nmap -F <hostname>
255+ """
256+ Then the output should not contain: # aruba-0.7.4/lib/aruba/cucumber.rb:186
257+ """
258+ 22/tcp
259+ 25/tcp
260+ """
261+
262+ Scenario: Output to XML # /app/gauntlt/nmap.attack:37
263+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
264+ """
265+ nmap -p 80,443 -oX foo.xml <hostname>
266+ """
267+ And the file "foo.xml" should contain XML: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:15
268+ | css |
269+ | ports port[protocol="tcp"][portid="80"] state[state="open"] |
270+ And the file "foo.xml" should not contain XML: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:21
271+ | css |
272+ | ports port[protocol="tcp"][portid="123"] state[state="open"] |
273+ | ports port[protocol="tcp"][portid="443"] state[state="open"] |
274+
275+ @slow
276+ Feature: simple nmap attack (sanity check)
277+
278+ Background: # /app/gauntlt/simple-env-var.attack:4
279+ Given "nmap" is installed # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:4
280+ And the following environment variables: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:3
281+ | name | environment_variable_name |
282+ | hostname | TEST_HOSTNAME |
283+ And the following profile: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/gauntlt.rb:9
284+ | name | value |
285+ | https_port | 443 |
286+ | http_port | 80 |
287+
288+ Scenario: Verify server is available on standard web ports # /app/gauntlt/simple-env-var.attack:16
289+ When I launch an "nmap" attack with: # gauntlt-1.0.13/lib/gauntlt/attack_adapters/nmap.rb:8
290+ """
291+ nmap -p <http_port>,<https_port> <hostname>
292+ """
293+ no implicit conversion of nil into String (TypeError)
294+ /app/gauntlt/simple-env-var.attack:17:in `When I launch an "nmap" attack with:'
295+ Then the output should match /80.tcp\s+open/ # aruba-0.7.4/lib/aruba/cucumber.rb:206
296+ And the output should not match: # aruba-0.7.4/lib/aruba/cucumber.rb:219
297+ """
298+ 443/tcp\s+open
299+ """
300+
301+ Failing Scenarios:
302+ cucumber /app/gauntlt/simple-env-var.attack:16 # Scenario: Verify server is available on standard web ports
303+
304+ 6 scenarios (1 failed, 5 passed)
305+ 27 steps (1 failed, 2 skipped, 24 passed)
306+ 0m14.169s
0 commit comments