Skip to content

Commit 6e9cd33

Browse files
committed
Modify description
1 parent 261da93 commit 6e9cd33

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

modules/post/windows/gather/enum_ad_users_to_wordlist.rb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class Metasploit3 < Msf::Post
1111
include Msf::Auxiliary::Report
1212
include Msf::Post::Windows::LDAP
1313

14-
SEARCH_FILTER = '(&(objectClass=organizationalPerson)(objectClass=user)(objectClass=person)(!(objectClass=computer)))'
1514
DEFAULT_FIELDS = [
1615
'sn',
1716
'givenName',
@@ -34,12 +33,11 @@ class Metasploit3 < Msf::Post
3433

3534
def initialize(info={})
3635
super( update_info( info,
37-
'Name' => 'Windows Gather Words from Active Directory',
36+
'Name' => 'Windows Active Directory Wordlist Builder',
3837
'Description' => %q{
39-
This module will enumerate all user accounts in the default Active Domain (AD) directory
40-
and use these as words to seed a wordlist.In cases (like description) where spaces may
41-
occur, some extra processing is done to generate multiple words in addition to one long
42-
one (up to 24 characters). Results are dumped into /tmp
38+
This module will gather information from the default Active Domain (AD) directory
39+
and use these words to seed a wordlist. By default it enumerates user accounts to
40+
build the wordlist
4341
},
4442
'License' => MSF_LICENSE,
4543
'Author' => ['Thomas Ring'],
@@ -49,16 +47,17 @@ def initialize(info={})
4947

5048
register_options([
5149
OptString.new('FIELDS', [true, 'Fields to retrieve (ie, sn, givenName, displayName, description, comment)', DEFAULT_FIELDS.join(',')]),
50+
OptString.new('FILTER', [true, 'Search filter.','(&(objectClass=organizationalPerson)(objectClass=user)(objectClass=person)(!(objectClass=computer)))'])
5251
], self.class)
5352
end
5453

5554
def run
5655
fields = datastore['FIELDS'].gsub(/\s+/,'').split(',')
57-
56+
search_filter = datastore['FILTER']
5857
q = nil
5958

6059
begin
61-
q = query(SEARCH_FILTER, datastore['MAX_SEARCH'], fields)
60+
q = query(search_filter, datastore['MAX_SEARCH'], fields)
6261
rescue ::RuntimeError, ::Rex::Post::Meterpreter::RequestError => e
6362
# Can't bind or in a network w/ limited accounts
6463
print_error(e.message)
@@ -75,7 +74,6 @@ def run
7574
end # q.each
7675

7776
# build array of words to output sorted on frequency
78-
output = []
7977
ordered_dict = @words_dict.sort_by { |k,v| v }.reverse
8078
ordered_dict.collect! { |k, v| k }
8179

0 commit comments

Comments
 (0)