UPN is optional, should use sAMAccountName
parent
3a894a29de
commit
b77aed1c56
|
@ -12,8 +12,8 @@ class Metasploit3 < Msf::Post
|
||||||
include Msf::Post::Windows::Accounts
|
include Msf::Post::Windows::Accounts
|
||||||
|
|
||||||
UAC_DISABLED = 0x02
|
UAC_DISABLED = 0x02
|
||||||
USER_FIELDS = ['userPrincipalName',
|
USER_FIELDS = ['sAMAccountName',
|
||||||
'sAMAccountName',
|
'userPrincipalName',
|
||||||
'userAccountControl',
|
'userAccountControl',
|
||||||
'lockoutTime',
|
'lockoutTime',
|
||||||
'mail',
|
'mail',
|
||||||
|
@ -113,7 +113,7 @@ class Metasploit3 < Msf::Post
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
username = result[USER_FIELDS.index('userPrincipalName')][:value]
|
username = result[USER_FIELDS.index('sAMAccountName')][:value]
|
||||||
uac = result[USER_FIELDS.index('userAccountControl')][:value]
|
uac = result[USER_FIELDS.index('userAccountControl')][:value]
|
||||||
lockout_time = result[USER_FIELDS.index('lockoutTime')][:value]
|
lockout_time = result[USER_FIELDS.index('lockoutTime')][:value]
|
||||||
store_username(username, uac, lockout_time, domain, domain_ip)
|
store_username(username, uac, lockout_time, domain, domain_ip)
|
||||||
|
|
Loading…
Reference in New Issue