File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/msf/core/post/windows Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,6 @@ def parse_profiles(hives)
4949 #
5050 def parse_profile ( hive )
5151 profile = { }
52- sidinf = resolve_sid ( hive [ 'SID' ] . to_s )
53- profile [ 'UserName' ] = sidinf [ :name ]
54- profile [ 'Domain' ] = sidinf [ :domain ]
5552 profile [ 'SID' ] = hive [ 'SID' ]
5653 profile [ 'ProfileDir' ] = hive [ 'PROF' ]
5754 profile [ 'AppData' ] = registry_getvaldata ( "#{ hive [ 'HKU' ] } \\ Software\\ Microsoft\\ Windows\\ CurrentVersion\\ Explorer\\ Shell Folders" , 'AppData' )
@@ -65,6 +62,12 @@ def parse_profile(hive)
6562 profile [ 'Temp' ] = registry_getvaldata ( "#{ hive [ 'HKU' ] } \\ Environment" , 'TEMP' ) . to_s . sub ( '%USERPROFILE%' , profile [ 'ProfileDir' ] )
6663 profile [ 'Path' ] = registry_getvaldata ( "#{ hive [ 'HKU' ] } \\ Environment" , 'PATH' )
6764
65+ sidinf = resolve_sid ( hive [ 'SID' ] . to_s )
66+ if sidinf
67+ profile [ 'UserName' ] = sidinf [ :name ]
68+ profile [ 'Domain' ] = sidinf [ :domain ]
69+ end
70+
6871 return profile
6972 end
7073
You can’t perform that action at this time.
0 commit comments