Skip to content

Commit 75a2846

Browse files
committed
Add more PAC constants
1 parent b0a178e commit 75a2846

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

lib/msf/kerberos/client/pac.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def build_pa_pac_request(opts = {})
4242
# @see Rex::Proto::Kerberos::Pac::Type
4343
def build_pac(opts = {})
4444
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]
4848
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
5050
logon_time = opts[:logon_time] || Time.now
5151
checksum_type = opts[:checksum_type] || Rex::Proto::Kerberos::Crypto::RSA_MD5
5252

lib/rex/proto/kerberos/pac.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@ module Kerberos
66
module Pac
77
VERSION = 0
88
NETLOGON_FLAG = 0x20000
9-
109
SE_GROUP_MANDATORY = 1
1110
SE_GROUP_ENABLED_BY_DEFAULT = 2
1211
SE_GROUP_ENABLED = 4
1312
SE_GROUP_ALL = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED
14-
1513
USER_NORMAL_ACCOUNT = 0x00000010
1614
USER_DONT_EXPIRE_PASSWORD = 0x00000200
17-
1815
PAC_LOGON_INFO = 1
1916
PAC_SERVER_CHECKSUM = 6
2017
PAC_PRIVSVR_CHECKSUM = 7
2118
PAC_CLIENT_INFO = 10
22-
2319
AD_WIN2K_PAC = 128
24-
2520
SEC_TO_UNIX_EPOCH = 11644473600
2621
WINDOWS_TICK = 10000000
2722
NEVER_EXPIRE = 0x7fffffffffffffff
23+
DOMAIN_USERS = 513
24+
DEFAULT_USER_SID = 1000
25+
NT_AUTHORITY_SID = 'S-1-5'
2826
end
2927
end
3028
end

0 commit comments

Comments
 (0)