Merge branch 'master' of https://github.com/rapid7/metasploit-framework
commit
80c4f99132
4
COPYING
4
COPYING
|
@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name of Rapid7 LLC nor the names of its contributors
|
* Neither the name of Rapid7, Inc. nor the names of its contributors
|
||||||
may be used to endorse or promote products derived from this software
|
may be used to endorse or promote products derived from this software
|
||||||
without specific prior written permission.
|
without specific prior written permission.
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
The Metasploit Framework is provided under the 3-clause BSD license above.
|
The Metasploit Framework is provided under the 3-clause BSD license above.
|
||||||
|
|
||||||
The copyright on this package is held by Rapid7 LLC.
|
The copyright on this package is held by Rapid7, Inc.
|
||||||
|
|
||||||
This license does not apply to several components within the Metasploit
|
This license does not apply to several components within the Metasploit
|
||||||
Framework source tree. For more details see the LICENSE file.
|
Framework source tree. For more details see the LICENSE file.
|
||||||
|
|
|
@ -1881,7 +1881,7 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
|
||||||
'C'+ # Short File Name Length
|
'C'+ # Short File Name Length
|
||||||
'C' # Reserved
|
'C' # Reserved
|
||||||
)
|
)
|
||||||
name = resp_data[didx + 70 + 24, info[15]].sub!(/\x00+$/, '')
|
name = resp_data[didx + 70 + 24, info[15]].sub(/\x00+$/, '')
|
||||||
files[name] =
|
files[name] =
|
||||||
{
|
{
|
||||||
'type' => ((info[14] & 0x10)==0x10) ? 'D' : 'F',
|
'type' => ((info[14] & 0x10)==0x10) ? 'D' : 'F',
|
||||||
|
@ -1916,7 +1916,7 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
|
||||||
260, # Level of interest
|
260, # Level of interest
|
||||||
resume_key, # Resume key from previous (Last name offset)
|
resume_key, # Resume key from previous (Last name offset)
|
||||||
6, # Close search if end of search
|
6, # Close search if end of search
|
||||||
].pack('vvvVv') + last_filename + "\x00" # Last filename returned from find_first or find_next
|
].pack('vvvVv') + last_filename.to_s + "\x00" # Last filename returned from find_first or find_next
|
||||||
resp = trans2(CONST::TRANS2_FIND_NEXT2, parm, '')
|
resp = trans2(CONST::TRANS2_FIND_NEXT2, parm, '')
|
||||||
return resp # Returns the FIND_NEXT2 response packet for parsing by the find_first function
|
return resp # Returns the FIND_NEXT2 response packet for parsing by the find_first function
|
||||||
end
|
end
|
||||||
|
|
15
msfcli
15
msfcli
|
@ -141,8 +141,12 @@ exploit.init_ui(
|
||||||
mode = ARGV.pop || 'h'
|
mode = ARGV.pop || 'h'
|
||||||
|
|
||||||
# Import options
|
# Import options
|
||||||
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
begin
|
||||||
|
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||||
|
rescue Rex::ArgumentParseError => e
|
||||||
|
puts "[!] Error: #{e.message}\n\n"
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
# Initialize associated modules
|
# Initialize associated modules
|
||||||
payload = nil
|
payload = nil
|
||||||
|
@ -152,21 +156,21 @@ nop = nil
|
||||||
if (exploit.datastore['PAYLOAD'])
|
if (exploit.datastore['PAYLOAD'])
|
||||||
payload = $framework.payloads.create(exploit.datastore['PAYLOAD'])
|
payload = $framework.payloads.create(exploit.datastore['PAYLOAD'])
|
||||||
if (payload != nil)
|
if (payload != nil)
|
||||||
payload.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
payload.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (exploit.datastore['ENCODER'])
|
if (exploit.datastore['ENCODER'])
|
||||||
encoder = $framework.encoders.create(exploit.datastore['ENCODER'])
|
encoder = $framework.encoders.create(exploit.datastore['ENCODER'])
|
||||||
if (encoder != nil)
|
if (encoder != nil)
|
||||||
encoder.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
encoder.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (exploit.datastore['NOP'])
|
if (exploit.datastore['NOP'])
|
||||||
nop = $framework.nops.create(exploit.datastore['NOP'])
|
nop = $framework.nops.create(exploit.datastore['NOP'])
|
||||||
if (nop != nil)
|
if (nop != nil)
|
||||||
nop.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
nop.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -178,7 +182,6 @@ case mode.downcase
|
||||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(payload, Indent)) if payload
|
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(payload, Indent)) if payload
|
||||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(encoder, Indent)) if encoder
|
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(encoder, Indent)) if encoder
|
||||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(nop, Indent)) if nop
|
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(nop, Indent)) if nop
|
||||||
|
|
||||||
when "o"
|
when "o"
|
||||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(exploit, Indent))
|
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(exploit, Indent))
|
||||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(payload, Indent)) if payload
|
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(payload, Indent)) if payload
|
||||||
|
|
9
msfvenom
9
msfvenom
|
@ -97,6 +97,10 @@ def parse_args
|
||||||
opts[:list_options] = true
|
opts[:list_options] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
opt.on('-d', '--advance', 'List the payload\'s advance options') do
|
||||||
|
opts[:list_advance] = true
|
||||||
|
end
|
||||||
|
|
||||||
opt.on_tail('-h', '--help', 'Show this message') do
|
opt.on_tail('-h', '--help', 'Show this message') do
|
||||||
$stderr.puts opt
|
$stderr.puts opt
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -338,6 +342,11 @@ if opts[:list_options]
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if opts[:list_advance]
|
||||||
|
puts Msf::Serializer::ReadableText.dump_advanced_options(payload)
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
if payload_raw.nil? or payload_raw.empty?
|
if payload_raw.nil? or payload_raw.empty?
|
||||||
begin
|
begin
|
||||||
payload_raw = payload.generate_simple(
|
payload_raw = payload.generate_simple(
|
||||||
|
|
Loading…
Reference in New Issue