Public Key Infrastructure (PKI) Lab

Introduction

This lab explores the foundation of Public Key Infrastructure (PKI), focusing on digital certificate creation, Certificate Authority (CA) configuration, and web server authentication. PKI provides the necessary trust model to validate public keys, protecting users from Man-in-the-Middle (MITM) attacks during encrypted web communication. The lab also simulates a real-world attack scenario where a compromised CA is used to sign a malicious certificate.

Design

The lab environment was created using Docker containers and configured to simulate secure and insecure HTTPS scenarios. It included generating a self-signed root CA certificate, signing server certificates for a legitimate domain, and forging a certificate for a malicious domain to study browser behavior under compromised trust conditions.

Docker was set up with shared volumes for transferring keys and certificates between the host and containers. OpenSSL was used for certificate creation and signing, while Apache was configured to serve HTTPS traffic using the generated certificates.

The lab infrastructure included:

My goal

My goals in this lab included:

Results & Conclusion

The lab successfully demonstrated both the protection and vulnerabilities of PKI systems.

Pros:

Cons:

This lab underscored the importance of secure key storage, certificate verification, and user awareness. While PKI provides strong security guarantees, its effectiveness depends on trusted CAs, user caution, and secure implementation practices.

References