ronin-exploits 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +15 -0
- data/Gemfile +8 -8
- data/README.md +4 -0
- data/data/new/exploit.rb.erb +1 -1
- data/lib/ronin/exploits/cli/commands/new.rb +1 -1
- data/lib/ronin/exploits/cli/commands/run.rb +6 -4
- data/lib/ronin/exploits/cli/commands/show.rb +2 -2
- data/lib/ronin/exploits/cli/exploit_methods.rb +11 -8
- data/lib/ronin/exploits/exploit.rb +4 -1
- data/lib/ronin/exploits/metadata/os.rb +3 -3
- data/lib/ronin/exploits/mixins/binary.rb +3 -0
- data/lib/ronin/exploits/registry.rb +1 -1
- data/lib/ronin/exploits/version.rb +1 -1
- data/man/ronin-exploits-new.1 +1 -1
- data/man/ronin-exploits-new.1.md +1 -1
- data/man/ronin-exploits.1 +4 -4
- data/man/ronin-exploits.1.md +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5ed07e22075b4a85ab7b09942a6bfdf9481a3ac4fce42a5f5bd7184c5e9757f
|
4
|
+
data.tar.gz: 956a36865691124ef9547029072f96f737290490790ee92dd97b58c5dcd69e61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a84a745dbefea7175bac53d2d66207ff5439c4d39e38e6f05542479427e04010a94871bd0670082a3351a75162f64935c7fd908f9f997d007a6a99aaf5d38ba
|
7
|
+
data.tar.gz: f7e0ad4fe91a4ec17ddb4f6759c8fcf056731d34103d7829fdad9033b38b95e37a8264b1a72402baaa6bd736a5cd01200fd6be036214a1980624c74d0cd22b48
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
### 1.0.2 / 2023-06-12
|
2
|
+
|
3
|
+
* Corrected the `class_dir` for {Ronin::Exploits}; even though
|
4
|
+
`ronin-exploits` will never contain any built-in exploits.
|
5
|
+
* Avoid using `case`/`in` syntax for TruffleRuby.
|
6
|
+
* Documentation fixes and improvements.
|
7
|
+
|
8
|
+
#### CLI
|
9
|
+
|
10
|
+
* Fixed a typo in `ronin-exploits new` man-page.
|
11
|
+
* Fixed a bug in the `ronin-exploits show` command where a target's `version`
|
12
|
+
was not being printed.
|
13
|
+
* Fixed a bug where `ronin-exploits new --payload-type command` wasn't being
|
14
|
+
accepted as a valid payload type.
|
15
|
+
|
1
16
|
### 1.0.1 / 2023-03-01
|
2
17
|
|
3
18
|
* Require [ronin-support] ~> 1.0, >= 1.0.1.
|
data/Gemfile
CHANGED
@@ -15,21 +15,21 @@ end
|
|
15
15
|
# branch: 'main'
|
16
16
|
|
17
17
|
# Ronin dependencies
|
18
|
-
# gem 'ronin-support', '~> 1.0', github:
|
18
|
+
# gem 'ronin-support', '~> 1.0', github: 'ronin-rb/ronin-support',
|
19
19
|
# branch: 'main'
|
20
|
-
# gem 'ronin-payloads', '~> 0.1', github:
|
20
|
+
# gem 'ronin-payloads', '~> 0.1', github: 'ronin-rb/ronin-payloads',
|
21
21
|
# branch: 'main'
|
22
|
-
# gem 'ronin-vulns', '~> 0.1', github:
|
22
|
+
# gem 'ronin-vulns', '~> 0.1', github: 'ronin-rb/ronin-vulns',
|
23
23
|
# branch: 'main'
|
24
|
-
# gem 'ronin-post_ex', '~> 0.1', github:
|
24
|
+
# gem 'ronin-post_ex', '~> 0.1', github: 'ronin-rb/ronin-post_ex',
|
25
25
|
# branch: 'main'
|
26
|
-
# gem 'ronin-core', '~> 0.1', github:
|
26
|
+
# gem 'ronin-core', '~> 0.1', github: 'ronin-rb/ronin-core',
|
27
27
|
# branch: 'main'
|
28
|
-
# gem 'ronin-repos', '~> 0.1', github:
|
28
|
+
# gem 'ronin-repos', '~> 0.1', github: 'ronin-rb/ronin-repos',
|
29
29
|
# branch: 'main'
|
30
|
-
# gem 'ronin-code-asm', '~> 1.0', github:
|
30
|
+
# gem 'ronin-code-asm', '~> 1.0', github: 'ronin-rb/ronin-code-asm',
|
31
31
|
# branch: 'main'
|
32
|
-
# gem 'ronin-code-sql', '~> 2.0', github:
|
32
|
+
# gem 'ronin-code-sql', '~> 2.0', github: 'ronin-rb/ronin-code-sql',
|
33
33
|
# branch: 'main'
|
34
34
|
|
35
35
|
group :development do
|
data/README.md
CHANGED
data/data/new/exploit.rb.erb
CHANGED
@@ -5,7 +5,7 @@ require 'ronin/exploits/<%= @exploit_type[:file] -%>'
|
|
5
5
|
require 'ronin/exploits/mixins/<%= @networking_mixin[:file] -%>'
|
6
6
|
<%- end -%>
|
7
7
|
<%- if @target -%>
|
8
|
-
require 'ronin/exploits/mixins/
|
8
|
+
require 'ronin/exploits/mixins/has_targets'
|
9
9
|
<%- end -%>
|
10
10
|
<%- if @has_payload -%>
|
11
11
|
require 'ronin/exploits/mixins/has_payload'
|
@@ -55,7 +55,7 @@ module Ronin
|
|
55
55
|
# -I CVE-YYYY-NNNN|GHSA-XXXXX|..., Add the advisory ID to the exploit
|
56
56
|
# --advisory-id
|
57
57
|
# -R, --reference URL Adds a reference URL
|
58
|
-
# -P payload|asm|shellcode|c|shell|powershell|html|javascript|typpescript|java|sql|php|nodejs,
|
58
|
+
# -P payload|asm|shellcode|c|command|shell|powershell|html|javascript|typpescript|java|sql|php|nodejs,
|
59
59
|
# --has-payload The payload type the exploit uses
|
60
60
|
# -N remote_tcp|remote_udp|http, The networking mixin to use
|
61
61
|
# --networking
|
@@ -234,12 +234,12 @@ module Ronin
|
|
234
234
|
|
235
235
|
# The payload params.
|
236
236
|
#
|
237
|
-
# @return [Hash{
|
237
|
+
# @return [Hash{String => String}]
|
238
238
|
attr_reader :payload_params
|
239
239
|
|
240
240
|
# The keyword arguments to select a target with.
|
241
241
|
#
|
242
|
-
# @return [Hash{
|
242
|
+
# @return [Hash{Symbol => Object}]
|
243
243
|
attr_reader :target_kwargs
|
244
244
|
|
245
245
|
#
|
@@ -291,8 +291,10 @@ module Ronin
|
|
291
291
|
def load_encoders
|
292
292
|
@encoder_classes = @encoders_to_load.map do |(type,value)|
|
293
293
|
case type
|
294
|
-
|
295
|
-
|
294
|
+
when :name then load_encoder(value)
|
295
|
+
when :file then load_encoder_from(value)
|
296
|
+
else
|
297
|
+
raise(NotImplementedError,"invalid encoder type: #{type.inspect}")
|
296
298
|
end
|
297
299
|
end
|
298
300
|
end
|
@@ -266,8 +266,8 @@ module Ronin
|
|
266
266
|
end
|
267
267
|
|
268
268
|
if target.software
|
269
|
-
fields['Software'] = if target.
|
270
|
-
"#{target.software} #{target.
|
269
|
+
fields['Software'] = if target.version
|
270
|
+
"#{target.software} #{target.version}"
|
271
271
|
else
|
272
272
|
target.software
|
273
273
|
end
|
@@ -42,11 +42,11 @@ module Ronin
|
|
42
42
|
def load_exploit(name)
|
43
43
|
Exploits.load_class(name)
|
44
44
|
rescue Exploits::ClassNotFound => error
|
45
|
-
print_error
|
45
|
+
print_error(error.message)
|
46
46
|
exit(1)
|
47
47
|
rescue => error
|
48
48
|
print_exception(error)
|
49
|
-
print_error
|
49
|
+
print_error("an unhandled exception occurred while loading exploit #{name}")
|
50
50
|
exit(-1)
|
51
51
|
end
|
52
52
|
|
@@ -62,11 +62,11 @@ module Ronin
|
|
62
62
|
def load_exploit_from(file)
|
63
63
|
Exploits.load_class_from_file(file)
|
64
64
|
rescue Exploits::ClassNotFound => error
|
65
|
-
print_error
|
65
|
+
print_error(error.message)
|
66
66
|
exit(1)
|
67
67
|
rescue => error
|
68
68
|
print_exception(error)
|
69
|
-
print_error
|
69
|
+
print_error("an unhandled exception occurred while loading exploit from file #{file}")
|
70
70
|
exit(-1)
|
71
71
|
end
|
72
72
|
|
@@ -79,14 +79,17 @@ module Ronin
|
|
79
79
|
# @param [Hash{Symbol => Object}] kwargs
|
80
80
|
# Additional keyword arguments for {Exploit#initialize}.
|
81
81
|
#
|
82
|
+
# @return [Exploit]
|
83
|
+
# The initialized exploit object.
|
84
|
+
#
|
82
85
|
def initialize_exploit(exploit_class,**kwargs)
|
83
86
|
exploit_class.new(**kwargs)
|
84
87
|
rescue Core::Params::ParamError => error
|
85
|
-
print_error
|
88
|
+
print_error(error.message)
|
86
89
|
exit(1)
|
87
90
|
rescue => error
|
88
91
|
print_exception(error)
|
89
|
-
print_error
|
92
|
+
print_error("an unhandled exception occurred while initializing exploit #{exploit_class.id}")
|
90
93
|
exit(-1)
|
91
94
|
end
|
92
95
|
|
@@ -105,11 +108,11 @@ module Ronin
|
|
105
108
|
def validate_exploit(exploit)
|
106
109
|
exploit.perform_validate
|
107
110
|
rescue Core::Params::ParamError, ValidationError => error
|
108
|
-
print_error
|
111
|
+
print_error("failed to validate the exploit #{exploit.class_id}: #{error.message}")
|
109
112
|
exit(1)
|
110
113
|
rescue => error
|
111
114
|
print_exception(error)
|
112
|
-
print_error
|
115
|
+
print_error("an unhandled exception occurred while validating the exploit #{exploit.class_id}")
|
113
116
|
exit(-1)
|
114
117
|
end
|
115
118
|
end
|
@@ -117,7 +117,7 @@ module Ronin
|
|
117
117
|
#
|
118
118
|
# ### register
|
119
119
|
#
|
120
|
-
# Registers the exploit with
|
120
|
+
# Registers the exploit with {Exploits}.
|
121
121
|
#
|
122
122
|
# register 'my_exploit'
|
123
123
|
#
|
@@ -276,6 +276,9 @@ module Ronin
|
|
276
276
|
# @param [String] exploit_id
|
277
277
|
# The exploit's `id`.
|
278
278
|
#
|
279
|
+
# @example
|
280
|
+
# register 'my_exploit'
|
281
|
+
#
|
279
282
|
# @api public
|
280
283
|
#
|
281
284
|
def self.register(exploit_id)
|
@@ -47,10 +47,10 @@ module Ronin
|
|
47
47
|
#
|
48
48
|
# Gets or sets the exploit's targeted Operating System (OS).
|
49
49
|
#
|
50
|
-
# @param [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, nil] new_os
|
50
|
+
# @param [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, :android, nil] new_os
|
51
51
|
# The optional new Operating System (OS) to set.
|
52
52
|
#
|
53
|
-
# @return [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, nil]
|
53
|
+
# @return [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, :android, nil]
|
54
54
|
# The exploit's Operating System (OS).
|
55
55
|
#
|
56
56
|
# @example
|
@@ -97,7 +97,7 @@ module Ronin
|
|
97
97
|
#
|
98
98
|
# The Operating System (OS) that the exploit targets.
|
99
99
|
#
|
100
|
-
# @return [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, nil]
|
100
|
+
# @return [:unix, :bsd, :freebsd, :openbsd, :netbsd, :linux, :macos, :windows, :android, nil]
|
101
101
|
#
|
102
102
|
# @see ClassMethods#os
|
103
103
|
#
|
@@ -79,6 +79,9 @@ module Ronin
|
|
79
79
|
# Ronin::Support::Binary::CTypes::Arch::X86_64,
|
80
80
|
# Ronin::Support::Binary::CTypes::OS]
|
81
81
|
#
|
82
|
+
# @raise [ArgumentError]
|
83
|
+
# The exploit defined an unknown `arch` or `os` value.
|
84
|
+
#
|
82
85
|
def platform
|
83
86
|
@platform ||= Support::Binary::CTypes.platform(
|
84
87
|
arch: arch,
|
data/man/ronin-exploits-new.1
CHANGED
@@ -50,7 +50,7 @@ Add the advisory ID to the exploit\.
|
|
50
50
|
Adds a reference to the exploit\.
|
51
51
|
.LP
|
52
52
|
.TP
|
53
|
-
\fB-P\fR, \fB--has-payload\fR \fBpayload\fR\[or]\fBasm\fR\[or]\fBshellcode\fR\[or]\fBc\fR\[or]\fBshell\fR\[or]\fBpowershell\fR\[or]\fBhtml\fR\[or]\fBjavascript\fR\[or]\
|
53
|
+
\fB-P\fR, \fB--has-payload\fR \fBpayload\fR\[or]\fBasm\fR\[or]\fBshellcode\fR\[or]\fBc\fR\[or]\fBcommand\fR\[or]\fBshell\fR\[or]\fBpowershell\fR\[or]\fBhtml\fR\[or]\fBjavascript\fR\[or]\fBtypescript\fR\[or]\fBjava\fR\[or]\fBsql\fR\[or]\fBphp\fR\[or]\fBnodejs\fR
|
54
54
|
The payload type the exploit uses\.
|
55
55
|
.LP
|
56
56
|
.TP
|
data/man/ronin-exploits-new.1.md
CHANGED
@@ -37,7 +37,7 @@ Creates a new exploit file.
|
|
37
37
|
`-R`, `--reference` *URL*
|
38
38
|
Adds a reference to the exploit.
|
39
39
|
|
40
|
-
`-P`, `--has-payload` `payload`\|`asm`\|`shellcode`\|`c`\|`shell`\|`powershell`\|`html`\|`javascript`\|`
|
40
|
+
`-P`, `--has-payload` `payload`\|`asm`\|`shellcode`\|`c`\|`command`\|`shell`\|`powershell`\|`html`\|`javascript`\|`typescript`\|`java`\|`sql`\|`php`\|`nodejs`
|
41
41
|
The payload type the exploit uses.
|
42
42
|
|
43
43
|
`-N`, `--networking` `remote_tcp`\|`remote_udp`\|`http`
|
data/man/ronin-exploits.1
CHANGED
@@ -27,19 +27,19 @@ Print help information
|
|
27
27
|
.SH COMMANDS
|
28
28
|
.LP
|
29
29
|
.TP
|
30
|
-
\
|
30
|
+
\fBirb\fR
|
31
31
|
Starts ronin\-exploits interactive Ruby shell\.
|
32
32
|
.LP
|
33
33
|
.TP
|
34
|
-
\
|
34
|
+
\fBlist\fR
|
35
35
|
Lists available exploits\.
|
36
36
|
.LP
|
37
37
|
.TP
|
38
|
-
\
|
38
|
+
\fBrun\fR
|
39
39
|
Runs an exploit\.
|
40
40
|
.LP
|
41
41
|
.TP
|
42
|
-
\
|
42
|
+
\fBhelp\fR
|
43
43
|
Lists available commands or shows help about a specific command\.
|
44
44
|
.LP
|
45
45
|
.SH AUTHOR
|
data/man/ronin-exploits.1.md
CHANGED
@@ -20,16 +20,16 @@ Runs a `ronin-exploits` *COMMAND*.
|
|
20
20
|
|
21
21
|
## COMMANDS
|
22
22
|
|
23
|
-
|
23
|
+
`irb`
|
24
24
|
Starts ronin-exploits interactive Ruby shell.
|
25
25
|
|
26
|
-
|
26
|
+
`list`
|
27
27
|
Lists available exploits.
|
28
28
|
|
29
|
-
|
29
|
+
`run`
|
30
30
|
Runs an exploit.
|
31
31
|
|
32
|
-
|
32
|
+
`help`
|
33
33
|
Lists available commands or shows help about a specific command.
|
34
34
|
|
35
35
|
## AUTHOR
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-exploits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|