update modules to use is_system? to ensure SID is used to verify when running in certain languages in Windows

git-svn-id: file:///home/svn/framework3/trunk@11999 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Carlos Perez 2011-03-16 22:54:40 +00:00
parent 89795f1784
commit 4031daa1fb
3 changed files with 10 additions and 4 deletions

View File

@ -12,10 +12,12 @@
require 'msf/core' require 'msf/core'
require 'rex' require 'rex'
require 'msf/core/post/file' require 'msf/core/post/file'
require 'msf/core/post/windows/accounts'
class Metasploit3 < Msf::Post class Metasploit3 < Msf::Post
include Msf::Post::File include Msf::Post::File
include Msf::Post::Priv
def initialize(info={}) def initialize(info={})
super(update_info(info, super(update_info(info,
@ -239,7 +241,8 @@ class Metasploit3 < Msf::Post
#Get user(s) #Get user(s)
usernames = [] usernames = []
if (uid = session.sys.config.getuid) == "NT AUTHORITY\\SYSTEM" uid = session.sys.config.getuid
if is_system?
print_status("running as SYSTEM, extracting user list...") print_status("running as SYSTEM, extracting user list...")
print_error("(Automatic decryption will not be possible. You might want to manually migrate, or \"set MIGRATE true\")") print_error("(Automatic decryption will not be possible. You might want to manually migrate, or \"set MIGRATE true\")")
session.fs.dir.foreach(@profiles_path) do |u| session.fs.dir.foreach(@profiles_path) do |u|

View File

@ -12,10 +12,12 @@
require 'msf/core' require 'msf/core'
require 'rex' require 'rex'
require 'msf/core/post/windows/registry' require 'msf/core/post/windows/registry'
require 'msf/core/post/windows/accounts'
class Metasploit3 < Msf::Post class Metasploit3 < Msf::Post
include Msf::Post::Registry include Msf::Post::Registry
include Msf::Post::Priv
def initialize(info={}) def initialize(info={})
super( update_info( info, super( update_info( info,
@ -45,7 +47,7 @@ class Metasploit3 < Msf::Post
profilepath = "\\My Documents\\WindowsPowerShell\\" profilepath = "\\My Documents\\WindowsPowerShell\\"
end end
if user == "NT AUTHORITY\\SYSTEM" if is_system?
print_status("Running as SYSTEM extracting user list..") print_status("Running as SYSTEM extracting user list..")
session.fs.dir.foreach(path4users) do |u| session.fs.dir.foreach(path4users) do |u|
userinfo = {} userinfo = {}

View File

@ -12,10 +12,12 @@
require 'msf/core' require 'msf/core'
require 'rex' require 'rex'
require 'msf/core/post/windows/registry' require 'msf/core/post/windows/registry'
require 'msf/core/post/windows/accounts'
class Metasploit3 < Msf::Post class Metasploit3 < Msf::Post
include Msf::Post::Registry include Msf::Post::Registry
include Msf::Post::Priv
def initialize(info={}) def initialize(info={})
super( update_info( info, super( update_info( info,
@ -132,8 +134,7 @@ class Metasploit3 < Msf::Post
# Enumerate shares being offered # Enumerate shares being offered
enum_conf_shares() if datastore["CURRENT"] enum_conf_shares() if datastore["CURRENT"]
user = session.sys.config.getuid if is_system?
if user != "NT AUTHORITY\\SYSTEM"
mount_history = enum_recent_mounts("HKEY_CURRENT_USER") mount_history = enum_recent_mounts("HKEY_CURRENT_USER")
run_history = enum_run_unc("HKEY_CURRENT_USER") run_history = enum_run_unc("HKEY_CURRENT_USER")
else else