Hacker Directory — Understand what you hack.Hacker Directory — Understand what you hack.
Continue learning
TR
Contents15 chapters · 82 lessons
LESSON 11.05DERİN TEKNİK İNCELEME

The certificate lifecycle: Private-key protection, renewal, revocation, and identity trust

A certificate is public data; its private key is protected separately. Renewal requires considering the key and mapping together. Revocation depends on CRL/OCSP data used by the verifier. Rejection of a new certificate attempt still requires separate evidence about earlier tickets and open sessions.

1. Core mechanism

11.04 covered account binding through certificate and Key Trust paths. We now follow key protection, renewal and revocation over time.

Interfaces and specifications

  • Private key: A secret, protected separately from the certificate, that enables the certificate's identity claim. The certificate is shareable data; access to the key and its export surface must be controlled separately.
  • Validity window: The period bounded by the certificate's notBefore and notAfter fields.
  • Renewal: Obtaining a new certificate near the end of its validity window. Reusing or regenerating the key pair is a separate decision.
  • CRL: A signed CA-issued structure listing revoked certificates and, when present, a nextUpdate time.
  • cRLReason: A CRL-entry extension (OID 2.5.29.21) that identifies the reason for revocation, such as keyCompromise (1). It does not by itself give the time of compromise.
  • OCSP: An online request/response protocol for querying certificate status. It is a status-query path distinct from distributing a CRL; responses carry freshness information.
  • Invalidity Date: A separate CRL-entry extension (OID 2.5.29.24) that can carry the date when key compromise was known or suspected, or when a certificate otherwise became invalid. It can be earlier than the CRL revocationDate.

Protect the key, not the certificate

A certificate is a public document that can be shared. Access to its corresponding private key enables the identity claim. The goal is therefore not to hide the certificate; it is to limit access to the key and control how it can be exported.

Where the key is stored, who can use it, and whether it can be exported all affect compromise risk. Preventing export reduces risk, but does not prove the key cannot be compromised. An exportable key is portable identity material for the lifetime of its certificate.

Renewal is a continuity decision

Renewal presents two separate choices: continue with the same key pair or generate a new one. Reusing the key can be operationally convenient, but it extends the key's exposure period. Generating a new key cuts that continuity but may require updating every place that recognizes it.

The mapping forms from lesson 11.04 affect this decision. A mapping tied to the public key or SKI may remain valid when the same key pair is reused; a mapping tied to the certificate serial number may need an update for the new certificate. Plan renewal together with the mapping method.

Revocation takes effect at the verifier

When a CA revokes a certificate, status is published through a CRL or an OCSP response. A relying party may not see the revocation if it does not query status or if its policy still accepts a response produced before revocation. The result depends on the application's revocation, response-freshness, and unavailable-responder policies; failure behavior is an implementation and policy choice.

Do not treat the revocation decision and a verifier seeing the revocation as the same moment. Observe CRL thisUpdate/nextUpdate fields, distribution access, and the verifier's cache and freshness policy together.

cRLReason states why the certificate was revoked; keyCompromise alone does not state when the compromise happened. The separate RFC 5280 Invalidity Date extension can carry the date when compromise was known or suspected, or when the certificate otherwise became invalid. That date may precede the CRL revocationDate, so incident response should inspect both when available.

Separate decisions from issuance to use

Follow one user certificate. CA request permission and template Enroll conditions, certificate issuance, KDC account mapping and resource authorization are separate decisions. The CA can issue a certificate while strong mapping is rejected. Issuance then establishes neither account authentication nor resource access. 11.02–11.04 develop these checks separately.

Suppose renewal produces a new certificate serial. An explicit issuer/serial mapping tied to the old serial must be checked for the new certificate; not every mapping type depends on serial. In the revocation case, the CA decision occurs at 10:00 while the verifier uses a CRL issued at 09:00. A future nextUpdate does not establish that the 10:00 decision appears in that CRL. Inspect the status data actually evaluated by the verifier.

A revoked certificate and an open session

Compare certificate revocation with a fresh PKINIT attempt. A KDC applying current revocation status may reject this certificate. An earlier TGT, service ticket and established application session are separate states; a CA record is not a recall message for them. In this fixture the new attempt is rejected while an earlier ticket is independently observed as unexpired and the application session as open. Those observations do not contradict one another.

In MS-KILE, account-standing validation depends on particular KDC policy and TGT-age conditions; it is not certificate revocation rechecking. Examine ticket-expiry conditions and application session termination using environment evidence. This comparison executes neither a Windows hot-list nor a session-termination operation.

State and data flow

  1. Generate a key pair and control access to, and export of, the private key.
  2. Submit a certificate request; the CA issues the certificate with a validity window.
  3. Near the end of the validity window, renew. Decide together whether to reuse the key pair and whether the mapping will need to change.
  4. If compromise or invalidation is suspected, the CA revokes the certificate and records reason/date information in the CRL entry when available.
  5. The verifier evaluates CRL/OCSP status under its policy. The new attempt’s outcome is separated from observations of earlier tickets and open sessions.

2. Exploitation

Broken trust assumption

A response team is assessing the effects of suspected private-key use. These scenarios are not evidence of a compromised key or a real authentication outcome.

Technical prerequisites

  • The private key is exportable or kept in a context accessible to unauthorized users.
  • A relying party does not check revocation, uses a pre-revocation cached response, or follows a policy that continues acceptance when a current response is unavailable.
  • The certificate remains within its validity window and no other rejection condition applies.

Exploitation mechanism

A password change does not replace a certificate’s private key. Response verifies certificate revocation and use of current status by the verifier. Earlier ticket and session paths require separate investigation; rejection of a fresh certificate attempt does not establish that they ended.

Why a password reset is not enough

In incident response, resetting a password is often the reflex. For certificate-based identity, this step does not renew or revoke the private key; absent another control, the certificate authentication path may remain open.

Relate certificate, mapping and verifier evidence. Separately ask whether tickets were issued or sessions established before revocation. The CA revocation record alone does not establish closure of every identity-use path.

The risk boundary of this example

Collapsing issued, renewed and revoked labels into one “access/no access” field is incorrect. Accepted authentication and resource authorization remain distinct.

3. Defense & Detection

Telemetry scope

  • Maintain an inventory of certificates used for authentication with issuer, serial, validity window, and renewal date.
  • Record where private keys are stored, who can use them, and the export policy; report exportable keys separately.
  • Monitor CRL thisUpdate/nextUpdate and OCSP thisUpdate/nextUpdate together with distribution access and response freshness.
  • Distinguish CA revocationDate, any Invalidity Date and verifier observation time. Record earlier ticket lifetimes and established-session state separately.

Events and relevant fields

  • 4768 · A TGT request in the DC Security log. Updated versions may include PreAuthType and certificate fields; the Event ID alone establishes neither revocation reason nor key compromise.
  • 5136 · Directory-object modification. A matching attribute Write audit SACL and Audit Directory Service Changes are required. A mapping change is not a certificate revocation record.

Manage revocation as a propagation process

A certificate marked revoked by the CA may still be accepted by a verifier without current status. Rejection of a new attempt using current status is one verification step; it does not establish termination of open sessions.

Record CA decision time, verifier use of status and any application-session closure separately. Establish unavailable-responder behavior from the verifier policy.

Validation after the change

Track the certificate by issuer/serial and, where relevant, key identity. Associate request, mapping and verifier observations with their producers. Do not close on the CA revocation record alone without checking CRL/OCSP availability, freshness and policy outcome.

Detection logic · XPath

*[System[(EventID=4768)]]

Query assumptions

  • The query is intended for the Security log on a domain controller and selects Event 4768 records; it is not by itself a PKINIT or revocation-reason filter.
  • Certificate fields and failure representation depend on OS/event version. Read PreAuthType, certificate fields, result code and relevant KDC message together; do not assume a revocation-reason field that is absent.
  • The artifact parsed in this lesson is only a CRL reason-code extension; it is not a complete CRL or a KDC event schema.

False positives

  • Event 4768 is produced heavily during routine Kerberos authentication; it is not by itself an indication of revocation or key compromise.
  • The absence of a relevant record does not prove a revoked certificate was rejected everywhere; another verifier may not query revocation, or the event schema may differ.

Hardening

  • Restrict access to private keys; define key-store, hardware-protection, and export policies. Allow export only as a justified exception.
  • Choose whether renewal also rotates the key and plan that choice together with the mapping form.
  • Specify revocation checking in relying-party policy; do not make fail-open behavior the default when a responder or CRL distribution point is unreachable. Measure CRL/OCSP freshness and update latency.
  • For suspected key compromise, verify rejection of new certificate use and earlier ticket/session states separately. Keep application session-closure evidence distinct from the CA record.

Read the examples

READ THE EXAMPLE TOGETHER

SYNTHETIC TEACHING EXAMPLE

What does this reason extension say,and what is absent?

CRL-entry extension · cRLReason = keyCompromise (DER hex)

01
Extension OID /2.5.29.2155 1d 15

OID identifies cRLReason extension type,not which certificate or compromise time.

02
extnValue /keyCompromise fixture3 bytes · opaque

In this unchanged fixture, OCTET STRING contains 0a 01 01: ENUMERATED 1 / keyCompromise. Embedded DER stays opaque; no full CRL signature, schema or status validation.

What to take away

Unchanged 12 byte fixture only shows cRLReason = keyCompromise. No certificate serial, revocationDate, InvalidityDate or actual compromise time. CRL signature and verifier policy are also absent.

Field names appear only when the bytes match this unchanged teaching fixture. Raw TLV remains available; edits fall back to structural reading. No protocol schema, access decision or cryptography is executed.

Scope of this example

Synthetic, manually constructed DER example; it was not taken from a real CA. The Extension SEQUENCE contains OBJECT IDENTIFIER 2.5.29.21 (RFC 5280 id-ce-cRLReasons) and an OCTET STRING holding ENUMERATED value 1 (keyCompromise). The example contains no Invalidity Date extension and no actual compromise time. The parser decodes TLV structure only; it does not validate signatures, chains, or cryptographic validity.

Open the raw record · ASN1-HEX
30 0a 06 03 55 1d 15 04 03 0a 01 01

READ THE EXAMPLE TOGETHER

SYNTHETIC TEACHING EXAMPLE

What does this observation establish?

Comparison observation worksheet · synthetic

01
serialEpochnew

The serial changed after renewal. Reusing the key does not update an old issuer/serial mapping.

02
mappingMatchfalse

Mapping does not match in this fixture. Issuance, account mapping and resource access are separate decisions.

What to take away

Different causes can produce the same symptom. Compare this worksheet with the lesson’s decision boundaries.

This JSON is a teaching record, not Windows output or an executable request.

Scope of this example

This teaching worksheet is not native Windows output. Values are comparison assumptions; the controls above show which outcomes remain unknown.

Open the raw record · MODEL-JSON
{
  "kind": "teaching-record",
  "synthetic": true,
  "scenario": "E03",
  "certificate": "toy-cert-B",
  "issued": true,
  "keyEpoch": "same",
  "serialEpoch": "new",
  "mappingType": "issuer-serial",
  "mappingMatch": false,
  "verifierCRL": "dated-snapshot",
  "resourceAccess": "not-reached"
}

Two reality checks

Assumption: If the CA revokes a certificate, every relying party rejects it at once.
In fact: Revocation depends on the relying party checking current CRL/OCSP status and on its freshness/failure policy; the CA record does not instantly update every cache.
Assumption: cRLReason tells the exact time of compromise.
In fact: cRLReason is a reason code. The separate RFC 5280 Invalidity Date extension can carry the date when private-key compromise was known or suspected, or when the certificate otherwise became invalid; it may precede revocationDate.

YOUR TURN

Work through this story.

Go beyond recall: change a condition, read evidence, explain the reason for a decision.

1 / 3 · PREDICT

Renewal issues a new serial; explicit mapping refers to the old issuer/serial. What is needed?

Choose an answer

A hint

Which certificate property does the mapping depend on?

Read the answer reasoning

Recheck issuer/serial mapping eligibility for the new certificate.

Even reusing the key pair does not automatically update a mapping tied to the old serial.

2 / 3 · READ EVIDENCE

What information may be missing when the verifier uses this CRL?

Synthetic CA/verifier timing comparison.
CA01 revocation kararı / Decision
2026-10-08T10:00:00Z
Verifier kullanılan CRL thisUpdate / Used CRL
2026-10-08T09:00:00Z
CRL nextUpdate
2026-10-08T12:00:00Z
Choose an answer

A hint

Does a future nextUpdate prove the newer decision is in the list?

Read the answer reasoning

The 10:00 revocation decision may be absent from the 09:00 CRL.

Track the CA decision separately from the status seen by the verifier and its freshness policy.

3 / 3 · EXPLAIN

A fresh attempt applying current revocation is rejected; the old FS01 session is still open. Is this contradictory?

A hint

Separate certificate validation from the lifetime of an existing context.

Read the answer reasoning

It is not contradictory. Fresh certificate validation may reject based on current status; the CA revocation record does not automatically recall earlier TGTs/service tickets or the FS01 session. Expiry and session closure need separate observation.

  • I distinguished a fresh certificate attempt from earlier tickets/sessions.
  • I stated that the CA record is not a session-termination message.

Your explanation is not automatically graded. Compare the checkpoints with your answer.

These are learning practices; they do not affect certification exam scores.

Sources