ronin-payloads 0.1.0.beta1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +16 -1
  3. data/.rubocop.yml +37 -0
  4. data/.yardopts +1 -1
  5. data/ChangeLog.md +13 -1
  6. data/Gemfile +5 -2
  7. data/README.md +4 -3
  8. data/Rakefile +3 -1
  9. data/bin/ronin-payloads +7 -8
  10. data/examples/bin_sh.rb +4 -0
  11. data/gemspec.yml +8 -7
  12. data/lib/ronin/payloads/asm_payload.rb +2 -2
  13. data/lib/ronin/payloads/binary_payload.rb +1 -1
  14. data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +1 -1
  15. data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +1 -1
  16. data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +1 -1
  17. data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +1 -1
  18. data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +1 -1
  19. data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +1 -1
  20. data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +1 -1
  21. data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +1 -1
  22. data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +1 -1
  23. data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +1 -1
  24. data/lib/ronin/payloads/builtin/java/reverse_shell.rb +1 -1
  25. data/lib/ronin/payloads/builtin/php/cmd_exec.rb +5 -4
  26. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +2 -2
  27. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +2 -2
  28. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +2 -2
  29. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +2 -2
  30. data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +2 -2
  31. data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +2 -2
  32. data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +2 -2
  33. data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +2 -2
  34. data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +2 -2
  35. data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +2 -2
  36. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +2 -2
  37. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +3 -3
  38. data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +3 -3
  39. data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +2 -2
  40. data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +2 -2
  41. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +3 -3
  42. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +2 -2
  43. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +2 -2
  44. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +2 -2
  45. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +2 -2
  46. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +2 -2
  47. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +2 -2
  48. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +2 -2
  49. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +2 -2
  50. data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +3 -3
  51. data/lib/ronin/payloads/builtin/test/open_redirect.rb +4 -4
  52. data/lib/ronin/payloads/builtin/test/xss.rb +4 -4
  53. data/lib/ronin/payloads/c_payload.rb +2 -2
  54. data/lib/ronin/payloads/cli/command.rb +1 -1
  55. data/lib/ronin/payloads/cli/commands/build.rb +11 -13
  56. data/lib/ronin/payloads/cli/commands/encode.rb +17 -21
  57. data/lib/ronin/payloads/cli/commands/encoder.rb +1 -1
  58. data/lib/ronin/payloads/cli/commands/encoders.rb +2 -2
  59. data/lib/ronin/payloads/cli/commands/irb.rb +1 -1
  60. data/lib/ronin/payloads/cli/commands/launch.rb +3 -3
  61. data/lib/ronin/payloads/cli/commands/list.rb +1 -1
  62. data/lib/ronin/payloads/cli/commands/new.rb +4 -4
  63. data/lib/ronin/payloads/cli/commands/show.rb +3 -2
  64. data/lib/ronin/payloads/cli/encoder_methods.rb +2 -1
  65. data/lib/ronin/payloads/cli/format_option.rb +1 -1
  66. data/lib/ronin/payloads/cli/generator/payload_types.rb +4 -3
  67. data/lib/ronin/payloads/cli/payload_command.rb +1 -1
  68. data/lib/ronin/payloads/cli/payload_methods.rb +1 -1
  69. data/lib/ronin/payloads/cli/printing.rb +1 -1
  70. data/lib/ronin/payloads/cli/ruby_shell.rb +1 -1
  71. data/lib/ronin/payloads/cli.rb +6 -1
  72. data/lib/ronin/payloads/coldfusion_payload.rb +1 -1
  73. data/lib/ronin/payloads/command_payload.rb +1 -1
  74. data/lib/ronin/payloads/encoders/builtin/html/encode.rb +2 -1
  75. data/lib/ronin/payloads/encoders/builtin/js/encode.rb +2 -1
  76. data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +2 -1
  77. data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +2 -1
  78. data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +2 -1
  79. data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +2 -1
  80. data/lib/ronin/payloads/encoders/encoder.rb +3 -2
  81. data/lib/ronin/payloads/encoders/exceptions.rb +2 -1
  82. data/lib/ronin/payloads/encoders/html_encoder.rb +2 -1
  83. data/lib/ronin/payloads/encoders/javascript_encoder.rb +2 -1
  84. data/lib/ronin/payloads/encoders/pipeline.rb +3 -2
  85. data/lib/ronin/payloads/encoders/powershell_encoder.rb +2 -1
  86. data/lib/ronin/payloads/encoders/registry.rb +5 -1
  87. data/lib/ronin/payloads/encoders/shell_encoder.rb +2 -1
  88. data/lib/ronin/payloads/encoders/sql_encoder.rb +2 -1
  89. data/lib/ronin/payloads/encoders/xml_encoder.rb +2 -1
  90. data/lib/ronin/payloads/encoders.rb +1 -1
  91. data/lib/ronin/payloads/exceptions.rb +2 -1
  92. data/lib/ronin/payloads/go_payload.rb +2 -2
  93. data/lib/ronin/payloads/html_payload.rb +1 -1
  94. data/lib/ronin/payloads/java_payload.rb +2 -2
  95. data/lib/ronin/payloads/javascript_payload.rb +1 -1
  96. data/lib/ronin/payloads/jsp_payload.rb +1 -1
  97. data/lib/ronin/payloads/metadata/arch.rb +2 -1
  98. data/lib/ronin/payloads/metadata/os.rb +2 -1
  99. data/lib/ronin/payloads/mixins/binary.rb +1 -1
  100. data/lib/ronin/payloads/mixins/bind_shell.rb +3 -3
  101. data/lib/ronin/payloads/mixins/build_dir.rb +1 -1
  102. data/lib/ronin/payloads/mixins/erb.rb +1 -1
  103. data/lib/ronin/payloads/mixins/network.rb +1 -1
  104. data/lib/ronin/payloads/mixins/post_ex.rb +1 -2
  105. data/lib/ronin/payloads/mixins/resolve_host.rb +1 -1
  106. data/lib/ronin/payloads/mixins/reverse_shell.rb +1 -2
  107. data/lib/ronin/payloads/mixins/tempfile.rb +1 -1
  108. data/lib/ronin/payloads/mixins/typescript.rb +2 -3
  109. data/lib/ronin/payloads/node_js_payload.rb +1 -1
  110. data/lib/ronin/payloads/payload.rb +8 -8
  111. data/lib/ronin/payloads/php_payload.rb +1 -1
  112. data/lib/ronin/payloads/powershell_payload.rb +1 -1
  113. data/lib/ronin/payloads/python_payload.rb +1 -1
  114. data/lib/ronin/payloads/registry.rb +4 -1
  115. data/lib/ronin/payloads/root.rb +1 -1
  116. data/lib/ronin/payloads/ruby_payload.rb +1 -1
  117. data/lib/ronin/payloads/rust_payload.rb +2 -2
  118. data/lib/ronin/payloads/shell_payload.rb +1 -1
  119. data/lib/ronin/payloads/shellcode/bind_shell_payload.rb +1 -1
  120. data/lib/ronin/payloads/shellcode/exec_shell_payload.rb +1 -1
  121. data/lib/ronin/payloads/shellcode/reverse_shell_payload.rb +1 -1
  122. data/lib/ronin/payloads/shellcode_payload.rb +9 -9
  123. data/lib/ronin/payloads/sql_payload.rb +1 -1
  124. data/lib/ronin/payloads/url_payload.rb +3 -3
  125. data/lib/ronin/payloads/version.rb +2 -2
  126. data/lib/ronin/payloads/xml_payload.rb +1 -1
  127. data/lib/ronin/payloads.rb +2 -1
  128. data/man/ronin-payloads-build.1 +1 -1
  129. data/man/ronin-payloads-build.1.md +1 -1
  130. data/man/ronin-payloads-encode.1 +1 -1
  131. data/man/ronin-payloads-encode.1.md +1 -1
  132. data/man/ronin-payloads-encoder.1 +1 -1
  133. data/man/ronin-payloads-encoder.1.md +1 -1
  134. data/man/ronin-payloads-encoders.1 +1 -1
  135. data/man/ronin-payloads-encoders.1.md +1 -1
  136. data/man/ronin-payloads-irb.1 +1 -1
  137. data/man/ronin-payloads-irb.1.md +1 -1
  138. data/man/ronin-payloads-launch.1 +1 -1
  139. data/man/ronin-payloads-launch.1.md +1 -1
  140. data/man/ronin-payloads-list.1 +1 -1
  141. data/man/ronin-payloads-list.1.md +1 -1
  142. data/man/ronin-payloads.1 +1 -1
  143. data/man/ronin-payloads.1.md +1 -1
  144. data/ronin-payloads.gemspec +5 -5
  145. metadata +17 -215
  146. data/spec/asm_payload_spec.rb +0 -114
  147. data/spec/binary_payload_spec.rb +0 -8
  148. data/spec/builtin/cmd/awk/reverse_shell_spec.rb +0 -38
  149. data/spec/builtin/cmd/bash/reverse_shell_spec.rb +0 -36
  150. data/spec/builtin/cmd/lua/reverse_shell_spec.rb +0 -38
  151. data/spec/builtin/cmd/node/reverse_shell_spec.rb +0 -36
  152. data/spec/builtin/cmd/openssl/reverse_shell_spec.rb +0 -38
  153. data/spec/builtin/cmd/perl/reverse_shell_spec.rb +0 -38
  154. data/spec/builtin/cmd/php/reverse_shell_spec.rb +0 -38
  155. data/spec/builtin/cmd/powershell/reverse_shell_spec.rb +0 -38
  156. data/spec/builtin/cmd/python/reverse_shell_spec.rb +0 -38
  157. data/spec/builtin/cmd/ruby/reverse_shell_spec.rb +0 -38
  158. data/spec/builtin/java/reverse_shell_spec.rb +0 -103
  159. data/spec/builtin/php/cmd_exec.rb +0 -52
  160. data/spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb +0 -58
  161. data/spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb +0 -46
  162. data/spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb +0 -63
  163. data/spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb +0 -46
  164. data/spec/builtin/shellcode/linux/arm/bind_shell_spec.rb +0 -62
  165. data/spec/builtin/shellcode/linux/arm/exec_shell_spec.rb +0 -46
  166. data/spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb +0 -58
  167. data/spec/builtin/shellcode/linux/mips/bind_shell_spec.rb +0 -60
  168. data/spec/builtin/shellcode/linux/mips/exec_shell_spec.rb +0 -46
  169. data/spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb +0 -58
  170. data/spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb +0 -46
  171. data/spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb +0 -87
  172. data/spec/builtin/shellcode/linux/x86/bind_shell_spec.rb +0 -60
  173. data/spec/builtin/shellcode/linux/x86/exec_shell_spec.rb +0 -46
  174. data/spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb +0 -58
  175. data/spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb +0 -60
  176. data/spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb +0 -46
  177. data/spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb +0 -58
  178. data/spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb +0 -46
  179. data/spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb +0 -58
  180. data/spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb +0 -46
  181. data/spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb +0 -63
  182. data/spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb +0 -58
  183. data/spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb +0 -46
  184. data/spec/builtin/shellcode/windows/x86_64/cmd_spec.rb +0 -54
  185. data/spec/builtin/test/open_redirect_spec.rb +0 -24
  186. data/spec/builtin/test/xss_spec.rb +0 -24
  187. data/spec/c_payload_spec.rb +0 -139
  188. data/spec/cli/commands/show_spec.rb +0 -21
  189. data/spec/cli/encoder_methods_spec.rb +0 -275
  190. data/spec/cli/format_option_spec.rb +0 -187
  191. data/spec/cli/payload_command_spec.rb +0 -68
  192. data/spec/cli/payload_methods_spec.rb +0 -208
  193. data/spec/cli/printing_spec.rb +0 -65
  194. data/spec/cli/ruby_shell_spec.rb +0 -14
  195. data/spec/coldfusion_payload_spec.rb +0 -8
  196. data/spec/command_payload_spec.rb +0 -8
  197. data/spec/encoders/builtin/html/encode_spec.rb +0 -17
  198. data/spec/encoders/builtin/js/encode_spec.rb +0 -17
  199. data/spec/encoders/builtin/powershell/encode_spec.rb +0 -17
  200. data/spec/encoders/builtin/shell/encode_spec.rb +0 -17
  201. data/spec/encoders/builtin/sql/encode_spec.rb +0 -17
  202. data/spec/encoders/builtin/xml/encode_spec.rb +0 -17
  203. data/spec/encoders/encoder_spec.rb +0 -62
  204. data/spec/encoders/html_encoder_spec.rb +0 -8
  205. data/spec/encoders/javascript_encoder_spec.rb +0 -8
  206. data/spec/encoders/pipeline_spec.rb +0 -153
  207. data/spec/encoders/powershell_encoder_spec.rb +0 -8
  208. data/spec/encoders/shell_encoder_spec.rb +0 -8
  209. data/spec/encoders/sql_encoder_spec.rb +0 -8
  210. data/spec/encoders/xml_encoder_spec.rb +0 -8
  211. data/spec/encoders_spec.rb +0 -25
  212. data/spec/go_payload_spec.rb +0 -56
  213. data/spec/helpers/encoders.rb +0 -9
  214. data/spec/helpers/payloads.rb +0 -9
  215. data/spec/helpers/scripts/payloads/simple.rb +0 -22
  216. data/spec/html_payload_spec.rb +0 -12
  217. data/spec/java_payload_spec.rb +0 -97
  218. data/spec/javascript_payload_spec.rb +0 -12
  219. data/spec/jsp_payload_spec.rb +0 -8
  220. data/spec/metadata/arch_spec.rb +0 -82
  221. data/spec/metadata/os_spec.rb +0 -164
  222. data/spec/mixins/binary_spec.rb +0 -129
  223. data/spec/mixins/bind_shell_spec.rb +0 -73
  224. data/spec/mixins/build_dir.rb +0 -64
  225. data/spec/mixins/erb_spec.rb +0 -19
  226. data/spec/mixins/network_spec.rb +0 -75
  227. data/spec/mixins/post_ex_spec.rb +0 -40
  228. data/spec/mixins/resolve_host_spec.rb +0 -322
  229. data/spec/mixins/reverse_shell_spec.rb +0 -103
  230. data/spec/mixins/tempfile_spec.rb +0 -97
  231. data/spec/mixins/typescript_spec.rb +0 -92
  232. data/spec/node_js_payload_spec.rb +0 -8
  233. data/spec/payload_spec.rb +0 -288
  234. data/spec/payloads_spec.rb +0 -29
  235. data/spec/php_payload_spec.rb +0 -8
  236. data/spec/powershell_payload_spec.rb +0 -16
  237. data/spec/python_payload_spec.rb +0 -8
  238. data/spec/ruby_payload_spec.rb +0 -8
  239. data/spec/rust_payload_spec.rb +0 -116
  240. data/spec/shell_payload_spec.rb +0 -16
  241. data/spec/shellcode/bind_shell_payload_spec.rb +0 -42
  242. data/spec/shellcode/exec_shell_payload_spec.rb +0 -8
  243. data/spec/shellcode/reverse_shell_payload_spec.rb +0 -136
  244. data/spec/shellcode_payload_spec.rb +0 -38
  245. data/spec/spec_helper.rb +0 -7
  246. data/spec/sql_payload_spec.rb +0 -12
  247. data/spec/url_payload_spec.rb +0 -72
  248. data/spec/xml_payload_spec.rb +0 -12
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -27,7 +27,7 @@ module Ronin
27
27
  module Linux
28
28
  module X86
29
29
  #
30
- # Linux x06 shellcode that binds a shell to a port.
30
+ # Linux x86 shellcode that binds a shell to a port.
31
31
  #
32
32
  class BindShell < BindShellPayload
33
33
 
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'Linux x86 bind shell shellcode'
43
43
  description <<~DESC
44
- Linux x86 shellcode that binds a shell to a port.
44
+ Linux x86 shellcode that binds a shell to a port.
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'Linux x86 execve() shellcode'
43
43
  description <<~DESC
44
- Linux x86 shellcode that calls execve() with "/bin/sh".
44
+ Linux x86 shellcode that calls execve() with "/bin/sh".
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'Linux x86 reverse shell shellcode'
42
42
  description <<~DESC
43
- Linux x86 shellcode that spawns a connect back reverse shell.
43
+ Linux x86 shellcode that spawns a connect back reverse shell.
44
44
  DESC
45
45
 
46
46
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -27,7 +27,7 @@ module Ronin
27
27
  module Linux
28
28
  module X86_64
29
29
  #
30
- # Linux x06-64 shellcode that binds a shell to a port.
30
+ # Linux x86-64 shellcode that binds a shell to a port.
31
31
  #
32
32
  class BindShell < BindShellPayload
33
33
 
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'Linux x86-64 bind shell shellcode'
42
42
  description <<~DESC
43
- Linux x86-64 shellcode that binds a shell to a port.
43
+ Linux x86-64 shellcode that binds a shell to a port.
44
44
  DESC
45
45
 
46
46
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'Linux x86-64 execve() shellcode'
42
42
  description <<~DESC
43
- Linux x86-64 shellcode that calls execve() with "/bin/sh".
43
+ Linux x86-64 shellcode that calls execve() with "/bin/sh".
44
44
  DESC
45
45
 
46
46
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'Linux x86-64 reverse shell shellcode'
42
42
  description <<~DESC
43
- Linux x86-64 shellcode that spawns a connect back reverse shell.
43
+ Linux x86-64 shellcode that spawns a connect back reverse shell.
44
44
  DESC
45
45
 
46
46
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'macOS x86-64 execve() shellcode'
43
43
  description <<~DESC
44
- macOS x86-64 shellcode that calls execve() with "/bin/sh".
44
+ macOS x86-64 shellcode that calls execve() with "/bin/sh".
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'macOS x86-64 reverse shell shellcode'
43
43
  description <<~DESC
44
- macOS x86-64 shellcode that spawns a connect back reverse shell.
44
+ macOS x86-64 shellcode that spawns a connect back reverse shell.
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'NetBSD x86 execve() shellcode'
42
42
  description <<~DESC
43
- NetBSD x86 shellcode that calls execve() with "/bin/sh".
43
+ NetBSD x86 shellcode that calls execve() with "/bin/sh".
44
44
  DESC
45
45
 
46
46
  references [
@@ -4,7 +4,7 @@
4
4
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
5
5
  # payloads.
6
6
  #
7
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
8
8
  #
9
9
  # ronin-payloads is free software: you can redistribute it and/or modify
10
10
  # it under the terms of the GNU Lesser General Public License as published
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'NetBSD x86 reverse shell shellcode'
43
43
  description <<~DESC
44
- NetBSD x86 shellcode that spawns a connect back reverse shell.
44
+ NetBSD x86 shellcode that spawns a connect back reverse shell.
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -40,7 +40,7 @@ module Ronin
40
40
 
41
41
  summary 'OpenBSD x86 bind shell shellcode'
42
42
  description <<~DESC
43
- OpenBSD x86 shellcode that binds a shell to a port.
43
+ OpenBSD x86 shellcode that binds a shell to a port.
44
44
  DESC
45
45
 
46
46
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -41,7 +41,7 @@ module Ronin
41
41
 
42
42
  summary 'OpenBSD x86 execve() shellcode'
43
43
  description <<~DESC
44
- OpenBSD x86 shellcode that calls execve() with "/bin/sh".
44
+ OpenBSD x86 shellcode that calls execve() with "/bin/sh".
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -37,11 +37,11 @@ module Ronin
37
37
  os :windows
38
38
  os_version '7'
39
39
 
40
- author "agix"
40
+ author "agix"
41
41
 
42
42
  summary 'Windows x86-64 cmd shellcode'
43
43
  description <<~DESC
44
- Windows x86-64 shellcode that executes "cmd"
44
+ Windows x86-64 shellcode that executes "cmd"
45
45
  DESC
46
46
 
47
47
  references [
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -33,10 +33,10 @@ module Ronin
33
33
 
34
34
  summary 'An Open Redirect test payload'
35
35
  description <<~DESC
36
- A non-malicious test payload for testing Open Redirect vulnerabilities.
37
- Simply redirects to https://google.com/.
36
+ A non-malicious test payload for testing Open Redirect vulnerabilities.
37
+ Simply redirects to https://google.com/.
38
38
  DESC
39
-
39
+
40
40
  #
41
41
  # Builds the Open Redirect test payload.
42
42
  #
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -33,10 +33,10 @@ module Ronin
33
33
 
34
34
  summary 'A XSS test payload'
35
35
  description <<~DESC
36
- A non-malicious test payload for testing Cross Site Scripting (XSS).
37
- Simply calls `alert(1)`.
36
+ A non-malicious test payload for testing Cross Site Scripting (XSS).
37
+ Simply calls `alert(1)`.
38
38
  DESC
39
-
39
+
40
40
  #
41
41
  # Builds the XSS test payload.
42
42
  #
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -52,7 +52,7 @@ module Ronin
52
52
  end
53
53
 
54
54
  param :cc, required: true,
55
- default: ->{ cc },
55
+ default: -> { cc },
56
56
  desc: 'The C compiler to use'
57
57
 
58
58
  #
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -80,9 +80,9 @@ module Ronin
80
80
  },
81
81
  desc: 'Sets a param for one of the encoders' do |str|
82
82
  name, value = str.split('=',2)
83
- ecndoer_name, param_name = name.split('.',2)
83
+ encoder_name, param_name = name.split('.',2)
84
84
 
85
- @encoder_params[encoder_name][param_name] = value
85
+ @encoder_params[encoder_name][param_name.to_sym] = value
86
86
  end
87
87
 
88
88
  option :debug, short: '-D',
@@ -162,16 +162,14 @@ module Ronin
162
162
  # Builds the {#payload}.
163
163
  #
164
164
  def build_payload
165
- begin
166
- @payload.perform_build
167
- rescue PayloadError => error
168
- print_error "failed to build the payload #{@payload_class.id}: #{error.message}"
169
- exit(-1)
170
- rescue => error
171
- print_exception(error)
172
- print_error "an unhandled exception occurred while building the payload #{@payload.class_id}"
173
- exit(-1)
174
- end
165
+ @payload.perform_build
166
+ rescue PayloadError => error
167
+ print_error "failed to build the payload #{@payload_class.id}: #{error.message}"
168
+ exit(-1)
169
+ rescue => error
170
+ print_exception(error)
171
+ print_error "an unhandled exception occurred while building the payload #{@payload.class_id}"
172
+ exit(-1)
175
173
  end
176
174
 
177
175
  #
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -71,15 +71,15 @@ module Ronin
71
71
  },
72
72
  desc: 'Sets a param on an encoder' do |str|
73
73
  prefix, value = str.split('=',2)
74
- ecndoer, name = prefix.split('.',2)
74
+ encoder, name = prefix.split('.',2)
75
75
 
76
- @params[encoder][name] = value
76
+ @params[encoder][name.to_sym] = value
77
77
  end
78
78
 
79
79
  option :string, short: '-s',
80
80
  value: {
81
81
  type: String,
82
- usage: 'STRING',
82
+ usage: 'STRING'
83
83
  },
84
84
  desc: 'The string to encode'
85
85
 
@@ -157,16 +157,14 @@ module Ronin
157
157
  # Another encoder validation error occurred.
158
158
  #
159
159
  def validate_encoder(encoder)
160
- begin
161
- encoder.validate
162
- rescue Core::Params::ParamError, ValidationError => error
163
- print_error "failed to validate the encoder #{encoder.class_id}: #{error.message}"
164
- exit(1)
165
- rescue => error
166
- print_error "an unhandled exception occurred while validating the encoder #{encoder.class_id}"
167
- print_exception(error)
168
- exit(-1)
169
- end
160
+ encoder.validate
161
+ rescue Core::Params::ParamError, ValidationError => error
162
+ print_error "failed to validate the encoder #{encoder.class_id}: #{error.message}"
163
+ exit(1)
164
+ rescue => error
165
+ print_error "an unhandled exception occurred while validating the encoder #{encoder.class_id}"
166
+ print_exception(error)
167
+ exit(-1)
170
168
  end
171
169
 
172
170
  #
@@ -197,13 +195,11 @@ module Ronin
197
195
  # @return [String]
198
196
  #
199
197
  def encode_data(data)
200
- begin
201
- @pipeline.encode(data)
202
- rescue => error
203
- print_error "unhandled exception occurred while encoding data"
204
- print_exception(error)
205
- exit(1)
206
- end
198
+ @pipeline.encode(data)
199
+ rescue => error
200
+ print_error "unhandled exception occurred while encoding data"
201
+ print_exception(error)
202
+ exit(1)
207
203
  end
208
204
 
209
205
  end
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -27,7 +27,7 @@ module Ronin
27
27
  class CLI
28
28
  module Commands
29
29
  #
30
- # Lists available anecoders or a specific encoder.
30
+ # Lists available encoders or a specific encoder.
31
31
  #
32
32
  # ## Usage
33
33
  #
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -36,7 +36,7 @@ module Ronin
36
36
  # ronin-payloads launch [options] {-f FILE | NAME}
37
37
  #
38
38
  # ## Options
39
- #
39
+ #
40
40
  # -f, --file FILE The payload file to load
41
41
  # -p, --param NAME=VALUE Sets a param
42
42
  # -D, --debug Enables debugging messages
@@ -90,7 +90,7 @@ module Ronin
90
90
  begin
91
91
  @payload.perform_prelaunch
92
92
  @payload.perform_postlaunch
93
- rescue PayloadError => error
93
+ rescue PayloadError => error
94
94
  print_error("failed to launch payload #{@payload.class_id}: #{error.message}")
95
95
  exit(1)
96
96
  rescue => error
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -2,18 +2,18 @@
2
2
  #
3
3
  # Copyright (c) 2021 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
- # ronin-repos is free software: you can redistribute it and/or modify
5
+ # ronin-payloads is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU Lesser General Public License as published
7
7
  # by the Free Software Foundation, either version 3 of the License, or
8
8
  # (at your option) any later version.
9
9
  #
10
- # ronin-repos is distributed in the hope that it will be useful,
10
+ # ronin-payloads is distributed in the hope that it will be useful,
11
11
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
13
  # GNU Lesser General Public License for more details.
14
14
  #
15
15
  # You should have received a copy of the GNU Lesser General Public License
16
- # along with ronin-repos. If not, see <https://www.gnu.org/licenses/>.
16
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
17
17
  #
18
18
 
19
19
  require 'ronin/payloads/cli/command'
@@ -41,7 +41,7 @@ module Ronin
41
41
  # ronin-payload new [options] FILE
42
42
  #
43
43
  # ## Options
44
- #
44
+ #
45
45
  # -t asm|shellcode|c|go|rust|shell|powershell|html|javascript|typescript|java|sql|php|python|ruby|nodejs,
46
46
  # --type The type for the new payload
47
47
  # -a, --author NAME The name of the author
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -77,7 +77,7 @@ module Ronin
77
77
  end
78
78
 
79
79
  #
80
- # Prints the mdatadata for a payload class.
80
+ # Prints the metadata for a payload class.
81
81
  #
82
82
  # @param [Class<Payload>] payload
83
83
  #
@@ -87,6 +87,7 @@ module Ronin
87
87
 
88
88
  indent do
89
89
  fields = {}
90
+
90
91
  fields['Type'] = payload_type(payload)
91
92
  fields['Summary'] = payload.summary if payload.summary
92
93
 
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
3
4
  # payloads.
4
5
  #
5
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
7
  #
7
8
  # ronin-payloads is free software: you can redistribute it and/or modify
8
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published
@@ -1,18 +1,19 @@
1
+ # frozen_string_literal: true
1
2
  #
2
3
  # Copyright (c) 2021 Hal Brodigan (postmodern.mod3 at gmail.com)
3
4
  #
4
- # ronin-repos is free software: you can redistribute it and/or modify
5
+ # ronin-payloads is free software: you can redistribute it and/or modify
5
6
  # it under the terms of the GNU Lesser General Public License as published
6
7
  # by the Free Software Foundation, either version 3 of the License, or
7
8
  # (at your option) any later version.
8
9
  #
9
- # ronin-repos is distributed in the hope that it will be useful,
10
+ # ronin-payloads is distributed in the hope that it will be useful,
10
11
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
12
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
13
  # GNU Lesser General Public License for more details.
13
14
  #
14
15
  # You should have received a copy of the GNU Lesser General Public License
15
- # along with ronin-repos. If not, see <https://www.gnu.org/licenses/>.
16
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
16
17
  #
17
18
 
18
19
  module Ronin
@@ -3,7 +3,7 @@
3
3
  # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
4
  # payloads.
5
5
  #
6
- # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
7
  #
8
8
  # ronin-payloads is free software: you can redistribute it and/or modify
9
9
  # it under the terms of the GNU Lesser General Public License as published