← Back to Writeups
CUSTOMEasyOSINT

Transparency

XESXOR9/2/20263 min read
#osint#custom#easy#certificate_transparency_searc#public_key_fingerprinting#subdomain_enumeration#linux

Transparency

Platform: cryptohack | Category: OSINT | Type: Challenge | Difficulty: Easy | OS: Linux | Author: XESXOR | Date: 2026-06-21 | Status: Solved Techniques: certificate_transparency_search, public_key_fingerprinting, subdomain_enumeration

Summary

Task: given a 2048-bit RSA public key in PEM, find the cryptohack.org subdomain whose TLS certificate uses it and visit it for the flag. Solution: enumerate all subdomains via Certificate Transparency logs (crt.sh JSON API) and find the giveaway subdomain hosting the flag.

Transparency — CryptoHack

Description

Since 2018, Certificate Transparency has been enforced by Google Chrome. All certificate authorities must publish all certificates that they issue to a log, which anyone can search.

Find the subdomain of cryptohack.org which uses these parameters in its TLS certificate, and visit that subdomain to obtain the flag.

We are given an RSA public key in PEM format (transparency.pem). The goal is to identify which subdomain of cryptohack.org serves a TLS certificate with this key and browse to it to recover the flag. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Analysis

The provided file is a standard 2048-bit RSA public key:

bash
openssl pkey -pubin -in transparency.pem -text -noout
openssl rsa  -pubin -in transparency.pem -noout -modulus

The key itself is not the puzzle — the lesson is Certificate Transparency (CT). Since 2018, Chrome requires every publicly trusted certificate to be logged in append-only, publicly auditable CT logs. This means that every certificate ever issued for any *.cryptohack.org host is searchable, which turns CT logs into a powerful passive subdomain-enumeration / OSINT primitive. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

The intended approach: query a CT log aggregator (crt.sh) for all certificates issued under cryptohack.org, list the distinct hostnames, and the challenge subdomain is named so obviously that no key matching is even required.

Solution

1. Inspect the key (confirm it is a normal RSA pubkey)

bash
openssl pkey -pubin -in transparency.pem -text -noout

2. Enumerate subdomains via Certificate Transparency (crt.sh)

crt.sh exposes a JSON API backed by the CT logs. Its Postgres backend is flaky and frequently returns HTTP 503 / "server conn crashed", so retry with backoff and use the lighter exclude=expired filter: ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

bash
curl -s "https://crt.sh/?q=cryptohack.org&output=json&exclude=expired" \
  -o crt.json

Parse out the unique hostnames:

python
#!/usr/bin/env python3
import json

with open("crt.json") as f:
    data = json.load(f)

hosts = set()
for entry in data:
    for field in ("common_name", "name_value"):
        val = entry.get(field, "")
        for name in val.split("\n"):
            name = name.strip().lstrip("*.")
            if name.endswith("cryptohack.org"):
                hosts.add(name)
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

for h in sorted(hosts):
    print(h)

Output includes the usual hosts and one obvious giveaway:

aes.cryptohack.org
blog.cryptohack.org
thetransparencyflagishere.cryptohack.org   <-- the answer
tls1.cryptohack.org
tls2.cryptohack.org
tls3.cryptohack.org
web.cryptohack.org
www.cryptohack.org

3. Visit the subdomain and grab the flag

bash
curl -s "https://thetransparencyflagishere.cryptohack.org/" | grep -oE 'crypto\{[^}]+\}'

4. (Optional) Confirm via public-key fingerprinting

A leaked public key can be fingerprinted by its modulus or the SHA-256 of the SubjectPublicKeyInfo and matched against CT log entries to identify the host: ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

bash
openssl pkey -pubin -in transparency.pem -outform DER | \
  openssl dgst -sha256

Note: the live certificate for thetransparencyflagishere.cryptohack.org has since been rotated, so its current modulus differs from transparency.pem — but the subdomain identity is the intended answer, and historical CT entries still confirm the match. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍