Enum_ad modules should retrive userPrincipalName as it may differ

to the sAMAccountName value.
bug/bundler_fix
Meatballs 2015-02-16 14:03:15 +00:00
parent ce688f4247
commit e42bbcbcbb
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
2 changed files with 10 additions and 5 deletions

View File

@ -31,7 +31,7 @@ class Metasploit3 < Msf::Post
register_options([
OptBool.new('STORE_LOOT', [true, 'Store file in loot.', false]),
OptString.new('FIELDS', [true, 'Fields to retrieve.','sAMAccountName,userAccountControl,comment,description']),
OptString.new('FIELDS', [true, 'Fields to retrieve.','userPrincipalName,sAMAccountName,userAccountControl,comment,description']),
OptString.new('FILTER', [true, 'Search filter.','(&(&(objectCategory=person)(objectClass=user))(|(description=*pass*)(comment=*pass*)))']),
], self.class)
end
@ -63,7 +63,6 @@ class Metasploit3 < Msf::Post
q[:results].each do |result|
row = []
report = {}
result.each do |field|
if field[:value].nil?
row << ""

View File

@ -12,7 +12,13 @@ class Metasploit3 < Msf::Post
include Msf::Post::Windows::Accounts
UAC_DISABLED = 0x02
USER_FIELDS = ['sAMAccountName', 'userAccountControl', 'lockoutTime', 'mail', 'primarygroupid', 'description'].freeze
USER_FIELDS = ['userPrincipalName',
'sAMAccountName',
'userAccountControl',
'lockoutTime',
'mail',
'primarygroupid',
'description'].freeze
def initialize(info = {})
super(update_info(
@ -108,8 +114,8 @@ class Metasploit3 < Msf::Post
end
username = result.first[:value]
uac = result[1][:value]
lockout_time = result[2][:value]
uac = result[2][:value]
lockout_time = result[3][:value]
store_username(username, uac, lockout_time, domain, domain_ip)
results_table << row