ronin-payloads 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fddb2f659bbde5b22104a0199430583326dd28ff4183121da3e25e88a94fe8a
4
- data.tar.gz: 5e2f20bca62fcd8d43f4bc82eb33c1098cac1e20269d49b847e793dcd186a978
3
+ metadata.gz: d2ab679d7311dab9baaff45c264e2a651a09530b5790eed2611060b66e776585
4
+ data.tar.gz: 7058d3c5e5f25f947e46cc651f4d7de2e7e3878578be2b0cb778f35864f2fdfd
5
5
  SHA512:
6
- metadata.gz: 0d75e548fc4782f995dbba42e62f4a1a485d3fc2fbdf005c479fe6beda75b2006d9f8132fe98125586d5b4877604c251ad1fe284ea13dccb04476b4edecfc4e4
7
- data.tar.gz: 36384af31fb5ba8e407c1b7ebe5777974b966a005c42ebe57a499fea46e450b82987ce3e117c07def7c515fe7f099caa1e760db1ca06ca077ccd2590a3cef8df
6
+ metadata.gz: d42c63a5fd2d02b157947de808e394fc60f052c22700b073cc632b9c32f40bec44570d09b0141bcfc97dfe28634869cf1e6c2367b62285ec38896b053d66444b
7
+ data.tar.gz: d87cfacd3e70ad04e553644d0956653ec6b9a6673645dddd14ac63c4699e9fe1f30b98224f0c665035950fe1578a7689e21650438f88eb8c15e1491a7ce704e2
data/.rubocop.yml CHANGED
@@ -34,4 +34,9 @@ Style/FormatStringToken:
34
34
  - 'spec/builtin/cmd/powershell/reverse_shell_spec.rb'
35
35
 
36
36
  # rubocop does not recognize empty-line continuations
37
- Layout/LineContinuationSpacing: { Exclude: ['lib/ronin/payloads/builtin/shellcode/**/*.rb'] }
37
+ Style/RedundantLineContinuation:
38
+ Exclude:
39
+ - 'lib/ronin/payloads/builtin/shellcode/**/*.rb'
40
+ Layout/LineContinuationSpacing:
41
+ Exclude:
42
+ - 'lib/ronin/payloads/builtin/shellcode/**/*.rb'
data/ChangeLog.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### 0.1.2 / 2023-06-09
2
+
3
+ * Add missing `require` for {Ronin::Payloads::Encoders::Encoder}.
4
+ * Added missing descriptions to built-in payloads (@ervinismu).
5
+ * Documentation fixes and improvements.
6
+
7
+ #### CLI
8
+
9
+ * Fixed the placeholder `references` URLs in the `ronin-payloads new` template.
10
+ * Fixed `--format html` and `--format xml` to encode every character.
11
+
1
12
  ### 0.1.1 / 2023-03-01
2
13
 
3
14
  * Default the `host` param defined by {Ronin::Payloads::Mixins::BindShell} to
data/Gemfile CHANGED
@@ -12,19 +12,19 @@ gem 'jruby-openssl', '~> 0.7', platforms: :jruby
12
12
  # branch: 'main'
13
13
 
14
14
  # Ronin dependencies
15
- # gem 'ronin-support', '~> 1.0', github: "ronin-rb/ronin-support",
15
+ # gem 'ronin-support', '~> 1.0', github: 'ronin-rb/ronin-support',
16
16
  # branch: 'main'
17
17
 
18
- # gem 'ronin-code-asm', '~> 1.0', github: "ronin-rb/ronin-code-asm",
18
+ # gem 'ronin-code-asm', '~> 1.0', github: 'ronin-rb/ronin-code-asm',
19
19
  # branch: 'main'
20
20
 
21
- # gem 'ronin-post_ex', '~> 0.1', github: "ronin-rb/ronin-post_ex",
21
+ # gem 'ronin-post_ex', '~> 0.1', github: 'ronin-rb/ronin-post_ex',
22
22
  # branch: 'main'
23
23
 
24
- # gem 'ronin-core', '~> 0.1', github: "ronin-rb/ronin-core",
24
+ # gem 'ronin-core', '~> 0.1', github: 'ronin-rb/ronin-core',
25
25
  # branch: 'main'
26
26
 
27
- # gem 'ronin-repos', '~> 0.1', github: "ronin-rb/ronin-repos",
27
+ # gem 'ronin-repos', '~> 0.1', github: 'ronin-rb/ronin-repos',
28
28
  # branch: 'main'
29
29
 
30
30
  group :development do
@@ -35,8 +35,8 @@ module Ronin
35
35
  ]
36
36
  <%- else -%>
37
37
  # references [
38
- # "https:/...",
39
- # "https:/..."
38
+ # "https://...",
39
+ # "https://..."
40
40
  # ]
41
41
  <%- end -%>
42
42
 
@@ -34,6 +34,9 @@ module Ronin
34
34
  include Mixins::ReverseShell
35
35
 
36
36
  register 'cmd/awk/reverse_shell'
37
+ description <<~DESC
38
+ A basic `awk` reverse shell command.
39
+ DESC
37
40
 
38
41
  #
39
42
  # Builds the `awk` reverse shell command.
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/bash/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic bash reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the bash reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/lua/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `lua` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `lua` reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/node/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `node` (Node.js) reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `node` reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/openssl/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `openssl` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `openssl` reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/perl/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `perl` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `perl` reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/php/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `php` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `php` reverse shell command.
40
44
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/powershell/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `powershell` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `powershell` reverse shell command.
40
44
  #
@@ -36,6 +36,10 @@ module Ronin
36
36
 
37
37
  register 'cmd/python/reverse_shell'
38
38
 
39
+ description <<~DESC
40
+ A basic `python` reverse shell command.
41
+ DESC
42
+
39
43
  #
40
44
  # Builds the `python` reverse shell command.
41
45
  #
@@ -35,6 +35,10 @@ module Ronin
35
35
 
36
36
  register 'cmd/ruby/reverse_shell'
37
37
 
38
+ description <<~DESC
39
+ A basic `ruby` reverse shell command.
40
+ DESC
41
+
38
42
  #
39
43
  # Builds the `ruby` reverse shell command.
40
44
  #
@@ -40,6 +40,10 @@ module Ronin
40
40
 
41
41
  register 'java/reverse_shell'
42
42
 
43
+ description <<~DESC
44
+ A basic Java reverse shell.
45
+ DESC
46
+
43
47
  # Path to the `Payload.java.erb` ERB template file.
44
48
  TEMPLATE = File.join(__dir__,'reverse_shell','Payload.java.erb')
45
49
 
@@ -31,7 +31,7 @@ module Ronin
31
31
  #
32
32
  # ## Usage
33
33
  #
34
- # ronin-payloads list [options] [NAME]
34
+ # ronin-payloads list [options] [DIR]
35
35
  #
36
36
  # ## Options
37
37
  #
@@ -39,14 +39,14 @@ module Ronin
39
39
  #
40
40
  # ## Arguments
41
41
  #
42
- # [NAME] The optional payload name to list
42
+ # [DIR] The optional payload directory to list
43
43
  #
44
44
  class List < Command
45
45
 
46
- usage '[options] [NAME]'
46
+ usage '[options] [DIR]'
47
47
 
48
- argument :name, required: false,
49
- desc: 'The optional payload name to list'
48
+ argument :dir, required: false,
49
+ desc: 'The optional payload directory to list'
50
50
 
51
51
  description 'Lists the available payloads'
52
52
 
@@ -103,7 +103,7 @@ module Ronin
103
103
  end
104
104
  end
105
105
 
106
- print_fields fields
106
+ print_fields(fields)
107
107
  puts
108
108
 
109
109
  print_authors(payload)
@@ -64,11 +64,11 @@ module Ronin
64
64
  def load_encoder(name)
65
65
  Payloads::Encoders.load_class(name)
66
66
  rescue Payloads::ClassNotFound => error
67
- print_error error.message
67
+ print_error(error.message)
68
68
  exit(1)
69
69
  rescue => error
70
70
  print_exception(error)
71
- print_error "an unhandled exception occurred while loading encoder #{name}"
71
+ print_error("an unhandled exception occurred while loading encoder #{name}")
72
72
  exit(-1)
73
73
  end
74
74
 
@@ -84,11 +84,11 @@ module Ronin
84
84
  def load_encoder_from(file)
85
85
  Payloads::Encoders.load_class_from_file(file)
86
86
  rescue Payloads::ClassNotFound => error
87
- print_error error.message
87
+ print_error(error.message)
88
88
  exit(1)
89
89
  rescue => error
90
90
  print_exception(error)
91
- print_error "an unhandled exception occurred while loading encoder from file #{file}"
91
+ print_error("an unhandled exception occurred while loading encoder from file #{file}")
92
92
  exit(-1)
93
93
  end
94
94
 
@@ -101,14 +101,17 @@ module Ronin
101
101
  # @param [Hash{Symbol => Object}] kwargs
102
102
  # Additional keyword arguments for {Ronin::Payloads::Encoders::Encoder#initialize}.
103
103
  #
104
+ # @return [Encoders::Encoder]
105
+ # The initialized encoder object.
106
+ #
104
107
  def initialize_encoder(encoder_class,**kwargs)
105
108
  encoder_class.new(**kwargs)
106
109
  rescue Core::Params::ParamError => error
107
- print_error error.message
110
+ print_error(error.message)
108
111
  exit(1)
109
112
  rescue => error
110
113
  print_exception(error)
111
- print_error "an unhandled exception occurred while initializing encoder #{encoder_class.id}"
114
+ print_error("an unhandled exception occurred while initializing encoder #{encoder_class.id}")
112
115
  exit(-1)
113
116
  end
114
117
 
@@ -127,11 +130,11 @@ module Ronin
127
130
  def validate_encoder(encoder)
128
131
  encoder.validate
129
132
  rescue Core::Params::ParamError, Encoders::ValidationError => error
130
- print_error "failed to validate the encoder #{encoder.class_id}: #{error.message}"
133
+ print_error("failed to validate the encoder #{encoder.class_id}: #{error.message}")
131
134
  exit(1)
132
135
  rescue => error
133
136
  print_exception(error)
134
- print_error "an unhandled exception occurred while validating the encoder #{encoder.class_id}"
137
+ print_error("an unhandled exception occurred while validating the encoder #{encoder.class_id}")
135
138
  exit(-1)
136
139
  end
137
140
  end
@@ -50,12 +50,12 @@ module Ronin
50
50
 
51
51
  xml: -> {
52
52
  require 'ronin/support/encoding/xml'
53
- Support::Encoding::XML.method(:escape)
53
+ Support::Encoding::XML.method(:encode)
54
54
  },
55
55
 
56
56
  html: -> {
57
57
  require 'ronin/support/encoding/html'
58
- Support::Encoding::HTML.method(:escape)
58
+ Support::Encoding::HTML.method(:encode)
59
59
  },
60
60
 
61
61
  js: -> {
@@ -42,11 +42,11 @@ module Ronin
42
42
  def load_payload(name)
43
43
  Payloads.load_class(name)
44
44
  rescue Payloads::ClassNotFound => error
45
- print_error error.message
45
+ print_error(error.message)
46
46
  exit(1)
47
47
  rescue => error
48
48
  print_exception(error)
49
- print_error "an unhandled exception occurred while loading payload #{name}"
49
+ print_error("an unhandled exception occurred while loading payload #{name}")
50
50
  exit(-1)
51
51
  end
52
52
 
@@ -62,11 +62,11 @@ module Ronin
62
62
  def load_payload_from(file)
63
63
  Payloads.load_class_from_file(file)
64
64
  rescue Payloads::ClassNotFound => error
65
- print_error error.message
65
+ print_error(error.message)
66
66
  exit(1)
67
67
  rescue => error
68
68
  print_exception(error)
69
- print_error "an unhandled exception occurred while loading payload from file #{file}"
69
+ print_error("an unhandled exception occurred while loading payload 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 {Payload#initialize}.
81
81
  #
82
+ # @return [Payload]
83
+ # The initialized payload object.
84
+ #
82
85
  def initialize_payload(payload_class,**kwargs)
83
86
  payload_class.new(**kwargs)
84
87
  rescue Core::Params::ParamError => error
85
- print_error error.message
88
+ print_error(error.message)
86
89
  exit(1)
87
90
  rescue => error
88
91
  print_exception(error)
89
- print_error "an unhandled exception occurred while initializing payload #{payload_class.id}"
92
+ print_error("an unhandled exception occurred while initializing payload #{payload_class.id}")
90
93
  exit(-1)
91
94
  end
92
95
 
@@ -105,11 +108,11 @@ module Ronin
105
108
  def validate_payload(payload)
106
109
  payload.perform_validate
107
110
  rescue Core::Params::ParamError, ValidationError => error
108
- print_error "failed to validate the payload #{payload.class_id}: #{error.message}"
111
+ print_error("failed to validate the payload #{payload.class_id}: #{error.message}")
109
112
  exit(1)
110
113
  rescue => error
111
114
  print_exception(error)
112
- print_error "an unhandled exception occurred while validating the payload #{payload.class_id}"
115
+ print_error("an unhandled exception occurred while validating the payload #{payload.class_id}")
113
116
  exit(-1)
114
117
  end
115
118
  end
@@ -25,7 +25,7 @@ module Ronin
25
25
  module Payloads
26
26
  module Mixins
27
27
  #
28
- # Adds support for building files.
28
+ # Adds support for temporary files.
29
29
  #
30
30
  # @api public
31
31
  #
@@ -21,6 +21,7 @@
21
21
 
22
22
  require 'ronin/payloads/registry'
23
23
  require 'ronin/payloads/exceptions'
24
+ require 'ronin/payloads/encoders/encoder'
24
25
  require 'ronin/payloads/encoders/pipeline'
25
26
 
26
27
  require 'ronin/core/metadata/id'
@@ -53,7 +53,7 @@ module Ronin
53
53
  @url = new_url
54
54
  else
55
55
  @url || if superclass < URLPayload
56
- superclass.url || \
56
+ superclass.url ||
57
57
  raise(NotImplementedError,"#{self} did not define a url")
58
58
  end
59
59
  end
@@ -22,6 +22,6 @@
22
22
  module Ronin
23
23
  module Payloads
24
24
  # ronin-payloads version
25
- VERSION = '0.1.1'
25
+ VERSION = '0.1.2'
26
26
  end
27
27
  end
data/man/ronin-payloads.1 CHANGED
@@ -27,31 +27,31 @@ Print help information
27
27
  .SH COMMANDS
28
28
  .LP
29
29
  .TP
30
- \fIbuild\fP
30
+ \fBbuild\fR
31
31
  Builds a payload\.
32
32
  .LP
33
33
  .TP
34
- \fIencode\fP
34
+ \fBencode\fR
35
35
  Encodes a payload with one or more payload encoders\.
36
36
  .LP
37
37
  .TP
38
- \fIencoders\fP
38
+ \fBencoders\fR
39
39
  Lists available encoders\.
40
40
  .LP
41
41
  .TP
42
- \fIirb\fP
42
+ \fBirb\fR
43
43
  Starts ronin\-payload\[cq]s interactive Ruby shell\.
44
44
  .LP
45
45
  .TP
46
- \fIlaunch\fP
46
+ \fBlaunch\fR
47
47
  Launches a payload\.
48
48
  .LP
49
49
  .TP
50
- \fIlist\fP
50
+ \fBlist\fR
51
51
  Lists available payloads\.
52
52
  .LP
53
53
  .TP
54
- \fIhelp\fP
54
+ \fBhelp\fR
55
55
  Lists available commands or shows help about a specific command\.
56
56
  .LP
57
57
  .SH AUTHOR
@@ -20,25 +20,25 @@ Runs a `ronin-payloads` *COMMAND*.
20
20
 
21
21
  ## COMMANDS
22
22
 
23
- *build*
23
+ `build`
24
24
  Builds a payload.
25
25
 
26
- *encode*
26
+ `encode`
27
27
  Encodes a payload with one or more payload encoders.
28
28
 
29
- *encoders*
29
+ `encoders`
30
30
  Lists available encoders.
31
31
 
32
- *irb*
32
+ `irb`
33
33
  Starts ronin-payload's interactive Ruby shell.
34
34
 
35
- *launch*
35
+ `launch`
36
36
  Launches a payload.
37
37
 
38
- *list*
38
+ `list`
39
39
  Lists available payloads.
40
40
 
41
- *help*
41
+ `help`
42
42
  Lists available commands or shows help about a specific command.
43
43
 
44
44
  ## AUTHOR
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-payloads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.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-03-02 00:00:00.000000000 Z
11
+ date: 2023-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ronin-support