CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/kerberos/pac.rb
Views: 11704
1
# -*- coding: binary -*-
2
3
module Rex
4
module Proto
5
module Kerberos
6
module Pac
7
VERSION = 0
8
NETLOGON_FLAG = 0x20000
9
10
# Kerberos:
11
# https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-pac/311aab27-ebdf-47f7-b939-13dc99b15341
12
# Reference with details on flags:
13
# https://learn.microsoft.com/en-gb/windows/win32/api/winnt/ns-winnt-token_groups?redirectedfrom=MSDN#members
14
SE_GROUP_MANDATORY = 0x00000001
15
SE_GROUP_ENABLED_BY_DEFAULT = 0x00000002
16
SE_GROUP_ENABLED = 0x00000004
17
SE_GROUP_OWNER = 0x00000008
18
SE_GROUP_RESOURCE = 0x20000000
19
20
# XXX: Does not include some of the newer SE_GROUP_* flags
21
SE_GROUP_ALL = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED
22
23
PAC_WAS_GIVEN_IMPLICITLY = 0x00000001
24
25
USER_NORMAL_ACCOUNT = 0x00000010
26
USER_DONT_EXPIRE_PASSWORD = 0x00000200
27
PAC_LOGON_INFO = 1
28
PAC_CREDENTIALS_INFO = 2
29
PAC_SERVER_CHECKSUM = 6
30
PAC_PRIVSVR_CHECKSUM = 7
31
PAC_CLIENT_INFO = 10
32
AD_WIN2K_PAC = 128
33
SEC_TO_UNIX_EPOCH = 11644473600
34
WINDOWS_TICK = 10000000
35
NEVER_EXPIRE = 0x7fffffffffffffff
36
DOMAIN_ADMINS = 512
37
DOMAIN_USERS = 513
38
SCHEMA_ADMINISTRATORS = 518
39
ENTERPRISE_ADMINS = 519
40
GROUP_POLICY_CREATOR_OWNERS = 520
41
DEFAULT_ADMIN_RID = 500
42
DEFAULT_USER_RID = 1000
43
NT_AUTHORITY_SID = 'S-1-5'
44
end
45
end
46
end
47
end
48
49