PEMogite
PEMogite
Platform: CUSTOM | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: certificate_inspection
Summary
Walkthrough of the CUSTOM Crypto PEMogite. Task: Analyze an X.509 PEM certificate file. Solution: Use openssl to inspect certificate fields; flag was hidden in the ST (State/Province) field.
Description
A task on analyzing an X.509 PEM certificate. Given a certificate file in PEM format (base64-encoded).
Analysis
PEM (Privacy-Enhanced Mail) is a format for encoding binary data in base64 with characteristic headers -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
X.509 certificates contain multiple fields:
- Subject (CN, O, OU, L, ST, C)
- Issuer
- Validity (Not Before, Not After)
- Public Key
- Extensions
The flag can be hidden in any of the certificate's text fields.
Solution
Step 1: View the certificate
bash read-only • copy allowedopenssl x509 -in certificate.pem -text -noout
Step 2: Analyze Subject fields
In the openssl output we see the State/Province (ST) field:
Subject: C = RU, ST = Saint Petersburg, spbctf{REDACTED}, L = ...
The flag was embedded directly in the ST (State/Province) field of the certificate.
Alternative method
bash read-only • copy allowed# Decode base64 and look for strings base64 -d certificate.pem | strings | grep -i flag base64 -d certificate.pem | strings | grep -i spbctf
Key Takeaways / Lessons
- Mastering certificate_inspection was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2026-03-09 • CUSTOM • PEMogite • Difficulty: Easy