ronin-payloads 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +15 -1
  3. data/.rubocop.yml +42 -0
  4. data/ChangeLog.md +24 -1
  5. data/Gemfile +10 -7
  6. data/Rakefile +3 -1
  7. data/bin/ronin-payloads +6 -7
  8. data/data/templates/payload.rb.erb +2 -2
  9. data/examples/bin_sh.rb +4 -0
  10. data/lib/ronin/payloads/asm_payload.rb +1 -1
  11. data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +3 -0
  12. data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +4 -0
  13. data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +4 -0
  14. data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +4 -0
  15. data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +4 -0
  16. data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +4 -0
  17. data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +4 -0
  18. data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +4 -0
  19. data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +4 -0
  20. data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +4 -0
  21. data/lib/ronin/payloads/builtin/java/reverse_shell.rb +4 -0
  22. data/lib/ronin/payloads/builtin/php/cmd_exec.rb +4 -3
  23. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +1 -1
  24. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +1 -1
  25. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +1 -1
  26. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +1 -1
  27. data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +1 -1
  28. data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +1 -1
  29. data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +1 -1
  30. data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +1 -1
  31. data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +1 -1
  32. data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +1 -1
  33. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +1 -1
  34. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +2 -2
  35. data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +1 -1
  36. data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +1 -1
  37. data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +1 -1
  38. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +1 -1
  39. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +1 -1
  40. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +1 -1
  41. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +1 -1
  42. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +1 -1
  43. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +1 -1
  44. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +1 -1
  45. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +1 -1
  46. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +1 -1
  47. data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +2 -2
  48. data/lib/ronin/payloads/builtin/test/open_redirect.rb +3 -3
  49. data/lib/ronin/payloads/builtin/test/xss.rb +3 -3
  50. data/lib/ronin/payloads/c_payload.rb +1 -1
  51. data/lib/ronin/payloads/cli/commands/build.rb +10 -12
  52. data/lib/ronin/payloads/cli/commands/encode.rb +16 -20
  53. data/lib/ronin/payloads/cli/commands/launch.rb +2 -2
  54. data/lib/ronin/payloads/cli/commands/list.rb +5 -5
  55. data/lib/ronin/payloads/cli/commands/new.rb +1 -1
  56. data/lib/ronin/payloads/cli/commands/show.rb +2 -1
  57. data/lib/ronin/payloads/cli/encoder_methods.rb +12 -8
  58. data/lib/ronin/payloads/cli/format_option.rb +2 -2
  59. data/lib/ronin/payloads/cli/generator/payload_types.rb +1 -0
  60. data/lib/ronin/payloads/cli/payload_methods.rb +11 -8
  61. data/lib/ronin/payloads/encoders/builtin/html/encode.rb +1 -0
  62. data/lib/ronin/payloads/encoders/builtin/js/encode.rb +1 -0
  63. data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +1 -0
  64. data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +1 -0
  65. data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +1 -0
  66. data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +1 -0
  67. data/lib/ronin/payloads/encoders/encoder.rb +2 -1
  68. data/lib/ronin/payloads/encoders/exceptions.rb +1 -0
  69. data/lib/ronin/payloads/encoders/html_encoder.rb +1 -0
  70. data/lib/ronin/payloads/encoders/javascript_encoder.rb +1 -0
  71. data/lib/ronin/payloads/encoders/pipeline.rb +1 -0
  72. data/lib/ronin/payloads/encoders/powershell_encoder.rb +1 -0
  73. data/lib/ronin/payloads/encoders/registry.rb +4 -0
  74. data/lib/ronin/payloads/encoders/shell_encoder.rb +1 -0
  75. data/lib/ronin/payloads/encoders/sql_encoder.rb +1 -0
  76. data/lib/ronin/payloads/encoders/xml_encoder.rb +1 -0
  77. data/lib/ronin/payloads/exceptions.rb +1 -0
  78. data/lib/ronin/payloads/go_payload.rb +1 -1
  79. data/lib/ronin/payloads/java_payload.rb +1 -1
  80. data/lib/ronin/payloads/metadata/arch.rb +1 -0
  81. data/lib/ronin/payloads/metadata/os.rb +1 -0
  82. data/lib/ronin/payloads/mixins/bind_shell.rb +2 -2
  83. data/lib/ronin/payloads/mixins/post_ex.rb +0 -1
  84. data/lib/ronin/payloads/mixins/reverse_shell.rb +0 -1
  85. data/lib/ronin/payloads/mixins/tempfile.rb +1 -1
  86. data/lib/ronin/payloads/mixins/typescript.rb +1 -2
  87. data/lib/ronin/payloads/payload.rb +8 -7
  88. data/lib/ronin/payloads/registry.rb +3 -0
  89. data/lib/ronin/payloads/rust_payload.rb +1 -1
  90. data/lib/ronin/payloads/shellcode_payload.rb +8 -8
  91. data/lib/ronin/payloads/url_payload.rb +2 -2
  92. data/lib/ronin/payloads/version.rb +1 -1
  93. data/lib/ronin/payloads.rb +1 -0
  94. data/man/ronin-payloads-build.1 +1 -1
  95. data/man/ronin-payloads-build.1.md +1 -1
  96. data/man/ronin-payloads-encode.1 +1 -1
  97. data/man/ronin-payloads-encode.1.md +1 -1
  98. data/man/ronin-payloads-encoder.1 +1 -1
  99. data/man/ronin-payloads-encoder.1.md +1 -1
  100. data/man/ronin-payloads-encoders.1 +1 -1
  101. data/man/ronin-payloads-encoders.1.md +1 -1
  102. data/man/ronin-payloads-irb.1 +1 -1
  103. data/man/ronin-payloads-irb.1.md +1 -1
  104. data/man/ronin-payloads-launch.1 +1 -1
  105. data/man/ronin-payloads-launch.1.md +1 -1
  106. data/man/ronin-payloads-list.1 +1 -1
  107. data/man/ronin-payloads-list.1.md +1 -1
  108. data/man/ronin-payloads.1 +8 -8
  109. data/man/ronin-payloads.1.md +8 -8
  110. data/ronin-payloads.gemspec +3 -4
  111. metadata +3 -2
@@ -33,21 +33,21 @@ module Ronin
33
33
  #
34
34
  # #!/usr/bin/env -S ronin-payload build -f
35
35
  # require 'ronin/payloads/shellcode_payload'
36
- #
36
+ #
37
37
  # module Ronin
38
38
  # module Payloads
39
39
  # class LinuxX86BinSh < ShellcodePayload
40
- #
40
+ #
41
41
  # register 'shellcode/linux/x86/bin_sh'
42
42
  #
43
43
  # summary 'x86 Linux /bin/sh shellcode'
44
44
  # description <<~EOS
45
45
  # Shellcode that spawns a local /bin/sh shell
46
46
  # EOS
47
- #
47
+ #
48
48
  # arch :x86
49
49
  # os :linux
50
- #
50
+ #
51
51
  # def build
52
52
  # @payload = "1\xc0Ph//shh/bin\x89\xdcPS\x89\xcc1\xd2\xcd\x0b"
53
53
  # end
@@ -59,21 +59,21 @@ module Ronin
59
59
  #
60
60
  # #!/usr/bin/env -S ronin-payload build -f
61
61
  # require 'ronin/payloads/shellcode_payload'
62
- #
62
+ #
63
63
  # module Ronin
64
64
  # module Payloads
65
65
  # class LinuxX86BinSh < ShellcodePayload
66
- #
66
+ #
67
67
  # register 'shellcode/linux/x86/bin_sh'
68
68
  #
69
69
  # summary 'x86 Linux /bin/sh shellcode'
70
70
  # description <<~EOS
71
71
  # Shellcode that spawns a local /bin/sh shell
72
72
  # EOS
73
- #
73
+ #
74
74
  # arch :x86
75
75
  # os :linux
76
- #
76
+ #
77
77
  # def build
78
78
  # shellcode do
79
79
  # xor eax, eax
@@ -29,7 +29,7 @@ module Ronin
29
29
  # ## Example
30
30
  #
31
31
  # class MyHostedPayload < URLPayload
32
- #
32
+ #
33
33
  # url 'https://evil.com/downloads/my_payload'
34
34
  #
35
35
  # end
@@ -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.0'
25
+ VERSION = '0.1.2'
26
26
  end
27
27
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
3
4
  # payloads.
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-build 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-build 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-build 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-build 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-encoder 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-encoder 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-encoder 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-encoder 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-encoder 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-encoder 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-encoder 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-encoder 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-encoders 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-encoders 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-encoders 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-encoders 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-irb 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-irb 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-irb 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-irb 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-launch 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-launch 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-launch 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-launch 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads-list 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads-list 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -1,4 +1,4 @@
1
- # ronin-payloads-list 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads-list 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
data/man/ronin-payloads.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 0.1.8
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH ronin-payloads 1 "May 2022" Ronin "User Manuals"
3
+ .TH ronin-payloads 1 "2023-02-01" Ronin "User Manuals"
4
4
  .LP
5
5
  .SH SYNOPSIS
6
6
  .LP
@@ -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
@@ -1,4 +1,4 @@
1
- # ronin-payloads 1 "May 2022" Ronin "User Manuals"
1
+ # ronin-payloads 1 "2023-02-01" Ronin "User Manuals"
2
2
 
3
3
  ## SYNOPSIS
4
4
 
@@ -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
@@ -1,5 +1,4 @@
1
- # encoding: utf-8
2
-
1
+ # frozen_string_literal: true
3
2
  require 'yaml'
4
3
 
5
4
  Gem::Specification.new do |gem|
@@ -22,7 +21,7 @@ Gem::Specification.new do |gem|
22
21
  gem.homepage = gemspec['homepage']
23
22
  gem.metadata = gemspec['metadata'] if gemspec['metadata']
24
23
 
25
- glob = lambda { |patterns| gem.files & Dir[*patterns] }
24
+ glob = ->(patterns) { gem.files & Dir[*patterns] }
26
25
 
27
26
  gem.files = `git ls-files`.split($/)
28
27
  gem.files = glob[gemspec['files']] if gemspec['files']
@@ -46,7 +45,7 @@ Gem::Specification.new do |gem|
46
45
  gem.required_rubygems_version = gemspec['required_rubygems_version']
47
46
  gem.post_install_message = gemspec['post_install_message']
48
47
 
49
- split = lambda { |string| string.split(/,\s*/) }
48
+ split = ->(string) { string.split(/,\s*/) }
50
49
 
51
50
  if gemspec['dependencies']
52
51
  gemspec['dependencies'].each do |name,versions|
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.0
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-02-01 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
@@ -111,6 +111,7 @@ files:
111
111
  - ".github/workflows/ruby.yml"
112
112
  - ".gitignore"
113
113
  - ".rspec"
114
+ - ".rubocop.yml"
114
115
  - ".ruby-version"
115
116
  - ".yardopts"
116
117
  - COPYING.txt