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/model.rb
Views: 11704
1
# -*- coding: binary -*-
2
3
module Rex
4
module Proto
5
module Kerberos
6
module Model
7
VERSION = 5
8
9
# Application Message Id's
10
11
AS_REQ = 10
12
AS_REP = 11
13
TGS_REQ = 12
14
TGS_REP = 13
15
KRB_ERROR = 30
16
TICKET = 1
17
AUTHENTICATOR = 2
18
AP_REQ = 14
19
AP_REP = 15
20
KRB_CRED = 22
21
ENC_AP_REP_PART = 27
22
ENC_KRB_CRED_PART = 29
23
24
module OID
25
DiffieHellman = '1.2.840.10046.2.1'
26
SHA1 = '1.3.14.3.2.26'
27
SHA256 = '2.16.840.1.101.3.4.2.1'
28
ContentType = '1.2.840.113549.1.9.3'
29
MessageDigest = '1.2.840.113549.1.9.4'
30
RSAWithSHA1 = '1.2.840.113549.1.1.5'
31
RSAWithSHA256 = '1.2.840.113549.1.1.11'
32
PkinitAuthData = '1.3.6.1.5.2.3.1'
33
SignedData = '1.2.840.113549.1.7.2'
34
end
35
36
# From Principal
37
# https://datatracker.ietf.org/doc/html/rfc4120#section-6.2
38
39
module NameType
40
# Name type not known
41
NT_UNKNOWN = 0
42
# The name of the principal
43
NT_PRINCIPAL = 1
44
# Service and other unique instances
45
NT_SRV_INST = 2
46
# Service with host name and instance
47
NT_SRV_HST = 3
48
# Service with host as remaining component
49
NT_SRV_XHST = 4
50
# Unique ID
51
NT_UID = 5
52
end
53
54
# From padata - https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml
55
56
module PreAuthType
57
PA_TGS_REQ = 1
58
PA_ENC_TIMESTAMP = 2
59
PA_PW_SALT = 3
60
PA_ETYPE_INFO = 11
61
PA_PK_AS_REQ = 16
62
PA_PK_AS_REP = 17
63
PA_ETYPE_INFO2 = 19
64
PA_PAC_REQUEST = 128
65
PA_FOR_USER = 129
66
PA_SUPPORTED_ETYPES = 165
67
PA_PAC_OPTIONS = 167
68
end
69
70
module AuthorizationDataType
71
AD_IF_RELEVANT = 1
72
KDC_ISSUED = 4
73
AND_OR = 5
74
MANDATORY_FOR_KDC = 8
75
INITIAL_VERIFIED_CAS = 9
76
OSF_DCE = 64
77
SESAME = 65
78
end
79
end
80
end
81
end
82
end
83
84
85