Skip to content

Commit 0063d4e

Browse files
committed
Extend description & add Win2k3 section to WinXP section.
1 parent 8602e74 commit 0063d4e

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

modules/post/windows/gather/enum_prefetch.rb

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ class Metasploit3 < Msf::Post
1414
def initialize(info={})
1515
super(update_info(info,
1616
'Name' => 'Windows Gather Prefetch File Information',
17-
'Description' => %q{This module gathers prefetch file information from WinXP, Win2k3 and Win7 systems.},
17+
'Description' => %q{This module gathers prefetch file information from WinXP, Win2k3 and Win7 systems.
18+
File offset reads for run count, hash and filename are collected from each prefetch file
19+
using WinAPI through Railgun while Last Modified and Create times are file MACE values.},
1820
'License' => MSF_LICENSE,
1921
'Author' => ['TJ Glad <fraktaali[at]gmail.com>'],
2022
'Platform' => ['win'],
@@ -127,41 +129,27 @@ def run
127129
sysnfo = client.sys.config.sysinfo['OS']
128130
error_msg = "You don't have enough privileges. Try getsystem."
129131

130-
if sysnfo =~/(Windows XP)/
132+
if sysnfo =~/(Windows XP|2003|.NET)/
131133
if not is_system?
132134
print_error(error_msg)
133135
return nil
134136
end
135-
# Offsets for WinXP
136-
print_good("Detected Windows XP (max 128 entries)")
137+
# Offsets for WinXP & Win2k3
138+
print_good("Detected #{sysnfo} (max 128 entries)")
137139
name_offset = 0x10
138140
hash_offset = 0x4C
139141
lastrun_offset = 0x78
140142
runcount_offset = 0x90
141143
# Registry key for timezone
142144
key_value = "StandardName"
143145

144-
elsif sysnfo =~/(Windows .NET Server)/
145-
if not is_system?
146-
print_error(error_msg)
147-
return nil
148-
end
149-
# Offsets for Win2k3
150-
print_good("Detected Windows 2k3 (max 128 entries)")
151-
name_offset = 0x10
152-
hash_offset = 0x4C
153-
lastrun_offset = 0x78
154-
runcount_offset = 0x90
155-
# Registry key for timezone
156-
key_value = "StandardName"
157-
158146
elsif sysnfo =~/(Windows 7)/
159147
if not is_admin?
160148
print_error(error_msg)
161149
return nil
162150
end
163151
# Offsets for Win7
164-
print_good("Detected Windows 7 (max 128 entries)")
152+
print_good("Detected #{sysnfo} (max 128 entries)")
165153
name_offset = 0x10
166154
hash_offset = 0x4C
167155
lastrun_offset = 0x80

0 commit comments

Comments
 (0)