A succesfull business person was once approached by a hooded figure, who handed them a piece of paper with a bunch of letter scribbled on it. The mysterious figure only said "remember where you've been to remind yourself of who you are".
Anyway they couldn't make heads or tails of any of it and tossed the note, think you could do better?
-----BEGIN CERTIFICATE-----
MIIExzCCA68CFHQ55xEtHWVwoFkX/v8neG1rYc8sMA0GCSqGSIb3DQEBCwUAMIIB
HjELMAkGA1UEBhMCRkkxUTBPBgNVBAgMSE1DRkhQbDVCV1VkSFhrRkxOajFmUmxs
SFhsNVlXVWRNTHp0U1BWNWVRVmxlWGw1VEtEOVZLa0ZaUjE1SFFWbFZMeVF3T2tk
ZTFRME8GA1UEBwxIWGtGQVIxNU1TeU1pVzE1QldVZEhYa0ZMTmlaVksxbEhYbDVZ
V1VkTUx6c2hNMTVlUVZsZVhsNVRVeVJaVzBGWlIxNUhRVms9MS0wKwYDVQQKDCRJ
IGRvbid0IGhhdmUgZXllcywgYnV0IG9uY2UgZGlkIHNlZS4xHTAbBgNVBAsMFEkg
b25jZSBoYWQgdGhvdWdodHMsMRswGQYDVQQDDBJub3cgd2hpdGUgJiBlbXB0eS4w
HhcNMjMwMjI2MTUwNDM0WhcNMjMwMzI4MTUwNDM0WjCCAR4xCzAJBgNVBAYTAkZJ
MVEwTwYDVQQIDEhNQ0ZIUGw1QldVZEhYa0ZMTmoxZlJsbEhYbDVZV1VkTUx6dFNQ
VjVlUVZsZVhsNVRLRDlWS2tGWlIxNUhRVmxWTHlRd09rZGUxUTBPBgNVBAcMSFhr
RkFSMTVNU3lNaVcxNUJXVWRIWGtGTE5pWlZLMWxIWGw1WVdVZE1MenNoTTE1ZVFW
bGVYbDVUVXlSWlcwRlpSMTVIUVZrPTEtMCsGA1UECgwkSSBkb24ndCBoYXZlIGV5
ZXMsIGJ1dCBvbmNlIGRpZCBzZWUuMR0wGwYDVQQLDBRJIG9uY2UgaGFkIHRob3Vn
aHRzLDEbMBkGA1UEAwwSbm93IHdoaXRlICYgZW1wdHkuMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEAzTpZzkE7O8h6701PZSMW2IJPhLVIurmEtO6oGbxL
l5yzBKrCwupujzHm6x+r96RrwGFCKILRkurgv98GDfVbGEAIM6q6mcd9e4z2IAXJ
JPhT/MFQuwhuc8JS+VNS8i5/U29Pz782OA8jWWAIvjpRO/f3uR8ZoAWn1uAKD00d
jf1KAU+SF7fNuCkfVgFvA44EdH5mTxaVetnZ2dvQy0Pru1bTzEq/dy01MB8s4TCc
detVPVY1uOp3M6+VYwl5T7e925l4Nu5zuMQO8DeYfkv87Sj/ZyGwpdAQkoVyABva
aUZ2EhZ+p8rTVmwYJAJD9JeQ0ccUNoRgkXQu40xrT/TPpQIDAQABMA0GCSqGSIb3
DQEBCwUAA4IBAQBeueu81ht1njw3uc7YIxxbQAwD0qLfjId7fTYT55eoCvXN327z
IErq11V6iEZVsE18ISldTZ8adYr6z/YyALg424SkkI6ThGMmJHuiL/75rUND/6j+
od4jo3LclR9C2yc1LWvQ6pcXmmd2XCYXKx/KRfCKGIcCHPN660RVG56RsSV8b3P9
5GvB8u9GlA8CtQ/4LNpwDyIt+Zr0o2rG3mUFkhiVzBLKVeDH/bqQyxR/ZFeyKbI/
xYeAqdOZ3L63/2cfu9j4Sg9QZUYs1aeZrJn7B3UK/GBrMaPL5A5xPCnxVOrTH2ju
rgclATNzfpCV+qn2RKYtrrTBmNlAoVsnofwb
-----END CERTIFICATE-----
- inspect provided certificate with, say, openssl:
openssl x509 -in cert.txt -text
- the State and Locality fields contain a split-up base64 encoded string
- decoding the string, it seems encrypted
- the Organization Name, Organizational Unit Name & Common Name fields contain a riddle
- the solution to the riddle is the ASCII key to XOR the encoded string with
- this results in 9 Open Location Codes (or "plus codes")
- decoding the OLCs to latitudes and longitudes gives 18 integers in the printable ASCII range
- decoding the integers to an ASCII string results in the flag: FLG{M3MEN70-MOR1!}
This can be done manually with tools like CyberChef (https://gchq.github.io/CyberChef/) and dCode's Open Location decoder (https://www.dcode.fr/open-location-code), an example solution in a simple Python script is provided below
from base64 import b64decode
from itertools import cycle
from openlocationcode import openlocationcode as olc
encoded_cipher = 'MCFHPl5BWUdHXkFLNj1fRllHXl5YWUdMLztSPV5eQVleXl5TKD9VKkFZR15HQVlVLyQwOkdeXkFAR15MSyMiW15BWUdHXkFLNiZVK1lHXl5YWUdMLzshM15eQVleXl5TUyRZW0FZR15HQVk='
riddle_solution = 'skull'
olcs = ''.join(chr(c^ord(k)) for c, k in zip(b64decode(encoded_cipher), cycle(riddle_solution))).split()
for code in olcs:
a, b = olc.decode(code).latlng()
print(end=f"{chr(int(a))}{chr(int(b))}")
Generate the encrypted string:
from base64 import b64encode
from itertools import cycle
from openlocationcode import openlocationcode as olc
flag = 'FLG{M3MEN70-MOR1!}'
riddle_solution = 'skull'
coords = [(ord(flag[i]), ord(flag[i+1])) for i in range(0, len(flag), 2)]
plaintext = ''
for coord in coords:
plaintext += f'{olc.encode(coord[0], coord[1])} '
ciphertext = ''.join(chr(c^ord(k)) for c, k in zip(plaintext.strip(), cycle(riddle_solution)))
print(b64encode(ciphertext))
Create the certificate openssl req -nodes -newkey rsa:2048 -x509 -subj "/C=FI/ST=MCFHPl5BWUdHXkFLNj1fRllHXl5YWUdMLztSPV5eQVleXl5TKD9VKkFZR15HQVlVLyQwOkde/L=XkFAR15MSyMiW15BWUdHXkFLNiZVK1lHXl5YWUdMLzshM15eQVleXl5TUyRZW0FZR15HQVk=/O=I don't have eyes, but once did see./OU=I once had thoughts,/CN=now white & empty." -text