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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2ab679d7311dab9baaff45c264e2a651a09530b5790eed2611060b66e776585
|
4
|
+
data.tar.gz: 7058d3c5e5f25f947e46cc651f4d7de2e7e3878578be2b0cb778f35864f2fdfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42c63a5fd2d02b157947de808e394fc60f052c22700b073cc632b9c32f40bec44570d09b0141bcfc97dfe28634869cf1e6c2367b62285ec38896b053d66444b
|
7
|
+
data.tar.gz: d87cfacd3e70ad04e553644d0956653ec6b9a6673645dddd14ac63c4699e9fe1f30b98224f0c665035950fe1578a7689e21650438f88eb8c15e1491a7ce704e2
|
data/.github/workflows/ruby.yml
CHANGED
@@ -12,7 +12,7 @@ jobs:
|
|
12
12
|
- '3.0'
|
13
13
|
- '3.1'
|
14
14
|
- '3.2'
|
15
|
-
|
15
|
+
- jruby
|
16
16
|
- truffleruby
|
17
17
|
name: Ruby ${{ matrix.ruby }}
|
18
18
|
steps:
|
@@ -30,3 +30,17 @@ jobs:
|
|
30
30
|
run: bundle install --jobs 4 --retry 3
|
31
31
|
- name: Run tests
|
32
32
|
run: bundle exec rake test
|
33
|
+
|
34
|
+
# rubocop linting
|
35
|
+
rubocop:
|
36
|
+
runs-on: ubuntu-latest
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v2
|
39
|
+
- name: Set up Ruby
|
40
|
+
uses: ruby/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: 3.0
|
43
|
+
- name: Install dependencies
|
44
|
+
run: bundle install --jobs 4 --retry 3
|
45
|
+
- name: Run rubocop
|
46
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 3.1
|
5
|
+
|
6
|
+
inherit_gem:
|
7
|
+
rubocop-ronin: rubocop.yml
|
8
|
+
|
9
|
+
#
|
10
|
+
# ronin-payload specific exceptions:
|
11
|
+
#
|
12
|
+
Layout/ArgumentAlignment: { Exclude: ['spec/rust_payload_spec.rb'] }
|
13
|
+
|
14
|
+
# the placeholder API methods are meant to be empty
|
15
|
+
Style/EmptyMethod:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/ronin/payloads/payload.rb'
|
18
|
+
- 'spec/**/*'
|
19
|
+
|
20
|
+
# rubocop does not support constants that contain multiple numbers
|
21
|
+
Naming/ClassAndModuleCamelCase:
|
22
|
+
AllowedNames:
|
23
|
+
- X86_64
|
24
|
+
|
25
|
+
# robucop mistakes :x86_64 for a "symbol number"
|
26
|
+
Naming/VariableNumber:
|
27
|
+
AllowedIdentifiers:
|
28
|
+
- x86_64
|
29
|
+
|
30
|
+
# this is a bug in rubocop
|
31
|
+
Style/FormatStringToken:
|
32
|
+
Exclude:
|
33
|
+
- 'lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb'
|
34
|
+
- 'spec/builtin/cmd/powershell/reverse_shell_spec.rb'
|
35
|
+
|
36
|
+
# rubocop does not recognize empty-line continuations
|
37
|
+
Style/RedundantLineContinuation:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/ronin/payloads/builtin/shellcode/**/*.rb'
|
40
|
+
Layout/LineContinuationSpacing:
|
41
|
+
Exclude:
|
42
|
+
- 'lib/ronin/payloads/builtin/shellcode/**/*.rb'
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,27 @@
|
|
1
|
-
### 0.1.
|
1
|
+
### 0.1.2 / 2023-06-09
|
2
|
+
|
3
|
+
* Add missing `require` for {Ronin::Payloads::Encoders::Encoder}.
|
4
|
+
* Added missing descriptions to built-in payloads (@ervinismu).
|
5
|
+
* Documentation fixes and improvements.
|
6
|
+
|
7
|
+
#### CLI
|
8
|
+
|
9
|
+
* Fixed the placeholder `references` URLs in the `ronin-payloads new` template.
|
10
|
+
* Fixed `--format html` and `--format xml` to encode every character.
|
11
|
+
|
12
|
+
### 0.1.1 / 2023-03-01
|
13
|
+
|
14
|
+
* Default the `host` param defined by {Ronin::Payloads::Mixins::BindShell} to
|
15
|
+
`0.0.0.0`.
|
16
|
+
|
17
|
+
#### CLI
|
18
|
+
|
19
|
+
* Fixed multiple bugs in the `--param` option of the `ronin-payloads encode`
|
20
|
+
comand.
|
21
|
+
* Fixed multiple bugs in the `--encoder-param` option of
|
22
|
+
the `ronin-payloads build` command.
|
23
|
+
|
24
|
+
### 0.1.0 / 2023-02-01
|
2
25
|
|
3
26
|
* Initial release:
|
4
27
|
* Require `ruby` >= 3.0.0.
|
data/Gemfile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
source 'https://rubygems.org'
|
2
3
|
|
3
4
|
gemspec
|
@@ -11,19 +12,19 @@ gem 'jruby-openssl', '~> 0.7', platforms: :jruby
|
|
11
12
|
# branch: 'main'
|
12
13
|
|
13
14
|
# Ronin dependencies
|
14
|
-
# gem 'ronin-support', '~> 1.0', github:
|
15
|
+
# gem 'ronin-support', '~> 1.0', github: 'ronin-rb/ronin-support',
|
15
16
|
# branch: 'main'
|
16
17
|
|
17
|
-
# gem 'ronin-code-asm', '~> 1.0', github:
|
18
|
+
# gem 'ronin-code-asm', '~> 1.0', github: 'ronin-rb/ronin-code-asm',
|
18
19
|
# branch: 'main'
|
19
20
|
|
20
|
-
# gem 'ronin-post_ex', '~> 0.1', github:
|
21
|
+
# gem 'ronin-post_ex', '~> 0.1', github: 'ronin-rb/ronin-post_ex',
|
21
22
|
# branch: 'main'
|
22
23
|
|
23
|
-
# gem 'ronin-core', '~> 0.1', github:
|
24
|
+
# gem 'ronin-core', '~> 0.1', github: 'ronin-rb/ronin-core',
|
24
25
|
# branch: 'main'
|
25
26
|
|
26
|
-
# gem 'ronin-repos', '~> 0.1', github:
|
27
|
+
# gem 'ronin-repos', '~> 0.1', github: 'ronin-rb/ronin-repos',
|
27
28
|
# branch: 'main'
|
28
29
|
|
29
30
|
group :development do
|
@@ -41,6 +42,8 @@ group :development do
|
|
41
42
|
gem 'yard-spellcheck', require: false
|
42
43
|
|
43
44
|
gem 'dead_end', require: false
|
44
|
-
gem 'sord', require: false
|
45
|
-
gem 'stackprof', require: false
|
45
|
+
gem 'sord', require: false, platform: :mri
|
46
|
+
gem 'stackprof', require: false, platform: :mri
|
47
|
+
gem 'rubocop', require: false, platform: :mri
|
48
|
+
gem 'rubocop-ronin', require: false, platform: :mri
|
46
49
|
end
|
data/Rakefile
CHANGED
data/bin/ronin-payloads
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
#
|
3
4
|
# ronin-payloads - A Ruby micro-framework for writing and running exploit
|
4
5
|
# payloads.
|
@@ -22,13 +23,11 @@
|
|
22
23
|
root = File.expand_path(File.join(File.dirname(__FILE__),'..'))
|
23
24
|
if File.file?(File.join(root,'Gemfile.lock'))
|
24
25
|
Dir.chdir(root) do
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
exit -1
|
31
|
-
end
|
26
|
+
require 'bundler/setup'
|
27
|
+
rescue LoadError => e
|
28
|
+
warn e.message
|
29
|
+
warn "Run `gem install bundler` to install Bundler"
|
30
|
+
exit(-1)
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
data/examples/bin_sh.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
#!/usr/bin/env -S ronin-payloads build -f
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'ronin/payloads/shellcode_payload'
|
4
5
|
|
5
6
|
module Ronin
|
6
7
|
module Payloads
|
8
|
+
#
|
9
|
+
# An example `execve()` `/bin/sh` shellcode payload.
|
10
|
+
#
|
7
11
|
class BinSh < ShellcodePayload
|
8
12
|
|
9
13
|
register 'examples/bin_sh'
|
@@ -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.
|
@@ -32,9 +33,9 @@ module Ronin
|
|
32
33
|
|
33
34
|
summary 'PHP command exec payload'
|
34
35
|
description <<~DESC
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
A basic injectable PHP payload which executes a command passed in via a
|
37
|
+
URL query parameter. The output of the commend will be returned in the
|
38
|
+
response body wrapped in `<exec>...</exec>` tags.
|
38
39
|
DESC
|
39
40
|
|
40
41
|
param :query_param, String, default: 'cmd',
|
@@ -40,9 +40,9 @@ module Ronin
|
|
40
40
|
|
41
41
|
summary 'Linux PPC reverse shell shellcode'
|
42
42
|
description <<~DESC
|
43
|
-
|
43
|
+
Linux PPC shellcode that spawns a connect back reverse shell.
|
44
44
|
|
45
|
-
|
45
|
+
Note: disabling with_stderr will save 16 bytes, but lose stderr.
|
46
46
|
DESC
|
47
47
|
|
48
48
|
references [
|
@@ -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
|
-
|
44
|
+
Windows x86-64 shellcode that executes "cmd"
|
45
45
|
DESC
|
46
46
|
|
47
47
|
references [
|