File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
lib/rex/proto/kerberos/model Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,16 @@ def message_for(error_code)
171171 now = Time . now
172172 skew = ( res . stime - now ) . abs . to_i
173173 return "#{ error_code } . Local time: #{ now } , Server time: #{ res . stime } , off by #{ skew } seconds"
174+ elsif error_code == ErrorCodes ::KDC_ERR_CLIENT_REVOKED && res &.respond_to? ( :e_data ) && res . e_data . present?
175+ begin
176+ pa_datas = res . e_data_as_pa_data
177+ rescue OpenSSL ::ASN1 ::ASN1Error
178+ else
179+ superseded_pa_data = pa_datas . find { |pa_data | pa_data . type == Rex ::Proto ::Kerberos ::Model ::PreAuthType ::KERB_SUPERSEDED_BY_USER }
180+ if superseded_pa_data
181+ error_code = "#{ error_code } . This account has been superseded by #{ superseded_pa_data . decoded_value } ."
182+ end
183+ end
174184 end
175185
176186 "Kerberos Error - #{ error_code } "
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ def ==(other)
1616 realm == other . realm && principal_name == other . principal_name
1717 end
1818
19+ def to_s
20+ "#{ principal_name } @#{ realm } "
21+ end
22+
1923 def decode ( input )
2024 case input
2125 when String
You can’t perform that action at this time.
0 commit comments