ronin-payloads 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +15 -1
- data/.rubocop.yml +37 -0
- data/ChangeLog.md +13 -1
- data/Gemfile +5 -2
- data/Rakefile +3 -1
- data/bin/ronin-payloads +6 -7
- data/examples/bin_sh.rb +4 -0
- data/lib/ronin/payloads/asm_payload.rb +1 -1
- data/lib/ronin/payloads/builtin/php/cmd_exec.rb +4 -3
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/freebsd/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/arm/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/ppc/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/ppc/reverse_shell.rb +2 -2
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/shellcode/windows/x86_64/cmd.rb +2 -2
- data/lib/ronin/payloads/builtin/test/open_redirect.rb +3 -3
- data/lib/ronin/payloads/builtin/test/xss.rb +3 -3
- data/lib/ronin/payloads/c_payload.rb +1 -1
- data/lib/ronin/payloads/cli/commands/build.rb +10 -12
- data/lib/ronin/payloads/cli/commands/encode.rb +16 -20
- data/lib/ronin/payloads/cli/commands/launch.rb +2 -2
- data/lib/ronin/payloads/cli/commands/new.rb +1 -1
- data/lib/ronin/payloads/cli/commands/show.rb +1 -0
- data/lib/ronin/payloads/cli/encoder_methods.rb +1 -0
- data/lib/ronin/payloads/cli/generator/payload_types.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/html/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/js/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +1 -0
- data/lib/ronin/payloads/encoders/encoder.rb +2 -1
- data/lib/ronin/payloads/encoders/exceptions.rb +1 -0
- data/lib/ronin/payloads/encoders/html_encoder.rb +1 -0
- data/lib/ronin/payloads/encoders/javascript_encoder.rb +1 -0
- data/lib/ronin/payloads/encoders/pipeline.rb +1 -0
- data/lib/ronin/payloads/encoders/powershell_encoder.rb +1 -0
- data/lib/ronin/payloads/encoders/registry.rb +4 -0
- data/lib/ronin/payloads/encoders/shell_encoder.rb +1 -0
- data/lib/ronin/payloads/encoders/sql_encoder.rb +1 -0
- data/lib/ronin/payloads/encoders/xml_encoder.rb +1 -0
- data/lib/ronin/payloads/exceptions.rb +1 -0
- data/lib/ronin/payloads/go_payload.rb +1 -1
- data/lib/ronin/payloads/java_payload.rb +1 -1
- data/lib/ronin/payloads/metadata/arch.rb +1 -0
- data/lib/ronin/payloads/metadata/os.rb +1 -0
- data/lib/ronin/payloads/mixins/bind_shell.rb +2 -2
- data/lib/ronin/payloads/mixins/post_ex.rb +0 -1
- data/lib/ronin/payloads/mixins/reverse_shell.rb +0 -1
- data/lib/ronin/payloads/mixins/typescript.rb +1 -2
- data/lib/ronin/payloads/payload.rb +7 -7
- data/lib/ronin/payloads/registry.rb +3 -0
- data/lib/ronin/payloads/rust_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode_payload.rb +8 -8
- data/lib/ronin/payloads/url_payload.rb +1 -1
- data/lib/ronin/payloads/version.rb +1 -1
- data/lib/ronin/payloads.rb +1 -0
- data/man/ronin-payloads-build.1 +1 -1
- data/man/ronin-payloads-build.1.md +1 -1
- data/man/ronin-payloads-encode.1 +1 -1
- data/man/ronin-payloads-encode.1.md +1 -1
- data/man/ronin-payloads-encoder.1 +1 -1
- data/man/ronin-payloads-encoder.1.md +1 -1
- data/man/ronin-payloads-encoders.1 +1 -1
- data/man/ronin-payloads-encoders.1.md +1 -1
- data/man/ronin-payloads-irb.1 +1 -1
- data/man/ronin-payloads-irb.1.md +1 -1
- data/man/ronin-payloads-launch.1 +1 -1
- data/man/ronin-payloads-launch.1.md +1 -1
- data/man/ronin-payloads-list.1 +1 -1
- data/man/ronin-payloads-list.1.md +1 -1
- data/man/ronin-payloads.1 +1 -1
- data/man/ronin-payloads.1.md +1 -1
- data/ronin-payloads.gemspec +3 -4
- metadata +3 -2
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
3
4
|
# payloads.
|
@@ -23,6 +24,9 @@ require 'ronin/repos/class_dir'
|
|
23
24
|
|
24
25
|
module Ronin
|
25
26
|
module Payloads
|
27
|
+
#
|
28
|
+
# Defines encoders for different types of payloads.
|
29
|
+
#
|
26
30
|
module Encoders
|
27
31
|
include Core::ClassRegistry
|
28
32
|
include Repos::ClassDir
|
@@ -40,8 +40,8 @@ module Ronin
|
|
40
40
|
# @api private
|
41
41
|
#
|
42
42
|
def self.included(payload)
|
43
|
-
payload.param :host, String,
|
44
|
-
desc:
|
43
|
+
payload.param :host, String, default: '0.0.0.0',
|
44
|
+
desc: 'The host to connect to'
|
45
45
|
|
46
46
|
payload.param :port, Integer, required: true,
|
47
47
|
desc: 'The port to listen on'
|
@@ -28,7 +28,6 @@ module Ronin
|
|
28
28
|
# A mixin for compiling TypeScript into JavaScript.
|
29
29
|
#
|
30
30
|
module TypeScript
|
31
|
-
|
32
31
|
#
|
33
32
|
# The default `tsc` compiler.
|
34
33
|
#
|
@@ -46,7 +45,7 @@ module Ronin
|
|
46
45
|
#
|
47
46
|
def self.included(payload_class)
|
48
47
|
payload_class.param :tsc, required: true,
|
49
|
-
default: ->{ tsc },
|
48
|
+
default: -> { tsc },
|
50
49
|
desc: 'The TypeScript compiler to use'
|
51
50
|
end
|
52
51
|
|
@@ -60,21 +60,21 @@ module Ronin
|
|
60
60
|
# module Ronin
|
61
61
|
# module Payloads
|
62
62
|
# class MyPayload < Payload
|
63
|
-
#
|
63
|
+
#
|
64
64
|
# register 'my_payload'
|
65
|
-
#
|
65
|
+
#
|
66
66
|
# summary 'My first payload'
|
67
67
|
# description <<~EOS
|
68
68
|
# This is my first payload.
|
69
69
|
# Bla bla bla bla.
|
70
70
|
# EOS
|
71
|
-
#
|
71
|
+
#
|
72
72
|
# author 'John Smith'
|
73
73
|
# author 'John Smith', email: '...', twitter: '...'
|
74
|
-
#
|
74
|
+
#
|
75
75
|
# param :foo, desc: 'Simple param'
|
76
76
|
# param :bar, Integer, desc: 'A param iwth a typo'
|
77
|
-
#
|
77
|
+
#
|
78
78
|
# def build
|
79
79
|
# @payload = "..."
|
80
80
|
# end
|
@@ -90,7 +90,7 @@ module Ronin
|
|
90
90
|
# def cleanup
|
91
91
|
# # ...
|
92
92
|
# end
|
93
|
-
#
|
93
|
+
#
|
94
94
|
# end
|
95
95
|
# end
|
96
96
|
# end
|
@@ -178,7 +178,7 @@ module Ronin
|
|
178
178
|
def initialize(encoders: nil, **kwargs)
|
179
179
|
super(**kwargs)
|
180
180
|
|
181
|
-
@encoders = Encoders::Pipeline.new
|
181
|
+
@encoders = Encoders::Pipeline.new
|
182
182
|
|
183
183
|
if encoders
|
184
184
|
encoders.each do |encoder|
|
@@ -33,21 +33,21 @@ module Ronin
|
|
33
33
|
#
|
34
34
|
# #!/usr/bin/env -S ronin-payload build -f
|
35
35
|
# require 'ronin/payloads/shellcode_payload'
|
36
|
-
#
|
36
|
+
#
|
37
37
|
# module Ronin
|
38
38
|
# module Payloads
|
39
39
|
# class LinuxX86BinSh < ShellcodePayload
|
40
|
-
#
|
40
|
+
#
|
41
41
|
# register 'shellcode/linux/x86/bin_sh'
|
42
42
|
#
|
43
43
|
# summary 'x86 Linux /bin/sh shellcode'
|
44
44
|
# description <<~EOS
|
45
45
|
# Shellcode that spawns a local /bin/sh shell
|
46
46
|
# EOS
|
47
|
-
#
|
47
|
+
#
|
48
48
|
# arch :x86
|
49
49
|
# os :linux
|
50
|
-
#
|
50
|
+
#
|
51
51
|
# def build
|
52
52
|
# @payload = "1\xc0Ph//shh/bin\x89\xdcPS\x89\xcc1\xd2\xcd\x0b"
|
53
53
|
# end
|
@@ -59,21 +59,21 @@ module Ronin
|
|
59
59
|
#
|
60
60
|
# #!/usr/bin/env -S ronin-payload build -f
|
61
61
|
# require 'ronin/payloads/shellcode_payload'
|
62
|
-
#
|
62
|
+
#
|
63
63
|
# module Ronin
|
64
64
|
# module Payloads
|
65
65
|
# class LinuxX86BinSh < ShellcodePayload
|
66
|
-
#
|
66
|
+
#
|
67
67
|
# register 'shellcode/linux/x86/bin_sh'
|
68
68
|
#
|
69
69
|
# summary 'x86 Linux /bin/sh shellcode'
|
70
70
|
# description <<~EOS
|
71
71
|
# Shellcode that spawns a local /bin/sh shell
|
72
72
|
# EOS
|
73
|
-
#
|
73
|
+
#
|
74
74
|
# arch :x86
|
75
75
|
# os :linux
|
76
|
-
#
|
76
|
+
#
|
77
77
|
# def build
|
78
78
|
# shellcode do
|
79
79
|
# xor eax, eax
|
data/lib/ronin/payloads.rb
CHANGED
data/man/ronin-payloads-build.1
CHANGED
data/man/ronin-payloads-encode.1
CHANGED
data/man/ronin-payloads-irb.1
CHANGED
data/man/ronin-payloads-irb.1.md
CHANGED
data/man/ronin-payloads-launch.1
CHANGED
data/man/ronin-payloads-list.1
CHANGED
data/man/ronin-payloads.1
CHANGED
data/man/ronin-payloads.1.md
CHANGED
data/ronin-payloads.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
3
2
|
require 'yaml'
|
4
3
|
|
5
4
|
Gem::Specification.new do |gem|
|
@@ -22,7 +21,7 @@ Gem::Specification.new do |gem|
|
|
22
21
|
gem.homepage = gemspec['homepage']
|
23
22
|
gem.metadata = gemspec['metadata'] if gemspec['metadata']
|
24
23
|
|
25
|
-
glob =
|
24
|
+
glob = ->(patterns) { gem.files & Dir[*patterns] }
|
26
25
|
|
27
26
|
gem.files = `git ls-files`.split($/)
|
28
27
|
gem.files = glob[gemspec['files']] if gemspec['files']
|
@@ -46,7 +45,7 @@ Gem::Specification.new do |gem|
|
|
46
45
|
gem.required_rubygems_version = gemspec['required_rubygems_version']
|
47
46
|
gem.post_install_message = gemspec['post_install_message']
|
48
47
|
|
49
|
-
split =
|
48
|
+
split = ->(string) { string.split(/,\s*/) }
|
50
49
|
|
51
50
|
if gemspec['dependencies']
|
52
51
|
gemspec['dependencies'].each do |name,versions|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-payloads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02
|
11
|
+
date: 2023-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ronin-support
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- ".github/workflows/ruby.yml"
|
112
112
|
- ".gitignore"
|
113
113
|
- ".rspec"
|
114
|
+
- ".rubocop.yml"
|
114
115
|
- ".ruby-version"
|
115
116
|
- ".yardopts"
|
116
117
|
- COPYING.txt
|