Class: Ronin::Payloads::Shellcode::ReverseShellPayload
- Inherits:
-
Ronin::Payloads::ShellcodePayload
- Object
- Payload
- BinaryPayload
- ASMPayload
- Ronin::Payloads::ShellcodePayload
- Ronin::Payloads::Shellcode::ReverseShellPayload
- Includes:
- Mixins::Network, Mixins::ResolveHost, Mixins::ReverseShell
- Defined in:
- lib/ronin/payloads/shellcode/reverse_shell_payload.rb
Overview
Base class for all reverse shell shellcode payloads.
Direct Known Subclasses
FreeBSD::X86::ReverseShell, Linux::ARM::ReverseShell, Linux::MIPS::ReverseShell, Linux::PPC::ReverseShell, Linux::X86::ReverseShell, Linux::X86_64::ReverseShell, MacOS::X86_64::ReverseShell, NetBSD::X86::ReverseShell
Instance Attribute Summary
Attributes included from Mixins::PostEx
Attributes inherited from Payload
Instance Method Summary collapse
-
#packed_ipv4(**kwargs) ⇒ String
The reverse shell host's packed IPv4 address in network byte-order.
-
#packed_ipv6(**kwargs) ⇒ String
The reverse shell host's packed IPv6 address in network byte-order.
-
#packed_port(**kwargs) ⇒ String
The reverse shell's packed port number in network byte-order.
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
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
#build, #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
#packed_ipv4(**kwargs) ⇒ String
The reverse shell host's packed IPv4 address in network byte-order.
57 58 59 60 61 62 63 |
# File 'lib/ronin/payloads/shellcode/reverse_shell_payload.rb', line 57 def packed_ipv4(**kwargs) unless (ip = host_ipv4_address) raise(BuildFailed,"host name has no IPv4 addresses: #{params[:host].inspect}") end pack_ipv4(ip,**kwargs) end |
#packed_ipv6(**kwargs) ⇒ String
The reverse shell host's packed IPv6 address in network byte-order.
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/ronin/payloads/shellcode/reverse_shell_payload.rb', line 81 def packed_ipv6(**kwargs) unless (ip = host_ipv6_address) unless (ip = host_ipv4_address) raise(BuildFailed,"host name has no IP addresses: #{params[:host].inspect}") end ip = "::ffff:#{ip}" end pack_ipv6(ip,**kwargs) end |
#packed_port(**kwargs) ⇒ String
The reverse shell's packed port number in network byte-order.
105 106 107 |
# File 'lib/ronin/payloads/shellcode/reverse_shell_payload.rb', line 105 def packed_port(**kwargs) pack_port(port,**kwargs) end |