File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
lib/metasploit/framework/ntds Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,17 @@ module NTDS
6
6
class Account
7
7
8
8
# Size of an NTDS Account Struct on the Wire
9
- ACCOUNT_SIZE = 3948
9
+ ACCOUNT_SIZE = 2908
10
10
# Size of a Date or Time Format String on the Wire
11
11
DATE_TIME_STRING_SIZE = 30
12
12
# Size of the AccountDescription Field
13
- DESCRIPTION_SIZE = 2048
13
+ DESCRIPTION_SIZE = 1024
14
14
# Size of a Hash History Record
15
15
HASH_HISTORY_SIZE = 792
16
16
# Size of a Hash String
17
17
HASH_SIZE = 33
18
18
# Size of the samAccountName field
19
- NAME_SIZE = 40
19
+ NAME_SIZE = 20
20
20
21
21
#@return [String] The AD Account Description
22
22
attr_accessor :description
Original file line number Diff line number Diff line change @@ -6,10 +6,8 @@ module NTDS
6
6
# to provide a simple interface for enumerating AD user accounts.
7
7
class Parser
8
8
9
- # The size, in bytes, of an NTDS account object
10
- ACCOUNT_SIZE = 3948
11
9
# The size, in Bytes, of a batch of NTDS accounts
12
- BATCH_SIZE = 78960
10
+ BATCH_SIZE = ( Metasploit :: Framework :: NTDS :: Account :: ACCOUNT_SIZE * 20 )
13
11
14
12
#@return [Rex::Post::Meterpreter::Channels::Pool] The Meterpreter NTDS Parser Channel
15
13
attr_accessor :channel
@@ -36,7 +34,7 @@ def each_account
36
34
until raw_batch_data . nil?
37
35
batch = raw_batch_data . dup
38
36
while batch . present?
39
- raw_data = batch . slice! ( 0 , ACCOUNT_SIZE )
37
+ raw_data = batch . slice! ( 0 , Metasploit :: Framework :: NTDS :: Account :: ACCOUNT_SIZE )
40
38
# Make sure our data isn't all Null-bytes
41
39
if raw_data . match ( /[^\x00 ]/ )
42
40
account = Metasploit ::Framework ::NTDS ::Account . new ( raw_data )
You can’t perform that action at this time.
0 commit comments