Class: Wpxf::Payloads::MeterpreterBindTcp
Overview
A Meterpreter bind TCP payload generator.
Instance Attribute Summary
Attributes included from Options
#datastore, #options
#queued_commands
Instance Method Summary
collapse
Methods included from Options
#all_options_valid?, #get_option, #get_option_value, #missing_options, #normalized_option_value, #option_valid?, #option_value?, #register_advanced_options, #register_evasion_options, #register_option, #register_options, #scoped_option_change, #set_option_value, #unregister_option, #unset_option
Methods included from Wpxf
app_path, build_module_list, change_stdout_sync, custom_modules_path, data_directory, databases_path, gemspec, home_directory, load_custom_modules, load_module, modules_path, payloads_path, version
#check, #cleanup, #encoded, #enqueue_command, #escape_single_quotes, #generate_vars, #php_preamble, #post_exploit, #prepare, #random_var_name
Constructor Details
Returns a new instance of MeterpreterBindTcp.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 9
def initialize
super
register_options([
StringOption.new(
name: 'rhost',
required: true,
desc: 'The address of the host listening for a connection'
),
PortOption.new(
name: 'lport',
required: true,
default: 4444,
desc: 'The port being used to listen for incoming connections'
),
BooleanOption.new(
name: 'use_ipv6',
required: true,
default: false,
desc: 'Bind to an IPv6 address'
)
])
end
|
Instance Method Details
#constants ⇒ Object
53
54
55
56
57
58
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 53
def constants
{
'ip' => host,
'port' => lport
}
end
|
#host ⇒ Object
33
34
35
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 33
def host
escape_single_quotes(datastore['rhost'])
end
|
#lport ⇒ Object
37
38
39
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 37
def lport
normalized_option_value('lport')
end
|
#obfuscated_variables ⇒ Object
60
61
62
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 60
def obfuscated_variables
super + %w[ip port srvsock s_type s res b a len suhosin_bypass]
end
|
#raw ⇒ Object
45
46
47
48
49
50
51
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 45
def raw
if use_ipv6
DataFile.new('php', 'meterpreter_bind_tcp_ipv6.php').php_content
else
DataFile.new('php', 'meterpreter_bind_tcp.php').php_content
end
end
|
#use_ipv6 ⇒ Object
41
42
43
|
# File 'lib/wpxf/payloads/meterpreter_bind_tcp.rb', line 41
def use_ipv6
normalized_option_value('use_ipv6')
end
|