ronin-payloads 0.1.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.github/workflows/ruby.yml +31 -0
  4. data/.gitignore +14 -0
  5. data/.rspec +1 -0
  6. data/.ruby-version +1 -0
  7. data/.yardopts +1 -0
  8. data/COPYING.txt +165 -0
  9. data/ChangeLog.md +48 -0
  10. data/Gemfile +46 -0
  11. data/README.md +383 -0
  12. data/Rakefile +32 -0
  13. data/bin/ronin-payloads +36 -0
  14. data/data/templates/payload.rb.erb +59 -0
  15. data/examples/bin_sh.rb +34 -0
  16. data/gemspec.yml +43 -0
  17. data/lib/ronin/payloads/asm_payload.rb +101 -0
  18. data/lib/ronin/payloads/binary_payload.rb +47 -0
  19. data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +49 -0
  20. data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +49 -0
  21. data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +49 -0
  22. data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +51 -0
  23. data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +49 -0
  24. data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +49 -0
  25. data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +49 -0
  26. data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +49 -0
  27. data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +50 -0
  28. data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +49 -0
  29. data/lib/ronin/payloads/builtin/java/reverse_shell/Payload.java.erb +55 -0
  30. data/lib/ronin/payloads/builtin/java/reverse_shell.rb +72 -0
  31. data/lib/ronin/payloads/builtin/php/cmd_exec.rb +55 -0
  32. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +69 -0
  33. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +64 -0
  34. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +67 -0
  35. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +64 -0
  36. data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +130 -0
  37. data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +71 -0
  38. data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +83 -0
  39. data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +129 -0
  40. data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +73 -0
  41. data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +111 -0
  42. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +75 -0
  43. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +136 -0
  44. data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +109 -0
  45. data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +65 -0
  46. data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +73 -0
  47. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +70 -0
  48. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +71 -0
  49. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +69 -0
  50. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +66 -0
  51. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +71 -0
  52. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +85 -0
  53. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +110 -0
  54. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +71 -0
  55. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +74 -0
  56. data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +82 -0
  57. data/lib/ronin/payloads/builtin/test/open_redirect.rb +50 -0
  58. data/lib/ronin/payloads/builtin/test/xss.rb +50 -0
  59. data/lib/ronin/payloads/c_payload.rb +106 -0
  60. data/lib/ronin/payloads/cli/command.rb +40 -0
  61. data/lib/ronin/payloads/cli/commands/build.rb +213 -0
  62. data/lib/ronin/payloads/cli/commands/encode.rb +213 -0
  63. data/lib/ronin/payloads/cli/commands/encoder.rb +129 -0
  64. data/lib/ronin/payloads/cli/commands/encoders.rb +81 -0
  65. data/lib/ronin/payloads/cli/commands/irb.rb +58 -0
  66. data/lib/ronin/payloads/cli/commands/launch.rb +116 -0
  67. data/lib/ronin/payloads/cli/commands/list.rb +81 -0
  68. data/lib/ronin/payloads/cli/commands/new.rb +119 -0
  69. data/lib/ronin/payloads/cli/commands/show.rb +119 -0
  70. data/lib/ronin/payloads/cli/encoder_methods.rb +139 -0
  71. data/lib/ronin/payloads/cli/format_option.rb +122 -0
  72. data/lib/ronin/payloads/cli/generator/payload_types.rb +112 -0
  73. data/lib/ronin/payloads/cli/payload_command.rb +118 -0
  74. data/lib/ronin/payloads/cli/payload_methods.rb +118 -0
  75. data/lib/ronin/payloads/cli/printing.rb +75 -0
  76. data/lib/ronin/payloads/cli/ruby_shell.rb +52 -0
  77. data/lib/ronin/payloads/cli.rb +47 -0
  78. data/lib/ronin/payloads/coldfusion_payload.rb +47 -0
  79. data/lib/ronin/payloads/command_payload.rb +48 -0
  80. data/lib/ronin/payloads/encoders/builtin/html/encode.rb +60 -0
  81. data/lib/ronin/payloads/encoders/builtin/js/encode.rb +60 -0
  82. data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +60 -0
  83. data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +60 -0
  84. data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +59 -0
  85. data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +60 -0
  86. data/lib/ronin/payloads/encoders/encoder.rb +116 -0
  87. data/lib/ronin/payloads/encoders/exceptions.rb +45 -0
  88. data/lib/ronin/payloads/encoders/html_encoder.rb +33 -0
  89. data/lib/ronin/payloads/encoders/javascript_encoder.rb +33 -0
  90. data/lib/ronin/payloads/encoders/pipeline.rb +150 -0
  91. data/lib/ronin/payloads/encoders/powershell_encoder.rb +33 -0
  92. data/lib/ronin/payloads/encoders/registry.rb +34 -0
  93. data/lib/ronin/payloads/encoders/shell_encoder.rb +33 -0
  94. data/lib/ronin/payloads/encoders/sql_encoder.rb +33 -0
  95. data/lib/ronin/payloads/encoders/xml_encoder.rb +33 -0
  96. data/lib/ronin/payloads/encoders.rb +23 -0
  97. data/lib/ronin/payloads/exceptions.rb +53 -0
  98. data/lib/ronin/payloads/go_payload.rb +76 -0
  99. data/lib/ronin/payloads/html_payload.rb +51 -0
  100. data/lib/ronin/payloads/java_payload.rb +85 -0
  101. data/lib/ronin/payloads/javascript_payload.rb +51 -0
  102. data/lib/ronin/payloads/jsp_payload.rb +47 -0
  103. data/lib/ronin/payloads/metadata/arch.rb +87 -0
  104. data/lib/ronin/payloads/metadata/os.rb +121 -0
  105. data/lib/ronin/payloads/mixins/binary.rb +105 -0
  106. data/lib/ronin/payloads/mixins/bind_shell.rb +82 -0
  107. data/lib/ronin/payloads/mixins/build_dir.rb +61 -0
  108. data/lib/ronin/payloads/mixins/erb.rb +39 -0
  109. data/lib/ronin/payloads/mixins/network.rb +101 -0
  110. data/lib/ronin/payloads/mixins/post_ex.rb +49 -0
  111. data/lib/ronin/payloads/mixins/resolve_host.rb +149 -0
  112. data/lib/ronin/payloads/mixins/reverse_shell.rb +109 -0
  113. data/lib/ronin/payloads/mixins/tempfile.rb +64 -0
  114. data/lib/ronin/payloads/mixins/typescript.rb +76 -0
  115. data/lib/ronin/payloads/node_js_payload.rb +47 -0
  116. data/lib/ronin/payloads/payload.rb +429 -0
  117. data/lib/ronin/payloads/php_payload.rb +47 -0
  118. data/lib/ronin/payloads/powershell_payload.rb +50 -0
  119. data/lib/ronin/payloads/python_payload.rb +47 -0
  120. data/lib/ronin/payloads/registry.rb +33 -0
  121. data/lib/ronin/payloads/root.rb +29 -0
  122. data/lib/ronin/payloads/ruby_payload.rb +47 -0
  123. data/lib/ronin/payloads/rust_payload.rb +104 -0
  124. data/lib/ronin/payloads/shell_payload.rb +50 -0
  125. data/lib/ronin/payloads/shellcode/bind_shell_payload.rb +60 -0
  126. data/lib/ronin/payloads/shellcode/exec_shell_payload.rb +36 -0
  127. data/lib/ronin/payloads/shellcode/reverse_shell_payload.rb +112 -0
  128. data/lib/ronin/payloads/shellcode_payload.rb +135 -0
  129. data/lib/ronin/payloads/sql_payload.rb +50 -0
  130. data/lib/ronin/payloads/url_payload.rb +85 -0
  131. data/lib/ronin/payloads/version.rb +27 -0
  132. data/lib/ronin/payloads/xml_payload.rb +51 -0
  133. data/lib/ronin/payloads.rb +26 -0
  134. data/man/ronin-payloads-build.1 +65 -0
  135. data/man/ronin-payloads-build.1.md +48 -0
  136. data/man/ronin-payloads-encode.1 +53 -0
  137. data/man/ronin-payloads-encode.1.md +39 -0
  138. data/man/ronin-payloads-encoder.1 +41 -0
  139. data/man/ronin-payloads-encoder.1.md +30 -0
  140. data/man/ronin-payloads-encoders.1 +37 -0
  141. data/man/ronin-payloads-encoders.1.md +27 -0
  142. data/man/ronin-payloads-irb.1 +31 -0
  143. data/man/ronin-payloads-irb.1.md +22 -0
  144. data/man/ronin-payloads-launch.1 +45 -0
  145. data/man/ronin-payloads-launch.1.md +33 -0
  146. data/man/ronin-payloads-list.1 +37 -0
  147. data/man/ronin-payloads-list.1.md +27 -0
  148. data/man/ronin-payloads-new.1.md +46 -0
  149. data/man/ronin-payloads-show.1 +45 -0
  150. data/man/ronin-payloads-show.1.md +33 -0
  151. data/man/ronin-payloads.1 +67 -0
  152. data/man/ronin-payloads.1.md +50 -0
  153. data/ronin-payloads.gemspec +61 -0
  154. data/spec/asm_payload_spec.rb +114 -0
  155. data/spec/binary_payload_spec.rb +8 -0
  156. data/spec/builtin/cmd/awk/reverse_shell_spec.rb +38 -0
  157. data/spec/builtin/cmd/bash/reverse_shell_spec.rb +36 -0
  158. data/spec/builtin/cmd/lua/reverse_shell_spec.rb +38 -0
  159. data/spec/builtin/cmd/node/reverse_shell_spec.rb +36 -0
  160. data/spec/builtin/cmd/openssl/reverse_shell_spec.rb +38 -0
  161. data/spec/builtin/cmd/perl/reverse_shell_spec.rb +38 -0
  162. data/spec/builtin/cmd/php/reverse_shell_spec.rb +38 -0
  163. data/spec/builtin/cmd/powershell/reverse_shell_spec.rb +38 -0
  164. data/spec/builtin/cmd/python/reverse_shell_spec.rb +38 -0
  165. data/spec/builtin/cmd/ruby/reverse_shell_spec.rb +38 -0
  166. data/spec/builtin/java/reverse_shell_spec.rb +103 -0
  167. data/spec/builtin/php/cmd_exec.rb +52 -0
  168. data/spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb +58 -0
  169. data/spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb +46 -0
  170. data/spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb +63 -0
  171. data/spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb +46 -0
  172. data/spec/builtin/shellcode/linux/arm/bind_shell_spec.rb +62 -0
  173. data/spec/builtin/shellcode/linux/arm/exec_shell_spec.rb +46 -0
  174. data/spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb +58 -0
  175. data/spec/builtin/shellcode/linux/mips/bind_shell_spec.rb +60 -0
  176. data/spec/builtin/shellcode/linux/mips/exec_shell_spec.rb +46 -0
  177. data/spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb +58 -0
  178. data/spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb +46 -0
  179. data/spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb +87 -0
  180. data/spec/builtin/shellcode/linux/x86/bind_shell_spec.rb +60 -0
  181. data/spec/builtin/shellcode/linux/x86/exec_shell_spec.rb +46 -0
  182. data/spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb +58 -0
  183. data/spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb +60 -0
  184. data/spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb +46 -0
  185. data/spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb +58 -0
  186. data/spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb +46 -0
  187. data/spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb +58 -0
  188. data/spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb +46 -0
  189. data/spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb +63 -0
  190. data/spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb +58 -0
  191. data/spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb +46 -0
  192. data/spec/builtin/shellcode/windows/x86_64/cmd_spec.rb +54 -0
  193. data/spec/builtin/test/open_redirect_spec.rb +24 -0
  194. data/spec/builtin/test/xss_spec.rb +24 -0
  195. data/spec/c_payload_spec.rb +139 -0
  196. data/spec/cli/commands/show_spec.rb +21 -0
  197. data/spec/cli/encoder_methods_spec.rb +275 -0
  198. data/spec/cli/format_option_spec.rb +187 -0
  199. data/spec/cli/payload_command_spec.rb +68 -0
  200. data/spec/cli/payload_methods_spec.rb +208 -0
  201. data/spec/cli/printing_spec.rb +65 -0
  202. data/spec/cli/ruby_shell_spec.rb +14 -0
  203. data/spec/coldfusion_payload_spec.rb +8 -0
  204. data/spec/command_payload_spec.rb +8 -0
  205. data/spec/encoders/builtin/html/encode_spec.rb +17 -0
  206. data/spec/encoders/builtin/js/encode_spec.rb +17 -0
  207. data/spec/encoders/builtin/powershell/encode_spec.rb +17 -0
  208. data/spec/encoders/builtin/shell/encode_spec.rb +17 -0
  209. data/spec/encoders/builtin/sql/encode_spec.rb +17 -0
  210. data/spec/encoders/builtin/xml/encode_spec.rb +17 -0
  211. data/spec/encoders/encoder_spec.rb +62 -0
  212. data/spec/encoders/html_encoder_spec.rb +8 -0
  213. data/spec/encoders/javascript_encoder_spec.rb +8 -0
  214. data/spec/encoders/pipeline_spec.rb +153 -0
  215. data/spec/encoders/powershell_encoder_spec.rb +8 -0
  216. data/spec/encoders/shell_encoder_spec.rb +8 -0
  217. data/spec/encoders/sql_encoder_spec.rb +8 -0
  218. data/spec/encoders/xml_encoder_spec.rb +8 -0
  219. data/spec/encoders_spec.rb +25 -0
  220. data/spec/go_payload_spec.rb +56 -0
  221. data/spec/helpers/encoders.rb +9 -0
  222. data/spec/helpers/payloads.rb +9 -0
  223. data/spec/helpers/scripts/payloads/simple.rb +22 -0
  224. data/spec/html_payload_spec.rb +12 -0
  225. data/spec/java_payload_spec.rb +97 -0
  226. data/spec/javascript_payload_spec.rb +12 -0
  227. data/spec/jsp_payload_spec.rb +8 -0
  228. data/spec/metadata/arch_spec.rb +82 -0
  229. data/spec/metadata/os_spec.rb +164 -0
  230. data/spec/mixins/binary_spec.rb +129 -0
  231. data/spec/mixins/bind_shell_spec.rb +73 -0
  232. data/spec/mixins/build_dir.rb +64 -0
  233. data/spec/mixins/erb_spec.rb +19 -0
  234. data/spec/mixins/network_spec.rb +75 -0
  235. data/spec/mixins/post_ex_spec.rb +40 -0
  236. data/spec/mixins/resolve_host_spec.rb +322 -0
  237. data/spec/mixins/reverse_shell_spec.rb +103 -0
  238. data/spec/mixins/tempfile_spec.rb +97 -0
  239. data/spec/mixins/typescript_spec.rb +92 -0
  240. data/spec/node_js_payload_spec.rb +8 -0
  241. data/spec/payload_spec.rb +288 -0
  242. data/spec/payloads_spec.rb +29 -0
  243. data/spec/php_payload_spec.rb +8 -0
  244. data/spec/powershell_payload_spec.rb +16 -0
  245. data/spec/python_payload_spec.rb +8 -0
  246. data/spec/ruby_payload_spec.rb +8 -0
  247. data/spec/rust_payload_spec.rb +116 -0
  248. data/spec/shell_payload_spec.rb +16 -0
  249. data/spec/shellcode/bind_shell_payload_spec.rb +42 -0
  250. data/spec/shellcode/exec_shell_payload_spec.rb +8 -0
  251. data/spec/shellcode/reverse_shell_payload_spec.rb +136 -0
  252. data/spec/shellcode_payload_spec.rb +38 -0
  253. data/spec/spec_helper.rb +7 -0
  254. data/spec/sql_payload_spec.rb +12 -0
  255. data/spec/url_payload_spec.rb +72 -0
  256. data/spec/xml_payload_spec.rb +12 -0
  257. metadata +489 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '091b13b85289fe416e23efce5cfa61aca77ca30038dda7a4581b31df6e367f7e'
4
+ data.tar.gz: c923cf0ab8a20cef71e42c18a6c8fee24febeb705e151c3ee8cd646e594ecbd8
5
+ SHA512:
6
+ metadata.gz: 258177c91963ec039c2671970a12592a6785fb57d9729ca3e04e41a08a6ba5bd12d1fa8f5e3d1156f475c18b27ed11ff062fe19a453e2227d03f0be22d904462
7
+ data.tar.gz: c8cca1cb3156ec2550c26035d856ed26af8e2c6588a7b13150d4d6d2b8ca66578495e1db1a8bc35884e11f0910c74ae01c133294a2c20f15edb71997d123f036
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ -
3
+ ChangeLog.md
4
+ COPYING.txt
5
+ man/*.md
@@ -0,0 +1,31 @@
1
+ name: CI
2
+
3
+ on: [ push, pull_request ]
4
+
5
+ jobs:
6
+ tests:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby:
12
+ - '3.0'
13
+ - '3.1'
14
+ - '3.2'
15
+ # - jruby
16
+ - truffleruby
17
+ name: Ruby ${{ matrix.ruby }}
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ - name: Install dependencies
25
+ run: |
26
+ sudo apt update -y && \
27
+ sudo apt install -y --no-install-recommends --no-install-suggests yasm default-jdk
28
+ - name: Install dependencies
29
+ run: bundle install --jobs 4 --retry 3
30
+ - name: Run tests
31
+ run: bundle exec rake test
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /coverage
2
+ /doc
3
+ /pkg
4
+ /man/*.[1-9]
5
+ /vendor/bundle
6
+ /Gemfile.lock
7
+ /.bundle
8
+ /.yardoc
9
+ .DS_Store
10
+ *.db
11
+ *.log
12
+ *.swp
13
+ *~
14
+ *.class
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour --format documentation
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-3.1
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --markup markdown --title 'ronin-payloads Documentation' --protected
data/COPYING.txt ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
data/ChangeLog.md ADDED
@@ -0,0 +1,48 @@
1
+ ### 0.1.0 / 2023-XX-XX
2
+
3
+ * Initial release:
4
+ * Require `ruby` >= 3.0.0.
5
+ * Provides a succinct syntax and API for writing payloads in as few lines as
6
+ possible.
7
+ * Supports defining Payloads as plain old Ruby classes.
8
+ * Provides base classes for a variety of languages and payload types
9
+ (ASM, Shellcode, C, Go, Rust, Java, JSP, PHP, Python, Ruby, NodeJS, Shell,
10
+ PowerShell, SQL, XML, HTML, URL).
11
+ * Provides built-in common payloads:
12
+ * Command-line reverse shells:
13
+ * Awk
14
+ * Bash
15
+ * Lua
16
+ * NodeJS
17
+ * OpenSSL
18
+ * Perl
19
+ * PHP
20
+ * PowerShell
21
+ * Python
22
+ * Ruby
23
+ * Java
24
+ * Reverse shell
25
+ * PHP
26
+ * Command exec.
27
+ * Shellcode:
28
+ * `execve(/bin/sh)`:
29
+ * Linux (ARM, MIPS, PPC, x86, x86-64)
30
+ * FreeBSD (x86, x86-64)
31
+ * macOS (x86-64)
32
+ * NetBSD (x86)
33
+ * OpenBSD (x86)
34
+ * bind shell:
35
+ * Linux (ARM, MIPS, x86, x86-64)
36
+ * FreeBSD (x86)
37
+ * OpenBSD (x86)
38
+ * reverse shell:
39
+ * Linux (ARM, MIPS, PPC, x86, x86-64)
40
+ * macOS (x86-64)
41
+ * FreeBSD (x86)
42
+ * NetBSD (x86)
43
+ * Supports adding additional encoders to payloads for further obfuscation.
44
+ * Integrates with the [Ronin Post-Exploitation][ronin-post_ex] library.
45
+ * Provides a simple CLI for building, encoding, launching, and generating new
46
+ payloads.
47
+
48
+ [ronin-post_ex]: https://github.com/ronin-rb/ronin-post_ex#readme
data/Gemfile ADDED
@@ -0,0 +1,46 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'jruby-openssl', '~> 0.7', platforms: :jruby
6
+
7
+ # gem 'fake_io', '~> 0.1', github: 'postmodern/fake_io.rb',
8
+ # branch: 'main'
9
+
10
+ # gem 'command_kit', '~> 0.4', github: 'postmodern/command_kit.rb',
11
+ # branch: 'main'
12
+
13
+ # Ronin dependencies
14
+ # gem 'ronin-support', '~> 1.0', github: "ronin-rb/ronin-support",
15
+ # branch: 'main'
16
+
17
+ # gem 'ronin-code-asm', '~> 1.0', github: "ronin-rb/ronin-code-asm",
18
+ # branch: 'main'
19
+
20
+ # gem 'ronin-post_ex', '~> 0.1', github: "ronin-rb/ronin-post_ex",
21
+ # branch: 'main'
22
+
23
+ # gem 'ronin-core', '~> 0.1', github: "ronin-rb/ronin-core",
24
+ # branch: 'main'
25
+
26
+ # gem 'ronin-repos', '~> 0.1', github: "ronin-rb/ronin-repos",
27
+ # branch: 'main'
28
+
29
+ group :development do
30
+ gem 'rake'
31
+ gem 'rubygems-tasks', '~> 0.2'
32
+
33
+ gem 'rspec', '~> 3.0'
34
+ gem 'simplecov', '~> 0.20'
35
+
36
+ gem 'kramdown', '~> 2.0'
37
+ gem 'kramdown-man', '~> 0.1'
38
+
39
+ gem 'redcarpet', platform: :mri
40
+ gem 'yard', '~> 0.9'
41
+ gem 'yard-spellcheck', require: false
42
+
43
+ gem 'dead_end', require: false
44
+ gem 'sord', require: false
45
+ gem 'stackprof', require: false
46
+ end