Improve setuid nmap module
This commit is contained in:
parent
88bf1ac3de
commit
ed72ca217a
|
@ -181,6 +181,8 @@ module Msf::Post::File
|
|||
#
|
||||
# @param path [String] Remote filename to check
|
||||
def file?(path)
|
||||
return false if path.nil?
|
||||
|
||||
if session.type == 'meterpreter'
|
||||
stat = begin
|
||||
session.fs.file.stat(path)
|
||||
|
|
|
@ -42,7 +42,8 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
'Notes' =>
|
||||
{
|
||||
'Reliability' => [ REPEATABLE_SESSION ],
|
||||
'Stability' => [ CRASH_SAFE ]
|
||||
'Stability' => [ CRASH_SAFE ],
|
||||
'SideEffects' => [ ARTIFACTS_ON_DISK ]
|
||||
},
|
||||
'DefaultTarget' => 0
|
||||
)
|
||||
|
@ -95,7 +96,8 @@ class MetasploitModule < Msf::Exploit::Local
|
|||
|
||||
begin
|
||||
# Versions before 4.75 (August 2008) will not run scripts without a port scan
|
||||
cmd_exec "#{datastore['Nmap']} --script #{scriptname} -p80 localhost #{datastore['ExtraArgs']}"
|
||||
result = cmd_exec "#{datastore['Nmap']} --script #{scriptname} -p80 localhost #{datastore['ExtraArgs']}"
|
||||
vprint_status(result)
|
||||
ensure
|
||||
rm_f(lua_file, exe_file)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue