BICS77{trust_is_built_both_ways_775383}The challenge provided a description about a "Kingdom Archive" protected by a "strict gatekeeper" that requires visitors to be "recognized".
private_records, which turned out to be an RSA Private Key.Connecting to the server via HTTPS revealed the server's certificate chain:
curl -v -k https://pods.shibirsec.qzz.io:37422/
The server's certificate was issued by:
C=BD, O=GovRootCA, CN=RootCAThis tells us that the server trusts certificates signed by "GovRootCA".
We possess private_records, which acts as the Root CA's private key. This means we can:
We generated a self-signed Root CA certificate using the leaked private key, ensuring the Subject matched the server's expectation exactly.
# Create local Root CA cert
openssl req -new -x509 -key private_records -out ca.crt -days 3650 \
-subj "/C=BD/O=GovRootCA/CN=RootCA"
We created a new identity for ourselves (Client Key + CSR). The specific details (CN, O) turned out not to matter, as long as the signature was valid.
# Generate Client Key
openssl genrsa -out client.key 2048
# Generate CSR (Certificate Signing Request)
openssl req -new -key client.key -out client.csr \
-subj "/C=BD/O=Ministry2/CN=Visitor"
# Sign the Client Cert using the Authority's Key
openssl x509 -req -in client.csr \
-CA ca.crt -CAkey private_records -CAcreateserial \
-out client.crt -days 365
With the valid client.crt and client.key, we authenticated to the endpoint.
curl -k --cert client.crt --key client.key https://pods.shibirsec.qzz.io:37422/flag
The server verified our certificate's signature against its trusted root (which effectively matched our private_records).
Flag: BICS77{trust_is_built_both_ways_775383}