Land #2068, @wchen-r7's fix to initialize variables on windows_autologin module

unstable
jvazquez-r7 2013-07-05 09:08:57 -05:00
commit b9dd3df05f
1 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ class Metasploit3 < Msf::Post
'License' => MSF_LICENSE, 'License' => MSF_LICENSE,
'Author' => 'Author' =>
[ [
'Myo Soe <YGN Ethical Hacker Group, http://yehg.net>' 'Myo Soe' #YGN Ethical Hacker Group, http://yehg.net
], ],
'Platform' => [ 'win' ], 'Platform' => [ 'win' ],
'SessionTypes' => [ 'meterpreter' ], 'SessionTypes' => [ 'meterpreter' ],
@ -60,15 +60,15 @@ class Metasploit3 < Msf::Post
# DefaultDomainName, DefaultUserName, DefaultPassword # DefaultDomainName, DefaultUserName, DefaultPassword
# AltDefaultDomainName, AltDefaultUserName, AltDefaultPassword # AltDefaultDomainName, AltDefaultUserName, AltDefaultPassword
logon_key = "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\" logon_key = "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\"
al = registry_getvaldata(logon_key, "AutoAdminLogon") al = registry_getvaldata(logon_key, "AutoAdminLogon") || ''
do1 = registry_getvaldata(logon_key, "DefaultDomainName") do1 = registry_getvaldata(logon_key, "DefaultDomainName") || ''
du1 = registry_getvaldata(logon_key, "DefaultUserName") du1 = registry_getvaldata(logon_key, "DefaultUserName") || ''
dp1 = registry_getvaldata(logon_key, "DefaultPassword") dp1 = registry_getvaldata(logon_key, "DefaultPassword") || ''
do2 = registry_getvaldata(logon_key, "AltDefaultDomainName") do2 = registry_getvaldata(logon_key, "AltDefaultDomainName") || ''
du2 = registry_getvaldata(logon_key, "AltDefaultUserName") du2 = registry_getvaldata(logon_key, "AltDefaultUserName") || ''
dp2 = registry_getvaldata(logon_key, "AltDefaultPassword") dp2 = registry_getvaldata(logon_key, "AltDefaultPassword") || ''
if do1 != '' and du1 != '' and dp1 == '' and al == '1' if do1 != '' and du1 != '' and dp1 == '' and al == '1'
has_al = 1 has_al = 1