ronin-exploits 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +24 -0
- data/Gemfile +8 -8
- data/README.md +4 -1
- data/data/new/exploit.rb.erb +9 -9
- 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/mixins/remote_tcp.rb +2 -0
- data/lib/ronin/exploits/mixins/remote_udp.rb +2 -0
- data/lib/ronin/exploits/mixins/text.rb +2 -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: 4e6dbf77b0e6b4b6de88b6a1afe5484b74918b7a5e3a74007da060381d419f90
|
4
|
+
data.tar.gz: 14664066b0d2262912344e5a3c41e4f247eb60bc1d8464bd0b7ca93348cb9549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed8dedb7ddb26720c0a9df41894e3c97d952c7872bb93adbb76a02d2ffb132368e8a94e3e579daa7517a9b95c7aa97713df88eb0170bc35cd3dfb80c6088828
|
7
|
+
data.tar.gz: c6674278d65300b9f4862ef98a1282d0f8a8b7def02618a1ee11df02069c255ba1d493d8ad6b85a64704d0df4f5be0ceb81ae140e3e6e426cb31dc82ac5570ad
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
### 1.0.3 / 2023-09-19
|
2
|
+
|
3
|
+
#### CLI
|
4
|
+
|
5
|
+
* All newly generated exploit files using `ronin-exploit new` should have a
|
6
|
+
`summary` and a `description`.
|
7
|
+
* Fixed a bug where the `ronin-exploits new` options `--author`,
|
8
|
+
`--author-email`, or `--summary` were not properly escaping given values.
|
9
|
+
|
10
|
+
### 1.0.2 / 2023-06-12
|
11
|
+
|
12
|
+
* Corrected the `class_dir` for {Ronin::Exploits}; even though
|
13
|
+
`ronin-exploits` will never contain any built-in exploits.
|
14
|
+
* Avoid using `case`/`in` syntax for TruffleRuby.
|
15
|
+
* Documentation fixes and improvements.
|
16
|
+
|
17
|
+
#### CLI
|
18
|
+
|
19
|
+
* Fixed a typo in `ronin-exploits new` man-page.
|
20
|
+
* Fixed a bug in the `ronin-exploits show` command where a target's `version`
|
21
|
+
was not being printed.
|
22
|
+
* Fixed a bug where `ronin-exploits new --payload-type command` wasn't being
|
23
|
+
accepted as a valid payload type.
|
24
|
+
|
1
25
|
### 1.0.1 / 2023-03-01
|
2
26
|
|
3
27
|
* 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
@@ -8,7 +8,6 @@
|
|
8
8
|
* [Issues](https://github.com/ronin-rb/ronin-exploits/issues)
|
9
9
|
* [Documentation](https://rubydoc.info/github/ronin-rb/ronin-exploits/frames)
|
10
10
|
* [Discord](https://discord.gg/6WAb3PsVX9) |
|
11
|
-
[Twitter](https://twitter.com/ronin_rb) |
|
12
11
|
[Mastodon](https://infosec.exchange/@ronin_rb)
|
13
12
|
|
14
13
|
## Description
|
@@ -401,6 +400,10 @@ module Ronin
|
|
401
400
|
end
|
402
401
|
```
|
403
402
|
|
403
|
+
For real-world example ronin exploits, see the [example-exploits] repository.
|
404
|
+
|
405
|
+
[example-exploits]: https://github.com/ronin-rb/example-exploits
|
406
|
+
|
404
407
|
## Requirements
|
405
408
|
|
406
409
|
* [Ruby] >= 3.0.0
|
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'
|
@@ -41,7 +41,7 @@ module Ronin
|
|
41
41
|
# disclosure_date 'YYYY-MM-DD'
|
42
42
|
<%- unless @advisories.empty? -%>
|
43
43
|
<%- @advisories.each do |advisory| -%>
|
44
|
-
advisory
|
44
|
+
advisory <%= advisory.inspect -%>
|
45
45
|
<%- end -%>
|
46
46
|
<%- else -%>
|
47
47
|
# advisory 'CVE-YYYY-NNNN'
|
@@ -49,23 +49,23 @@ module Ronin
|
|
49
49
|
<%- end -%>
|
50
50
|
|
51
51
|
<%- if @author_email -%>
|
52
|
-
author
|
52
|
+
author <%= @author_name.inspect %>, email: <%= @author_email.inspect %>
|
53
53
|
<%- else -%>
|
54
|
-
author
|
54
|
+
author <%= @author_name.inspect %>
|
55
55
|
<%- end -%>
|
56
56
|
<%- if @summary -%>
|
57
|
-
summary
|
57
|
+
summary <%= @summary.inspect %>
|
58
58
|
<%- else -%>
|
59
|
-
|
59
|
+
summary "FIX ME"
|
60
60
|
<%- end -%>
|
61
61
|
<%- if @description -%>
|
62
62
|
description <<~DESC
|
63
63
|
<%= @description %>
|
64
64
|
DESC
|
65
65
|
<%- else -%>
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
description <<~DESC
|
67
|
+
FIX ME
|
68
|
+
DESC
|
69
69
|
<%- end -%>
|
70
70
|
<%- unless @references.empty? -%>
|
71
71
|
references [
|
@@ -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.3
|
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-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|