Skip to content

Commit cde7bf4

Browse files
committed
Added nmap brute force attack
1 parent a2511c2 commit cde7bf4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@slow
2+
3+
Feature: Will brute force <hostname> on <tcp_ping_ports> using nmap.lst
4+
Background:
5+
Given "nmap" is installed
6+
And the following profile:
7+
| name | value |
8+
| hostname | httpbin.org |
9+
| path | /basic-auth/user/passwd |
10+
| tcp_ping_ports | 80 |
11+
| nscript | http-brute |
12+
13+
Scenario: Verify server is open on expected set of ports using the nmap fast flag
14+
When I launch an "nmap" attack with:
15+
"""
16+
nmap -F <hostname>
17+
"""
18+
Then the output should match:
19+
"""
20+
80/tcp\s+open
21+
"""
22+
23+
Scenario: Output to XML
24+
When I launch an "nmap" attack with:
25+
"""
26+
nmap --script http-brute -p 80 <hostname> -d --script-args http-brute.path=<path>,unpwdb.timelimit=20s -oX foo.xml
27+
"""
28+
29+
Then the file "foo.xml" should contain:
30+
"""
31+
<elem key="Statistics">Performed
32+
"""
33+
34+
Then the file "foo.xml" should contain XML:
35+
| css |
36+
| ports port[protocol="tcp"][portid="80"] state[state="open"] |

0 commit comments

Comments
 (0)