ronin-vulns 0.1.5 → 0.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/ChangeLog.md +43 -0
- data/Gemfile +14 -4
- data/README.md +7 -3
- data/Rakefile +9 -0
- data/data/completions/ronin-vulns +139 -0
- data/gemspec.yml +7 -1
- data/lib/ronin/vulns/cli/command.rb +1 -1
- data/lib/ronin/vulns/cli/commands/command_injection.rb +163 -0
- data/lib/ronin/vulns/cli/commands/completion.rb +63 -0
- data/lib/ronin/vulns/cli/commands/irb.rb +59 -0
- data/lib/ronin/vulns/cli/commands/lfi.rb +21 -9
- data/lib/ronin/vulns/cli/commands/open_redirect.rb +13 -1
- data/lib/ronin/vulns/cli/commands/reflected_xss.rb +13 -1
- data/lib/ronin/vulns/cli/commands/rfi.rb +13 -1
- data/lib/ronin/vulns/cli/commands/scan.rb +21 -9
- data/lib/ronin/vulns/cli/commands/sqli.rb +13 -1
- data/lib/ronin/vulns/cli/commands/ssti.rb +13 -1
- data/lib/ronin/vulns/cli/importable.rb +76 -0
- data/lib/ronin/vulns/cli/printing.rb +184 -0
- data/lib/ronin/vulns/cli/ruby_shell.rb +53 -0
- data/lib/ronin/vulns/cli/web_vuln_command.rb +216 -20
- data/lib/ronin/vulns/cli.rb +3 -2
- data/lib/ronin/vulns/command_injection.rb +267 -0
- data/lib/ronin/vulns/importer.rb +116 -0
- data/lib/ronin/vulns/lfi/test_file.rb +1 -1
- data/lib/ronin/vulns/lfi.rb +1 -1
- data/lib/ronin/vulns/open_redirect.rb +1 -1
- data/lib/ronin/vulns/reflected_xss/context.rb +1 -1
- data/lib/ronin/vulns/reflected_xss/test_string.rb +1 -1
- data/lib/ronin/vulns/reflected_xss.rb +1 -1
- data/lib/ronin/vulns/rfi.rb +64 -9
- data/lib/ronin/vulns/root.rb +1 -1
- data/lib/ronin/vulns/sqli/error_pattern.rb +1 -1
- data/lib/ronin/vulns/sqli.rb +36 -28
- data/lib/ronin/vulns/ssti/test_expression.rb +1 -1
- data/lib/ronin/vulns/ssti.rb +69 -53
- data/lib/ronin/vulns/url_scanner.rb +10 -1
- data/lib/ronin/vulns/version.rb +2 -2
- data/lib/ronin/vulns/vuln.rb +1 -1
- data/lib/ronin/vulns/web_vuln/http_request.rb +40 -1
- data/lib/ronin/vulns/web_vuln.rb +86 -16
- data/man/ronin-vulns-command-injection.1 +109 -0
- data/man/ronin-vulns-command-injection.1.md +112 -0
- data/man/ronin-vulns-completion.1 +76 -0
- data/man/ronin-vulns-completion.1.md +78 -0
- data/man/ronin-vulns-irb.1 +27 -0
- data/man/ronin-vulns-irb.1.md +26 -0
- data/man/ronin-vulns-lfi.1 +54 -51
- data/man/ronin-vulns-lfi.1.md +52 -20
- data/man/ronin-vulns-open-redirect.1 +51 -47
- data/man/ronin-vulns-open-redirect.1.md +50 -18
- data/man/ronin-vulns-reflected-xss.1 +50 -45
- data/man/ronin-vulns-reflected-xss.1.md +49 -17
- data/man/ronin-vulns-rfi.1 +54 -52
- data/man/ronin-vulns-rfi.1.md +52 -20
- data/man/ronin-vulns-scan.1 +68 -69
- data/man/ronin-vulns-scan.1.md +61 -29
- data/man/ronin-vulns-sqli.1 +54 -52
- data/man/ronin-vulns-sqli.1.md +52 -20
- data/man/ronin-vulns-ssti.1 +52 -48
- data/man/ronin-vulns-ssti.1.md +50 -18
- data/man/ronin-vulns.1 +73 -0
- data/man/ronin-vulns.1.md +69 -0
- data/scripts/setup +58 -0
- metadata +36 -5
- data/lib/ronin/vulns/cli/logging.rb +0 -81
data/man/ronin-vulns-ssti.1
CHANGED
@@ -1,99 +1,103 @@
|
|
1
|
-
.\" Generated by kramdown-man 0.1
|
1
|
+
.\" Generated by kramdown-man 1.0.1
|
2
2
|
.\" https://github.com/postmodern/kramdown-man#readme
|
3
3
|
.TH ronin-vulns-lfi 1 "May 2022" Ronin "User Manuals"
|
4
|
-
.
|
4
|
+
.SH NAME
|
5
|
+
.PP
|
6
|
+
ronin\-vulns\-ssti \- Scans URL(s) for Server Side Template Injection (SSTI) vulnerabilities
|
5
7
|
.SH SYNOPSIS
|
6
|
-
.LP
|
7
8
|
.PP
|
8
|
-
\fBronin
|
9
|
-
.LP
|
9
|
+
\fBronin\-vulns lfi\fR \[lB]\fIoptions\fP\[rB] \[lC]\fIURL\fP \.\.\. \[or] \fB\-\-input\fR \fIFILE\fP\[rC]
|
10
10
|
.SH DESCRIPTION
|
11
|
-
.LP
|
12
11
|
.PP
|
13
12
|
Scans URL(s) for Server Side Template Injection (SSTI) vulnerabilities\. The URLs
|
14
13
|
to scan can be given as additional arguments or read from a file using the
|
15
|
-
\fB
|
16
|
-
.LP
|
14
|
+
\fB\-\-input\fR option\.
|
17
15
|
.SH ARGUMENTS
|
18
|
-
.LP
|
19
16
|
.TP
|
20
17
|
\fIURL\fP
|
21
18
|
A URL to scan\.
|
22
|
-
.LP
|
23
19
|
.SH OPTIONS
|
24
|
-
.LP
|
25
20
|
.TP
|
26
|
-
\fB
|
21
|
+
\fB\-\-db\fR \fINAME\fP
|
22
|
+
The database name to connect to\. Defaults to \fBdefault\fR if not given\.
|
23
|
+
.TP
|
24
|
+
\fB\-\-db\-uri\fR \fIURI\fP
|
25
|
+
The database URI to connect to
|
26
|
+
(ex: \fBpostgres:\[sl]\[sl]user:password\[at]host\[sl]db\fR)\.
|
27
|
+
.TP
|
28
|
+
\fB\-\-db\-file\fR \fIPATH\fP
|
29
|
+
The sqlite3 database file to use\.
|
30
|
+
.TP
|
31
|
+
\fB\-\-import\fR
|
32
|
+
Imports discovered vulnerabilities into the database\.
|
33
|
+
.TP
|
34
|
+
\fB\-\-first\fR
|
27
35
|
Only find the first vulnerability for each URL\.
|
28
|
-
.LP
|
29
36
|
.TP
|
30
|
-
\fB
|
37
|
+
\fB\-A\fR, \fB\-\-all\fR
|
31
38
|
Find all vulnerabilities for each URL\.
|
32
|
-
.LP
|
33
39
|
.TP
|
34
|
-
\fB
|
40
|
+
\fB\-\-print\-curl\fR
|
41
|
+
Also prints an example \fBcurl\fR command for each vulnerability\.
|
42
|
+
.TP
|
43
|
+
\fB\-\-print\-http\fR
|
44
|
+
Also prints an example HTTP request for each vulnerability\.
|
45
|
+
.TP
|
46
|
+
\fB\-M\fR, \fB\-\-request\-method\fR \fBCOPY\fR\[or]\fBDELETE\fR\[or]\fBGET\fR\[or]\fBHEAD\fR\[or]\fBLOCK\fR\[or]\fBMKCOL\fR\[or]\fBMOVE\fR\[or]\fBOPTIONS\fR\[or]\fBPATCH\fR\[or]\fBPOST\fR\[or]\fBPROPFIND\fR\[or]\fBPROPPATCH\fR\[or]\fBPUT\fR\[or]\fBTRACE\fR\[or]\fBUNLOCK\fR
|
47
|
+
Sets the HTTP request method to use\.
|
48
|
+
.TP
|
49
|
+
\fB\-H\fR, \fB\-\-header\fR \[lq]\fIName\fP: \fIvalue\fP\[rq]
|
35
50
|
Sets an additional header using the given \fIName\fP and \fIvalue\fP\.
|
36
|
-
.LP
|
37
51
|
.TP
|
38
|
-
\fB
|
52
|
+
\fB\-U\fR, \fB\-\-user\-agent\-string\fR \fISTRING\fP
|
53
|
+
Sets the \fBUser\-Agent\fR header string\.
|
54
|
+
.TP
|
55
|
+
\fB\-u\fR, \fB\-\-user\-agent\fR \fBchrome\-linux\fR\[or]\fBchrome\-macos\fR\[or]\fBchrome\-windows\fR\[or]\fBchrome\-iphone\fR\[or]\fBchrome\-ipad\fR\[or]\fBchrome\-android\fR\[or]\fBfirefox\-linux\fR\[or]\fBfirefox\-macos\fR\[or]\fBfirefox\-windows\fR\[or]\fBfirefox\-iphone\fR\[or]\fBfirefox\-ipad\fR\[or]\fBfirefox\-android\fR\[or]\fBsafari\-macos\fR\[or]\fBsafari\-iphone\fR\[or]\fBsafari\-ipad\fR\[or]\fBedge\fR
|
56
|
+
Sets the \fBUser\-Agent\fR header\.
|
57
|
+
.TP
|
58
|
+
\fB\-C\fR, \fB\-\-cookie\fR \fICOOKIE\fP
|
39
59
|
Sets the raw \fBCookie\fR header\.
|
40
|
-
.LP
|
41
60
|
.TP
|
42
|
-
\fB
|
61
|
+
\fB\-c\fR, \fB\-\-cookie\-param\fR \fINAME\fP\fB\[eq]\fR\fIVALUE\fP
|
43
62
|
Sets an additional \fBCookie\fR param using the given \fINAME\fP and \fIVALUE\fP\.
|
44
|
-
.LP
|
45
63
|
.TP
|
46
|
-
\fB
|
64
|
+
\fB\-R\fR, \fB\-\-referer\fR \fIURL\fP
|
47
65
|
Sets the \fBReferer\fR header\.
|
48
|
-
.LP
|
49
66
|
.TP
|
50
|
-
\fB
|
67
|
+
\fB\-F\fR, \fB\-\-form\-param\fR \fINAME\fP\fB\[eq]\fR\fIVALUE\fP
|
51
68
|
Sets an additional form param using the given \fINAME\fP and \fIVALUE\fP\.
|
52
|
-
.LP
|
53
69
|
.TP
|
54
|
-
\fB
|
70
|
+
\fB\-\-test\-query\-param\fR \fINAME\fP
|
55
71
|
Tests the URL query param name\.
|
56
|
-
.LP
|
57
72
|
.TP
|
58
|
-
\fB
|
73
|
+
\fB\-\-test\-all\-query\-params\fR
|
59
74
|
Test all URL query param names\.
|
60
|
-
.LP
|
61
75
|
.TP
|
62
|
-
\fB
|
76
|
+
\fB\-\-test\-header\-name\fR \fINAME\fP
|
63
77
|
Tests the HTTP Header name\.
|
64
|
-
.LP
|
65
78
|
.TP
|
66
|
-
\fB
|
79
|
+
\fB\-\-test\-cookie\-param\fR \fINAME\fP
|
67
80
|
Tests the HTTP Cookie name\.
|
68
|
-
.LP
|
69
81
|
.TP
|
70
|
-
\fB
|
82
|
+
\fB\-\-test\-all\-cookie\-params\fR
|
71
83
|
Test all Cookie param names\.
|
72
|
-
.LP
|
73
84
|
.TP
|
74
|
-
\fB
|
85
|
+
\fB\-\-test\-form\-param\fR \fINAME\fP
|
75
86
|
Tests the form param name\.
|
76
|
-
.LP
|
77
87
|
.TP
|
78
|
-
\fB
|
88
|
+
\fB\-i\fR, \fB\-\-input\fR \fIFILE\fP
|
79
89
|
Reads URLs from the given \fIFILE\fP\.
|
80
|
-
.
|
81
|
-
|
82
|
-
\fB-T\fR, \fB--test-expr\fR \[lC]\fIX*Y\fP \[or] \fIX\[sl]Z\fP \[or] \fIX\[pl]Y\fP \[or] \fIX\-Y\fP\[rC]
|
90
|
+
.TP
|
91
|
+
\fB\-T\fR, \fB\-\-test\-expr\fR \[lC]\fIX*Y\fP \[or] \fIX\[sl]Z\fP \[or] \fIX\[pl]Y\fP \[or] \fIX\-Y\fP\[rC]
|
83
92
|
Optional numeric test to use\.
|
84
|
-
.LP
|
85
93
|
.TP
|
86
|
-
\fB
|
94
|
+
\fB\-h\fR, \fB\-\-help\fR
|
87
95
|
Print help information\.
|
88
|
-
.LP
|
89
96
|
.SH AUTHOR
|
90
|
-
.LP
|
91
97
|
.PP
|
92
98
|
Postmodern
|
93
99
|
.MT postmodern\.mod3\[at]gmail\.com
|
94
100
|
.ME
|
95
|
-
.LP
|
96
101
|
.SH SEE ALSO
|
97
|
-
.LP
|
98
102
|
.PP
|
99
|
-
ronin\-vulns\-scan(1)
|
103
|
+
.BR ronin\-vulns\-scan (1)
|
data/man/ronin-vulns-ssti.1.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# ronin-vulns-lfi 1 "May 2022" Ronin "User Manuals"
|
2
2
|
|
3
|
+
## NAME
|
4
|
+
|
5
|
+
ronin-vulns-ssti - Scans URL(s) for Server Side Template Injection (SSTI) vulnerabilities
|
6
|
+
|
3
7
|
## SYNOPSIS
|
4
8
|
|
5
9
|
`ronin-vulns lfi` [*options*] {*URL* ... \| `--input` *FILE*}
|
@@ -13,57 +17,85 @@ to scan can be given as additional arguments or read from a file using the
|
|
13
17
|
## ARGUMENTS
|
14
18
|
|
15
19
|
*URL*
|
16
|
-
|
20
|
+
: A URL to scan.
|
17
21
|
|
18
22
|
## OPTIONS
|
19
23
|
|
24
|
+
`--db` *NAME*
|
25
|
+
: The database name to connect to. Defaults to `default` if not given.
|
26
|
+
|
27
|
+
`--db-uri` *URI*
|
28
|
+
: The database URI to connect to
|
29
|
+
(ex: `postgres://user:password@host/db`).
|
30
|
+
|
31
|
+
`--db-file` *PATH*
|
32
|
+
: The sqlite3 database file to use.
|
33
|
+
|
34
|
+
`--import`
|
35
|
+
: Imports discovered vulnerabilities into the database.
|
36
|
+
|
20
37
|
`--first`
|
21
|
-
|
38
|
+
: Only find the first vulnerability for each URL.
|
22
39
|
|
23
40
|
`-A`, `--all`
|
24
|
-
|
41
|
+
: Find all vulnerabilities for each URL.
|
42
|
+
|
43
|
+
`--print-curl`
|
44
|
+
: Also prints an example `curl` command for each vulnerability.
|
45
|
+
|
46
|
+
`--print-http`
|
47
|
+
: Also prints an example HTTP request for each vulnerability.
|
48
|
+
|
49
|
+
`-M`, `--request-method` `COPY`|`DELETE`|`GET`|`HEAD`|`LOCK`|`MKCOL`|`MOVE`|`OPTIONS`|`PATCH`|`POST`|`PROPFIND`|`PROPPATCH`|`PUT`|`TRACE`|`UNLOCK`
|
50
|
+
: Sets the HTTP request method to use.
|
25
51
|
|
26
52
|
`-H`, `--header` "*Name*: *value*"
|
27
|
-
|
53
|
+
: Sets an additional header using the given *Name* and *value*.
|
54
|
+
|
55
|
+
`-U`, `--user-agent-string` *STRING*
|
56
|
+
: Sets the `User-Agent` header string.
|
57
|
+
|
58
|
+
`-u`, `--user-agent` `chrome-linux`\|`chrome-macos`\|`chrome-windows`\|`chrome-iphone`\|`chrome-ipad`\|`chrome-android`\|`firefox-linux`\|`firefox-macos`\|`firefox-windows`\|`firefox-iphone`\|`firefox-ipad`\|`firefox-android`\|`safari-macos`\|`safari-iphone`\|`safari-ipad`\|`edge`
|
59
|
+
: Sets the `User-Agent` header.
|
28
60
|
|
29
61
|
`-C`, `--cookie` *COOKIE*
|
30
|
-
|
62
|
+
: Sets the raw `Cookie` header.
|
31
63
|
|
32
64
|
`-c`, `--cookie-param` *NAME*`=`*VALUE*
|
33
|
-
|
65
|
+
: Sets an additional `Cookie` param using the given *NAME* and *VALUE*.
|
34
66
|
|
35
67
|
`-R`, `--referer` *URL*
|
36
|
-
|
68
|
+
: Sets the `Referer` header.
|
37
69
|
|
38
70
|
`-F`, `--form-param` *NAME*`=`*VALUE*
|
39
|
-
|
71
|
+
: Sets an additional form param using the given *NAME* and *VALUE*.
|
40
72
|
|
41
73
|
`--test-query-param` *NAME*
|
42
|
-
|
74
|
+
: Tests the URL query param name.
|
43
75
|
|
44
76
|
`--test-all-query-params`
|
45
|
-
|
77
|
+
: Test all URL query param names.
|
46
78
|
|
47
79
|
`--test-header-name` *NAME*
|
48
|
-
|
80
|
+
: Tests the HTTP Header name.
|
49
81
|
|
50
82
|
`--test-cookie-param` *NAME*
|
51
|
-
|
83
|
+
: Tests the HTTP Cookie name.
|
52
84
|
|
53
85
|
`--test-all-cookie-params`
|
54
|
-
|
86
|
+
: Test all Cookie param names.
|
55
87
|
|
56
88
|
`--test-form-param` *NAME*
|
57
|
-
|
89
|
+
: Tests the form param name.
|
58
90
|
|
59
91
|
`-i`, `--input` *FILE*
|
60
|
-
|
92
|
+
: Reads URLs from the given *FILE*.
|
61
93
|
|
62
94
|
`-T`, `--test-expr` {*X\*Y* \| *X/Z* \| *X+Y* \| *X-Y*}
|
63
|
-
|
95
|
+
: Optional numeric test to use.
|
64
96
|
|
65
97
|
`-h`, `--help`
|
66
|
-
|
98
|
+
: Print help information.
|
67
99
|
|
68
100
|
## AUTHOR
|
69
101
|
|
@@ -71,4 +103,4 @@ Postmodern <postmodern.mod3@gmail.com>
|
|
71
103
|
|
72
104
|
## SEE ALSO
|
73
105
|
|
74
|
-
ronin-vulns-scan(1)
|
106
|
+
[ronin-vulns-scan](ronin-vulns-scan.1.md)
|
data/man/ronin-vulns.1
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
.\" Generated by kramdown-man 1.0.1
|
2
|
+
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
+
.TH ronin-vulns 1 "2024-01-01" Ronin Vulns "User Manuals"
|
4
|
+
.SH NAME
|
5
|
+
.PP
|
6
|
+
ronin\-vulns \- A library and tool that tests for various web vulnerabilities\.
|
7
|
+
.SH SYNOPSIS
|
8
|
+
.PP
|
9
|
+
\fBronin\-vulns\fR \[lB]\fIoptions\fP\[rB] \[lB]\fICOMMAND\fP \[lB]\.\.\.\[rB]\[rB]
|
10
|
+
.SH DESCRIPTION
|
11
|
+
.PP
|
12
|
+
Runs a \fBronin\-vulns\fR \fICOMMAND\fP\.
|
13
|
+
.SH ARGUMENTS
|
14
|
+
.TP
|
15
|
+
\fICOMMAND\fP
|
16
|
+
The \fBronin\-vulns\fR command to execute\.
|
17
|
+
.SH OPTIONS
|
18
|
+
.TP
|
19
|
+
\fB\-V\fR, \fB\-\-version\fR
|
20
|
+
Prints the \fBronin\-vulns\fR version and exits\.
|
21
|
+
.TP
|
22
|
+
\fB\-h\fR, \fB\-\-help\fR
|
23
|
+
Print help information
|
24
|
+
.SH COMMANDS
|
25
|
+
.TP
|
26
|
+
\fIcommand\-injection\fP, \fIcmdi\fP
|
27
|
+
Scans URL(s) for Command Injection vulnerabilities\.
|
28
|
+
.TP
|
29
|
+
\fIcompletion\fP
|
30
|
+
Manages the shell completion rules for \fBronin\-vulns\fR\.
|
31
|
+
.TP
|
32
|
+
\fIhelp\fP
|
33
|
+
Lists available commands or shows help about a specific command\.
|
34
|
+
.TP
|
35
|
+
\fIirb\fP
|
36
|
+
Starts an interactive Ruby shell with ronin\-vulns loaded\.
|
37
|
+
.TP
|
38
|
+
\fIlfi\fP
|
39
|
+
Scans URL(s) for Local File Inclusion (LFI) vulnerabilities\.
|
40
|
+
.TP
|
41
|
+
\fIopen\-redirect\fP
|
42
|
+
Scans URL(s) for Open Redirect vulnerabilities\.
|
43
|
+
.TP
|
44
|
+
\fIreflected\-xss\fP, \fIxss\fP
|
45
|
+
Scans URL(s) for Reflected Cross Site Scripting (XSS) vulnerabilities\.
|
46
|
+
.TP
|
47
|
+
\fIrfi\fP
|
48
|
+
Scans URL(s) for Remote File Inclusion (RFI) vulnerabilities\.
|
49
|
+
.TP
|
50
|
+
\fIscan\fP
|
51
|
+
Scans URL(s) for web vulnerabilities\.
|
52
|
+
.TP
|
53
|
+
\fIsqli\fP
|
54
|
+
Scans URL(s) for SQL injection (SQLi) vulnerabilities\.
|
55
|
+
.TP
|
56
|
+
\fIssti\fP
|
57
|
+
Scans URL(s) for Server Side Template Injection (SSTI) vulnerabilities\.
|
58
|
+
.SH AUTHOR
|
59
|
+
.PP
|
60
|
+
Postmodern
|
61
|
+
.MT postmodern\.mod3\[at]gmail\.com
|
62
|
+
.ME
|
63
|
+
.SH SEE ALSO
|
64
|
+
.PP
|
65
|
+
.BR ronin\-vulns\-command\-injection (1)
|
66
|
+
.BR ronin\-vulns\-completion (1)
|
67
|
+
.BR ronin\-vulns\-lfi (1)
|
68
|
+
.BR ronin\-vulns\-open\-redirect (1)
|
69
|
+
.BR ronin\-vulns\-reflected\-xss (1)
|
70
|
+
.BR ronin\-vulns\-rfi (1)
|
71
|
+
.BR ronin\-vulns\-scan (1)
|
72
|
+
.BR ronin\-vulns\-sqli (1)
|
73
|
+
.BR ronin\-vulns\-ssti (1)
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# ronin-vulns 1 "2024-01-01" Ronin Vulns "User Manuals"
|
2
|
+
|
3
|
+
## NAME
|
4
|
+
|
5
|
+
ronin-vulns - A library and tool that tests for various web vulnerabilities.
|
6
|
+
|
7
|
+
## SYNOPSIS
|
8
|
+
|
9
|
+
`ronin-vulns` [*options*] [*COMMAND* [...]]
|
10
|
+
|
11
|
+
## DESCRIPTION
|
12
|
+
|
13
|
+
Runs a `ronin-vulns` *COMMAND*.
|
14
|
+
|
15
|
+
## ARGUMENTS
|
16
|
+
|
17
|
+
*COMMAND*
|
18
|
+
: The `ronin-vulns` command to execute.
|
19
|
+
|
20
|
+
## OPTIONS
|
21
|
+
|
22
|
+
`-V`, `--version`
|
23
|
+
: Prints the `ronin-vulns` version and exits.
|
24
|
+
|
25
|
+
`-h`, `--help`
|
26
|
+
: Print help information
|
27
|
+
|
28
|
+
## COMMANDS
|
29
|
+
|
30
|
+
*command-injection*, *cmdi*
|
31
|
+
: Scans URL(s) for Command Injection vulnerabilities.
|
32
|
+
|
33
|
+
*completion*
|
34
|
+
: Manages the shell completion rules for `ronin-vulns`.
|
35
|
+
|
36
|
+
*help*
|
37
|
+
: Lists available commands or shows help about a specific command.
|
38
|
+
|
39
|
+
*irb*
|
40
|
+
: Starts an interactive Ruby shell with ronin-vulns loaded.
|
41
|
+
|
42
|
+
*lfi*
|
43
|
+
: Scans URL(s) for Local File Inclusion (LFI) vulnerabilities.
|
44
|
+
|
45
|
+
*open-redirect*
|
46
|
+
: Scans URL(s) for Open Redirect vulnerabilities.
|
47
|
+
|
48
|
+
*reflected-xss*, *xss*
|
49
|
+
: Scans URL(s) for Reflected Cross Site Scripting (XSS) vulnerabilities.
|
50
|
+
|
51
|
+
*rfi*
|
52
|
+
: Scans URL(s) for Remote File Inclusion (RFI) vulnerabilities.
|
53
|
+
|
54
|
+
*scan*
|
55
|
+
: Scans URL(s) for web vulnerabilities.
|
56
|
+
|
57
|
+
*sqli*
|
58
|
+
: Scans URL(s) for SQL injection (SQLi) vulnerabilities.
|
59
|
+
|
60
|
+
*ssti*
|
61
|
+
: Scans URL(s) for Server Side Template Injection (SSTI) vulnerabilities.
|
62
|
+
|
63
|
+
## AUTHOR
|
64
|
+
|
65
|
+
Postmodern <postmodern.mod3@gmail.com>
|
66
|
+
|
67
|
+
## SEE ALSO
|
68
|
+
|
69
|
+
[ronin-vulns-command-injection](ronin-vulns-command-injection.1.md) [ronin-vulns-completion](ronin-vulns-completion.1.md) [ronin-vulns-lfi](ronin-vulns-lfi.1.md) [ronin-vulns-open-redirect](ronin-vulns-open-redirect.1.md) [ronin-vulns-reflected-xss](ronin-vulns-reflected-xss.1.md) [ronin-vulns-rfi](ronin-vulns-rfi.1.md) [ronin-vulns-scan](ronin-vulns-scan.1.md) [ronin-vulns-sqli](ronin-vulns-sqli.1.md) [ronin-vulns-ssti](ronin-vulns-ssti.1.md)
|
data/scripts/setup
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
#
|
4
|
+
# Prints a log message.
|
5
|
+
#
|
6
|
+
function log()
|
7
|
+
{
|
8
|
+
if [[ -t 1 ]]; then
|
9
|
+
echo -e "\x1b[1m\x1b[32m>>>\x1b[0m \x1b[1m$1\x1b[0m"
|
10
|
+
else
|
11
|
+
echo ">>> $1"
|
12
|
+
fi
|
13
|
+
}
|
14
|
+
|
15
|
+
#
|
16
|
+
# Prints a warn message.
|
17
|
+
#
|
18
|
+
function warn()
|
19
|
+
{
|
20
|
+
if [[ -t 1 ]]; then
|
21
|
+
echo -e "\x1b[1m\x1b[33m***\x1b[0m \x1b[1m$1\x1b[0m" >&2
|
22
|
+
else
|
23
|
+
echo "*** $1" >&2
|
24
|
+
fi
|
25
|
+
}
|
26
|
+
|
27
|
+
#
|
28
|
+
# Prints an error message.
|
29
|
+
#
|
30
|
+
function error()
|
31
|
+
{
|
32
|
+
if [[ -t 1 ]]; then
|
33
|
+
echo -e "\x1b[1m\x1b[31m!!!\x1b[0m \x1b[1m$1\x1b[0m" >&2
|
34
|
+
else
|
35
|
+
echo "!!! $1" >&2
|
36
|
+
fi
|
37
|
+
}
|
38
|
+
|
39
|
+
#
|
40
|
+
# Prints an error message and exists with -1.
|
41
|
+
#
|
42
|
+
function fail()
|
43
|
+
{
|
44
|
+
error "$@"
|
45
|
+
exit -1
|
46
|
+
}
|
47
|
+
|
48
|
+
# default to installing gems into vendor/bundle
|
49
|
+
if [[ ! -f .bundle/config ]]; then
|
50
|
+
bundle config set --local path vendor/bundle >/dev/null || \
|
51
|
+
fail "Failed to run 'bundle config'"
|
52
|
+
fi
|
53
|
+
|
54
|
+
log "Installing gems ..."
|
55
|
+
bundle install || fail "Failed to run 'bundle install'!"
|
56
|
+
|
57
|
+
log "Setting up the project ..."
|
58
|
+
bundle exec rake setup || "Failed to run 'rake setup'!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-vulns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ronin-support
|
@@ -36,14 +36,28 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 0.2.0.rc1
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 0.2.0.rc1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: ronin-db
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.2.0.rc1
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.2.0.rc1
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: bundler
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,6 +99,7 @@ files:
|
|
85
99
|
- README.md
|
86
100
|
- Rakefile
|
87
101
|
- bin/ronin-vulns
|
102
|
+
- data/completions/ronin-vulns
|
88
103
|
- data/rfi_test.asp
|
89
104
|
- data/rfi_test.aspx
|
90
105
|
- data/rfi_test.cfm
|
@@ -94,6 +109,9 @@ files:
|
|
94
109
|
- gemspec.yml
|
95
110
|
- lib/ronin/vulns/cli.rb
|
96
111
|
- lib/ronin/vulns/cli/command.rb
|
112
|
+
- lib/ronin/vulns/cli/commands/command_injection.rb
|
113
|
+
- lib/ronin/vulns/cli/commands/completion.rb
|
114
|
+
- lib/ronin/vulns/cli/commands/irb.rb
|
97
115
|
- lib/ronin/vulns/cli/commands/lfi.rb
|
98
116
|
- lib/ronin/vulns/cli/commands/open_redirect.rb
|
99
117
|
- lib/ronin/vulns/cli/commands/reflected_xss.rb
|
@@ -101,8 +119,12 @@ files:
|
|
101
119
|
- lib/ronin/vulns/cli/commands/scan.rb
|
102
120
|
- lib/ronin/vulns/cli/commands/sqli.rb
|
103
121
|
- lib/ronin/vulns/cli/commands/ssti.rb
|
104
|
-
- lib/ronin/vulns/cli/
|
122
|
+
- lib/ronin/vulns/cli/importable.rb
|
123
|
+
- lib/ronin/vulns/cli/printing.rb
|
124
|
+
- lib/ronin/vulns/cli/ruby_shell.rb
|
105
125
|
- lib/ronin/vulns/cli/web_vuln_command.rb
|
126
|
+
- lib/ronin/vulns/command_injection.rb
|
127
|
+
- lib/ronin/vulns/importer.rb
|
106
128
|
- lib/ronin/vulns/lfi.rb
|
107
129
|
- lib/ronin/vulns/lfi/test_file.rb
|
108
130
|
- lib/ronin/vulns/open_redirect.rb
|
@@ -120,6 +142,12 @@ files:
|
|
120
142
|
- lib/ronin/vulns/vuln.rb
|
121
143
|
- lib/ronin/vulns/web_vuln.rb
|
122
144
|
- lib/ronin/vulns/web_vuln/http_request.rb
|
145
|
+
- man/ronin-vulns-command-injection.1
|
146
|
+
- man/ronin-vulns-command-injection.1.md
|
147
|
+
- man/ronin-vulns-completion.1
|
148
|
+
- man/ronin-vulns-completion.1.md
|
149
|
+
- man/ronin-vulns-irb.1
|
150
|
+
- man/ronin-vulns-irb.1.md
|
123
151
|
- man/ronin-vulns-lfi.1
|
124
152
|
- man/ronin-vulns-lfi.1.md
|
125
153
|
- man/ronin-vulns-open-redirect.1
|
@@ -134,7 +162,10 @@ files:
|
|
134
162
|
- man/ronin-vulns-sqli.1.md
|
135
163
|
- man/ronin-vulns-ssti.1
|
136
164
|
- man/ronin-vulns-ssti.1.md
|
165
|
+
- man/ronin-vulns.1
|
166
|
+
- man/ronin-vulns.1.md
|
137
167
|
- ronin-vulns.gemspec
|
168
|
+
- scripts/setup
|
138
169
|
homepage: https://ronin-rb.dev/
|
139
170
|
licenses:
|
140
171
|
- LGPL-3.0
|
@@ -1,81 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
#
|
3
|
-
# ronin-vulns - A Ruby library for blind vulnerability testing.
|
4
|
-
#
|
5
|
-
# Copyright (c) 2022-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
6
|
-
#
|
7
|
-
# ronin-vulns is free software: you can redistribute it and/or modify
|
8
|
-
# it under the terms of the GNU Lesser General Public License as published
|
9
|
-
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
-
# (at your option) any later version.
|
11
|
-
#
|
12
|
-
# ronin-vulns is distributed in the hope that it will be useful,
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Lesser General Public License for more details.
|
16
|
-
#
|
17
|
-
# You should have received a copy of the GNU Lesser General Public License
|
18
|
-
# along with ronin-vulns. If not, see <https://www.gnu.org/licenses/>.
|
19
|
-
#
|
20
|
-
|
21
|
-
require 'ronin/core/cli/logging'
|
22
|
-
|
23
|
-
module Ronin
|
24
|
-
module Vulns
|
25
|
-
class CLI
|
26
|
-
#
|
27
|
-
# Mixin that adds methods for logging discovered web vulnerabilities.
|
28
|
-
#
|
29
|
-
module Logging
|
30
|
-
include Core::CLI::Logging
|
31
|
-
|
32
|
-
# Known vulnerability types and their printable names.
|
33
|
-
VULN_TYPES = {
|
34
|
-
open_redirect: 'Open Redirect',
|
35
|
-
reflected_xss: 'reflected XSS',
|
36
|
-
|
37
|
-
lfi: 'LFI',
|
38
|
-
rfi: 'RFI',
|
39
|
-
sqli: 'SQLi',
|
40
|
-
ssti: 'SSTI'
|
41
|
-
}
|
42
|
-
|
43
|
-
#
|
44
|
-
# Returns the printable vulnerability type for the vulnerability object.
|
45
|
-
#
|
46
|
-
# @param [Vuln] vuln
|
47
|
-
#
|
48
|
-
# @return [String]
|
49
|
-
#
|
50
|
-
def vuln_type(vuln)
|
51
|
-
VULN_TYPES.fetch(vuln.class.vuln_type,'vulnerability')
|
52
|
-
end
|
53
|
-
|
54
|
-
#
|
55
|
-
# Prints a web vulnerability.
|
56
|
-
#
|
57
|
-
# @param [WebVuln] vuln
|
58
|
-
# The web vulnerability to print.
|
59
|
-
#
|
60
|
-
def log_vuln(vuln)
|
61
|
-
vuln_name = vuln_type(vuln)
|
62
|
-
location = if vuln.query_param
|
63
|
-
"query param '#{vuln.query_param}'"
|
64
|
-
elsif vuln.header_name
|
65
|
-
"Header '#{vuln.header_name}'"
|
66
|
-
elsif vuln.cookie_param
|
67
|
-
"Cookie param '#{vuln.cookie_param}'"
|
68
|
-
elsif vuln.form_param
|
69
|
-
"form param '#{vuln.form_param}'"
|
70
|
-
end
|
71
|
-
|
72
|
-
if location
|
73
|
-
log_info "Found #{vuln_name} on #{vuln.url} via #{location}!"
|
74
|
-
else
|
75
|
-
log_info "Found #{vuln_name} on #{vuln.url}!"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|