Skip to content

Commit 8d640a0

Browse files
committed
Land rapid7#5527, multi/handler -> exploit/multi/handler
2 parents 907f596 + 6dcc9b7 commit 8d640a0

File tree

16 files changed

+134
-135
lines changed

16 files changed

+134
-135
lines changed

lib/msf/core/db_manager/session.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def create_mdm_session_from_session(opts)
191191
via_payload: session.via_payload,
192192
}
193193

194-
# In the case of multi handler we cannot yet determine the true
194+
# In the case of exploit/multi/handler we cannot yet determine the true
195195
# exploit responsible. But we can at least show the parent versus
196196
# just the generic handler:
197197
if session.via_exploit == "exploit/multi/handler" and sess_data[:datastore]['ParentModule']

lib/msf/core/exploit/http/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def get_uri(cli=self.cli)
497497
# bind payload but there's nothing we can do about it.
498498
#
499499
# NOTE: The address will be *incorrect* in the following two situations:
500-
# 1. LHOST is pointed at a multi/handler on some other box.
500+
# 1. LHOST is pointed at a exploit/multi/handler on some other box.
501501
# 2. SRVHOST has a value of '0.0.0.0', the user is behind NAT, and we're
502502
# using a bind payload. In that case, we don't have an LHOST and
503503
# the source address will be internal.

modules/exploits/windows/browser/persits_xupload_traversal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(info = {})
2121
an attacker is able to write arbitrary files to arbitrary locations on disk.
2222
2323
Code execution occurs by writing to the All Users Startup Programs directory.
24-
You may want to combine this module with the use of multi/handler since a
24+
You may want to combine this module with the use of exploit/multi/handler since a
2525
user would have to log for the payload to execute.
2626
},
2727
'License' => MSF_LICENSE,

modules/exploits/windows/mssql/mssql_linkcrawler.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(info = {})
2424
2525
If you are attempting to obtain multiple reverse shells using this module we
2626
recommend setting the "DisablePayloadHandler" advanced option to "true", and setting
27-
up a multi/handler to run in the background as a job to support multiple incoming
27+
up a exploit/multi/handler to run in the background as a job to support multiple incoming
2828
shells.
2929
3030
If you are interested in deploying payloads to spefic servers this module also
@@ -89,17 +89,17 @@ def exploit
8989

9090
# Define master array to keep track of enumerated database information
9191
masterList = Array.new
92-
masterList[0] = Hash.new # Define new hash
93-
masterList[0]["name"] = "" # Name of the current database server
94-
masterList[0]["db_link"] = "" # Name of the linked database server
95-
masterList[0]["db_user"] = "" # User configured on the database server link
96-
masterList[0]["db_sysadmin"] = "" # Specifies if the database user configured for the link has sysadmin privileges
97-
masterList[0]["db_version"] = "" # Database version of the linked database server
98-
masterList[0]["db_os"] = "" # OS of the linked database server
99-
masterList[0]["path"] = [[]] # Link path used during crawl - all possible link paths stored
100-
masterList[0]["done"] = 0 # Used to determine if linked need to be crawled
101-
102-
shelled = Array.new # keeping track of shelled systems - multiple incoming sa links could result in multiple shells on one system
92+
masterList[0] = Hash.new # Define new hash
93+
masterList[0]["name"] = "" # Name of the current database server
94+
masterList[0]["db_link"] = "" # Name of the linked database server
95+
masterList[0]["db_user"] = "" # User configured on the database server link
96+
masterList[0]["db_sysadmin"] = "" # Specifies if the database user configured for the link has sysadmin privileges
97+
masterList[0]["db_version"] = "" # Database version of the linked database server
98+
masterList[0]["db_os"] = "" # OS of the linked database server
99+
masterList[0]["path"] = [[]] # Link path used during crawl - all possible link paths stored
100+
masterList[0]["done"] = 0 # Used to determine if linked need to be crawled
101+
102+
shelled = Array.new # keeping track of shelled systems - multiple incoming sa links could result in multiple shells on one system
103103

104104
# Setup query for gathering information from database servers
105105
versionQuery = "select @@servername,system_user,is_srvrolemember('sysadmin'),(REPLACE(REPLACE(REPLACE\

modules/post/multi/manage/shell_to_meterpreter.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info = {})
3333
OptInt.new('LPORT',
3434
[false, 'Port for Payload to connect to.', 4433]),
3535
OptBool.new('HANDLER',
36-
[ true, 'Start an Exploit Multi Handler to receive the connection', true])
36+
[ true, 'Start an exploit/multi/handler to receive the connection', true])
3737
], self.class)
3838
deregister_options('PERSIST', 'PSH_OLD_METHOD', 'RUN_WOW64')
3939
end
@@ -101,7 +101,7 @@ def run
101101
if datastore['HANDLER']
102102
listener_job_id = create_multihandler(lhost, lport, payload_name)
103103
if listener_job_id.blank?
104-
print_error("Failed to start multi/handler on #{datastore['LPORT']}, it may be in use by another process.")
104+
print_error("Failed to start exploit/multi/handler on #{datastore['LPORT']}, it may be in use by another process.")
105105
return nil
106106
end
107107
end
@@ -208,7 +208,7 @@ def cleanup_handler(listener_job_id, aborted)
208208
timer += 1
209209
end
210210
end
211-
print_status('Stopping multi/handler')
211+
print_status('Stopping exploit/multi/handler')
212212
framework.jobs.stop_job(listener_job_id)
213213
}
214214
end
@@ -238,12 +238,12 @@ def check_for_listener(lhost, lport)
238238
return false
239239
end
240240

241-
# Starts a multi/handler session
241+
# Starts a exploit/multi/handler session
242242
def create_multihandler(lhost, lport, payload_name)
243243
pay = client.framework.payloads.create(payload_name)
244244
pay.datastore['LHOST'] = lhost
245245
pay.datastore['LPORT'] = lport
246-
print_status('Starting exploit multi handler')
246+
print_status('Starting exploit/multi/handler')
247247
if !check_for_listener(lhost, lport)
248248
# Set options for module
249249
mh = client.framework.exploits.create('multi/handler')

modules/post/multi/manage/system_session.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize(info={})
2828
OptInt.new('LPORT',
2929
[false, 'Port for Payload to connect to.', 4433]),
3030
OptBool.new('HANDLER',
31-
[ true, 'Start an Exploit Multi Handler to receive the connection', false]),
31+
[ true, 'Start an exploit/multi/handler to receive the connection', false]),
3232
OptEnum.new('TYPE', [true, 'Scripting environment on target to use for reverse shell',
3333
'auto', ['auto','ruby','python','perl','bash']])
3434
], self.class)
@@ -111,12 +111,12 @@ def check_for_listner(lhost,lport)
111111
return conflict
112112
end
113113

114-
# Starts a multi/handler session
114+
# Starts a exploit/multi/handler session
115115
def create_multihand(lhost,lport)
116116
pay = client.framework.payloads.create("generic/shell_reverse_tcp")
117117
pay.datastore['LHOST'] = lhost
118118
pay.datastore['LPORT'] = lport
119-
print_status("Starting exploit multi handler")
119+
print_status("Starting exploit/multi/handler")
120120
if not check_for_listner(lhost,lport)
121121
# Set options for module
122122
mul = client.framework.exploits.create("multi/handler")

modules/post/windows/manage/multi_meterpreter_inject.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def initialize(info={})
3232
OptInt.new('LPORT', [false, 'Port number for the payload LPORT variable.', 4444]),
3333
OptString.new('IPLIST', [true, 'List of semicolom separated IP list.', Rex::Socket.source_address("1.2.3.4")]),
3434
OptString.new('PIDLIST', [false, 'List of semicolom separated PID list.', '']),
35-
OptBool.new('HANDLER', [false, 'Start new multi/handler job on local box.', false]),
35+
OptBool.new('HANDLER', [false, 'Start new exploit/multi/handler job on local box.', false]),
3636
OptInt.new('AMOUNT', [false, 'Select the amount of shells you want to spawn.', 1])
3737
], self.class)
3838

@@ -117,7 +117,7 @@ def create_multi_handler(payload_to_inject,rport,rhost = '0.0.0.0')
117117
'Payload' => mul.datastore['PAYLOAD'],
118118
'RunAsJob' => true
119119
)
120-
print_good("Multi/Handler started!")
120+
print_good("exploit/multi/handler started!")
121121
end
122122

123123
# Function for Creating the Payload

modules/post/windows/manage/payload_inject.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def initialize(info={})
3333
OptAddress.new('LHOST', [true, 'IP of host that will receive the connection from the payload.']),
3434
OptInt.new('LPORT', [false, 'Port for Payload to connect to.', 4433]),
3535
OptInt.new('PID', [false, 'Process Identifier to inject of process to inject payload.']),
36-
OptBool.new('HANDLER', [ false, 'Start an Exploit Multi Handler to receive the connection', false]),
36+
OptBool.new('HANDLER', [ false, 'Start an exploit/multi/handler to receive the connection', false]),
3737
OptString.new('OPTIONS', [false, "Comma separated list of additional options for payload if needed in \'opt=val,opt=val\' format."]),
3838
OptInt.new('AMOUNT', [false, 'Select the amount of shells you want to spawn.', 1])
3939
], self.class)
@@ -112,9 +112,9 @@ def create_payload(name, lhost, lport, opts = "")
112112
return pay
113113
end
114114

115-
# Starts a multi/handler session
115+
# Starts a exploit/multi/handler session
116116
def create_multihand(pay,pay_name,lhost,lport)
117-
print_status("Starting exploit multi handler")
117+
print_status("Starting exploit/multi/handler")
118118
if not check_for_listner(lhost,lport)
119119
# Set options for module
120120
mul = client.framework.exploits.create("multi/handler")

msfcli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Msfcli
9595
$stdout.puts "Error: #{str}\n\n" if str
9696
$stdout.puts tbl.to_s + "\n"
9797
$stdout.puts "Examples:" + "\n"
98-
$stdout.puts "msfcli multi/handler payload=windows/meterpreter/reverse_tcp lhost=IP E" + "\n"
98+
$stdout.puts "msfcli exploit/multi/handler payload=windows/meterpreter/reverse_tcp lhost=IP E" + "\n"
9999
$stdout.puts "msfcli auxiliary/scanner/http/http_version rhosts=IP encoder= post= nop= E" + "\n"
100100
$stdout.puts extra + "\n" if extra
101101
$stdout.puts
@@ -542,7 +542,7 @@ class Msfcli
542542
show_payloads(modules)
543543
end
544544
when "t"
545-
puts
545+
puts
546546
if modules[:module].file_path =~ /auxiliary\//i
547547
$stdout.puts("\nError: This type of module does not support targets")
548548
else

scripts/meterpreter/duplicate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"-e" => [ true, "Executable to inject into. Default notepad.exe, will fall back to spawn if not found."],
2424
"-P" => [ true, "Process id to inject into; use instead of -e if multiple copies of one executable are running."],
2525
"-s" => [ false, "Spawn new executable to inject to. Only useful with -P."],
26-
"-D" => [ false, "Disable the automatic multi/handler (use with -r to accept on another system)"]
26+
"-D" => [ false, "Disable the automatic exploit/multi/handler (use with -r to accept on another system)"]
2727
)
2828

2929
#

0 commit comments

Comments
 (0)