@@ -18,7 +18,7 @@ def initialize(info={})
18
18
'Description' =>
19
19
%q{
20
20
This module gathers information about the files and file paths that logged on users have
21
- executed on the system. It also will check if the file exists on the system still . This
21
+ executed on the system. It also will check if the file still exists on the system. This
22
22
information is gathered by using information stored under the MUICache registry key. If
23
23
the user is logged in when the module is executed it will collect the MUICache entries
24
24
by accessing the registry directly. If the user is not logged in the module will download
@@ -43,7 +43,7 @@ def find_user_names
43
43
username_reg_path = "HKLM\\ Software\\ Microsoft\\ Windows\ NT\\ CurrentVersion\\ ProfileList"
44
44
profile_subkeys = registry_enumkeys ( username_reg_path )
45
45
if profile_subkeys . blank?
46
- print_error ( "Unable to access ProfileList registry key. Can't continue." )
46
+ print_error ( "Unable to access ProfileList registry key. Unable to continue." )
47
47
return nil
48
48
end
49
49
@@ -53,7 +53,7 @@ def find_user_names
53
53
end
54
54
user_home_path = registry_getvaldata ( "#{ username_reg_path } \\ #{ user_sid } " , "ProfileImagePath" )
55
55
if user_home_path . blank?
56
- print_error ( "Unable to read ProfileImagePath from the registry. Can't continue." )
56
+ print_error ( "Unable to read ProfileImagePath from the registry. Unable to continue." )
57
57
return nil
58
58
end
59
59
full_path = user_home_path . strip
@@ -94,7 +94,7 @@ def enumerate_muicache(muicache_reg_keys, sys_users, sys_paths, muicache, hive_f
94
94
# If the registry_enumvals returns us nothing then we'll know
95
95
# that the user is most likely not logged in and we'll need to
96
96
# download and process users hive locally.
97
- print_warning ( "User #{ user } : Can't access registry (maybe the user is not logged in atm?). Trying NTUSER.DAT/USRCLASS.DAT.." )
97
+ print_warning ( "User #{ user } : Can't access registry. Maybe the user is not logged in? Trying NTUSER.DAT/USRCLASS.DAT. .." )
98
98
result = process_hive ( sys_path , user , muicache , hive_file )
99
99
unless result . nil?
100
100
result . each { |r |
@@ -105,7 +105,7 @@ def enumerate_muicache(muicache_reg_keys, sys_users, sys_paths, muicache, hive_f
105
105
# If the registry_enumvals returns us content we'll know that we
106
106
# can access the registry directly and thus continue to process
107
107
# the content collected from there.
108
- print_status ( "User #{ user } : Enumerating registry.." )
108
+ print_status ( "User #{ user } : Enumerating registry... " )
109
109
subkeys . each do |key |
110
110
if key [ 0 ] != "@" && key != "LangID" && !key . nil?
111
111
result = check_file_exists ( key , user )
@@ -142,11 +142,11 @@ def process_hive(sys_path, user, muicache, hive_file)
142
142
ntuser_status = file_exist? ( hive_path )
143
143
144
144
unless ntuser_status == true
145
- print_warning ( "Couldn't locate/download #{ user } 's registry hive. Can't proceed." )
145
+ print_warning ( "Couldn't locate/download #{ user } 's registry hive. Unable to proceed." )
146
146
return nil
147
147
end
148
148
149
- print_status ( "Downloading #{ user } 's NTUSER.DAT/USRCLASS.DAT file.." )
149
+ print_status ( "Downloading #{ user } 's NTUSER.DAT/USRCLASS.DAT file... " )
150
150
local_hive_copy = Rex ::Quickfile . new ( "jtrtmp" )
151
151
local_hive_copy . close
152
152
begin
@@ -166,8 +166,8 @@ def process_hive(sys_path, user, muicache, hive_file)
166
166
# extracting the contents of the MUICache registry key.
167
167
def hive_parser ( local_hive_copy , muicache , user )
168
168
results = [ ]
169
- print_status ( "Parsing registry content.." )
170
- err_msg = "Error parsing hive. Can't continue."
169
+ print_status ( "Parsing registry content... " )
170
+ err_msg = "Error parsing hive. Unable to continue."
171
171
hive = Rex ::Registry ::Hive . new ( local_hive_copy )
172
172
if hive . nil?
173
173
print_error ( err_msg )
@@ -210,7 +210,7 @@ def hive_parser(local_hive_copy, muicache, user)
210
210
# - http://forensicartifacts.com/2010/08/registry-muicache/
211
211
# - http://www.irongeek.com/i.php?page=security/windows-forensics-registry-and-file-system-spots
212
212
def run
213
- print_status ( "Starting to enumerate MuiCache registry keys.." )
213
+ print_status ( "Starting to enumerate MUICache registry keys. .." )
214
214
sys_info = sysinfo [ 'OS' ]
215
215
216
216
if sys_info =~/Windows XP/ && is_admin?
@@ -219,7 +219,7 @@ def run
219
219
hive_file = "\\ NTUSER.DAT"
220
220
elsif sys_info =~/Windows 7/ && is_admin?
221
221
print_good ( "Remote system supported: #{ sys_info } " )
222
- muicache = "_Classes\\ Local\ Settings\\ Software\\ Microsoft\\ Windows\\ Shell\\ MuiCache "
222
+ muicache = "_Classes\\ Local\ Settings\\ Software\\ Microsoft\\ Windows\\ Shell\\ MUICache "
223
223
hive_file = "\\ AppData\\ Local\\ Microsoft\\ Windows\\ UsrClass.dat"
224
224
else
225
225
print_error ( "Unsupported OS or not enough privileges. Unable to continue." )
@@ -236,7 +236,7 @@ def run
236
236
"File status" ,
237
237
] )
238
238
239
- print_status ( "Phase 1: Searching user names.." )
239
+ print_status ( "Phase 1: Searching user names... " )
240
240
sys_users , sys_paths , sys_sids = find_user_names
241
241
242
242
if sys_users . blank?
@@ -246,16 +246,16 @@ def run
246
246
print_good ( "Users found: #{ sys_users . join ( ", " ) } " )
247
247
end
248
248
249
- print_status ( "Phase 2: Searching registry hives.." )
249
+ print_status ( "Phase 2: Searching registry hives... " )
250
250
muicache_reg_keys = enum_muicache_paths ( sys_sids , muicache )
251
251
results = enumerate_muicache ( muicache_reg_keys , sys_users , sys_paths , muicache , hive_file )
252
252
253
253
results . each { |r | table << r }
254
254
255
- print_status ( "Phase 3: Processing results.." )
255
+ print_status ( "Phase 3: Processing results... " )
256
256
loot = store_loot ( "muicache_info" , "text/plain" , session , table . to_s , nil , "MUICache Information" )
257
257
print_line ( "\n " + table . to_s + "\n " )
258
- print_status ( "Results stored in : #{ loot } " )
258
+ print_status ( "Results stored as : #{ loot } " )
259
259
print_status ( "Execution finished." )
260
260
end
261
261
0 commit comments