File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ def build_pa_pac_request(opts = {})
42
42
# @see Rex::Proto::Kerberos::Pac::Type
43
43
def build_pac ( opts = { } )
44
44
user_name = opts [ :client_name ] || ''
45
- user_id = opts [ :user_id ] || 1000
46
- primary_group_id = opts [ :group_id ] || 513
47
- group_ids = opts [ :group_ids ] || [ 513 ]
45
+ user_id = opts [ :user_id ] || Rex :: Proto :: Kerberos :: Pac :: DEFAULT_USER_SID
46
+ primary_group_id = opts [ :group_id ] || Rex :: Proto :: Kerberos :: Pac :: DOMAIN_USERS
47
+ group_ids = opts [ :group_ids ] || [ Rex :: Proto :: Kerberos :: Pac :: DOMAIN_USERS ]
48
48
domain_name = opts [ :realm ] || ''
49
- domain_id = opts [ :domain_id ] || 'S-1-1'
49
+ domain_id = opts [ :domain_id ] || Rex :: Proto :: Kerberos :: Pac :: NT_AUTHORITY_SID
50
50
logon_time = opts [ :logon_time ] || Time . now
51
51
checksum_type = opts [ :checksum_type ] || Rex ::Proto ::Kerberos ::Crypto ::RSA_MD5
52
52
Original file line number Diff line number Diff line change @@ -6,25 +6,23 @@ module Kerberos
6
6
module Pac
7
7
VERSION = 0
8
8
NETLOGON_FLAG = 0x20000
9
-
10
9
SE_GROUP_MANDATORY = 1
11
10
SE_GROUP_ENABLED_BY_DEFAULT = 2
12
11
SE_GROUP_ENABLED = 4
13
12
SE_GROUP_ALL = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED
14
-
15
13
USER_NORMAL_ACCOUNT = 0x00000010
16
14
USER_DONT_EXPIRE_PASSWORD = 0x00000200
17
-
18
15
PAC_LOGON_INFO = 1
19
16
PAC_SERVER_CHECKSUM = 6
20
17
PAC_PRIVSVR_CHECKSUM = 7
21
18
PAC_CLIENT_INFO = 10
22
-
23
19
AD_WIN2K_PAC = 128
24
-
25
20
SEC_TO_UNIX_EPOCH = 11644473600
26
21
WINDOWS_TICK = 10000000
27
22
NEVER_EXPIRE = 0x7fffffffffffffff
23
+ DOMAIN_USERS = 513
24
+ DEFAULT_USER_SID = 1000
25
+ NT_AUTHORITY_SID = 'S-1-5'
28
26
end
29
27
end
30
28
end
You can’t perform that action at this time.
0 commit comments