Name: | S3cr3t_R3c1p3 |
---|---|
Hint: | This damn Meth-Cook encrypted his Recipe. But we found his RSA-Key. For some reason, it is not working. Can you help us? |
Base Points: | Easy - Retired [0] |
Rated Difficulty: | |
v1p3r0u5 | |
Creator: | x41 |
Download and unzip the file and check the hint:
Hint: This damn Meth-Cook encrypted his Recipe. But we found his RSA-Key. For some reason, it is not working. Can you help us?
Files: how_to_make_meth.txt and rsa_private.key
cat rsa_private.key
-----BEGIN RSA PRIVATE KEY-----
bVe3Eqw6Fsz5iptTW3gXbIC3g/cZbvB2MANf/+bd2nCVqkpH6tPd6vOffxcnyqr
5x/XYP7arhqwv/tHF5O8O8FJVTWdVjmV1nq1F9tC/0Q1txje5Oe1soVJ+7KYhRE
kOvkxp0kv+Ck+eTKEI2sz3YQGfCrcKP3uhM3fABzc2fEfRPEiSecaAiyxCHmdAw
8pc0GgTG5h60snIOONDL3ZwdWcGHIQWZwOrxU57D58h3ggnX2Wd9Pn6yIfsoDYj
WGK81DOyARvwy6gKRLiCviOmbDlODfAEJXk+Y3i6r9rpsuzBKoqTveubkSYo8o2
n9hksnIJTe2EQ5lOhW9UI11WKGqRkswqUBTdImhd9a9lgFjqszRNV8tfrgtdmYO
Qgq8gGeeO2iAmfF/zJ4CAwNwOPIch+vTH+DXio146dqdXq/Qi8aIyTnICHhlPIV
3oNYF6505bIY6aWWFJq4Bwk1YYgML96HnjPuAIIpfNp58IOP9WuLGZ9KT4Tba9X
sYOQPJzNIbjdhK550vL36K8tQxrOvXpqi5qP6nU1QC0CedASj4F2MH5zSL1kG62
C/LsskKgKpPVJAzr/pPXWckwATvHVJkwLjioe7YwTkEC2PTHKPGQMoVrT3Ba7Zq
ZID4H89kkLFZ9pNxfM9iOmHikjbEGSgkJk09ZOKNtHKRigZK/8jazLgeeiXMTuu
mF4l06NZje9bqYxbFXGyq/N7NreUqeNN8t61BBMD+1rqlEXkNfMIfJkZC9GX0dk
85JBbaK/MSjWRFdWY8bfhkPULdw1x0kLdBB5toSj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EFxLM17XIsXoNqSDenXOv5HrbTAVHzvBB3ev3D
aSMz9kwJPAy6z6pnCtS6sZuxKjxhuXJKgarUdqoY+jzL8zta0f6+4JORe80wef6
qBLAU/qC3ixGnaOrYRH5zVARur4CAsbme/PiqPqFX3MHLdh/7EALmEQWuQ6q1Yv
gOO3FAu3RKoaUUdM9i2lPpg/9q0hI8YuBfBjTg2ep4MFf7MaPXwIk6j9BMs9Xf4
EgpkFrFwJmieKMRq8VqfayqpJ+/koTQeXQ/ZiCp7Ca3suC/UFhng6mRdVaOUTnx
VPKxsBH750CqPCKfAXngmuDYh7aAyKDryRYzl4YYj8Sx/z9PA7F5rBB4zuiEWnY
2u8MSobiv8DfkUM0hf8/ivwD
-----END RSA PRIVATE KEY-----
If you've played with RSA keys for very long, you'll see that this key doesn't look right. What we have to do, and the hint sort of gives us the clue, is "bake a recipe" to convert the bad key to a good one. The best place to bake a Cyber Recipe is with CyberChef! So, we have an RSA private key so our first logical step is PEM to HEX. That get's us a little closer. Then I use From HEX, but I change the Delimiter to NONE (that's actually a critical step that took me a while to figure out). Once we have that (and the gibberish that comes with it), we can run a RAW Inflate and get what looks more like a working key.
$ cat new.key
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAuKxWy/rLxYyBJvi/dGzPhh5EFGUx9dN8pbMVvC6Z/W/rNfuO
se4OcTaM2oBu0uBmhCj78C+66ba9+pGE/SBL/lq9w/mP5r+ZSFv9G49T/MAlRKQo
Q18EoL3gEjJflslXr5QbqGK6TCgublau7rLUpX4dKa6h+h+x9IH/5RDKt1NGOQQg
C57FST9LSKTIPZpptUqEEnPtKrLZY21xXnizlO470ZPp919se2rehDwwdEJ/HaoI
dcBlFJSWxgGL9p8VgNv2HbMMw0qhl9GUae6h1f4PE3DsM0sa0UUNrL4X//PMf3Cf
S2SimjNJgIyzDCELmnGY+uJ471xFMl+beRnrYGmaId3YdJ+oUYer110CqSS+yo4H
DdQsiocPVsetHpNgwHT9WrMMct+/GlvhuD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Og6770kP6z
kRkb6NTTzTa8uwuYhFVfu+mZfWXsB0eLXEhUeQno2JRFsAV+Bvh6mj/bSMIqH9Fd
jgfydJGPziDpjJY4ed9mbvWxRARxK+1V2nP4S2YXdT1JVZzzSzH3C9/mAAuwA48+
dKw+7GEp02/X+rcI7EP4TDScYTpwnvtSWxiscYjC4TJqHsjMi2Aldz1lNtvwaY3o
KFq+UjhEil7tddBtzcPLFG6jmTn8cF0CggEBAKg/I+4jvokHbKihncB6o0u7yqxf
Z9TBP0/DCGARzZGbHFZRXRW9IXr3bYqEUqLdP2QLKosiotqj6Ttp2nckQhUswsIF
C7Kp2yA37vmRJ3W6xa2E/wxD1+XNfrSXWer5QNt+O0TzPUJU9YGEBj/gIw5BBJMA
iuiHLFa7nyoEZk6Zz8LdP5FXM9/T03KUzpe0lTpPhTXMD/EKQA29zxKM++3J/qjV
Nd249J8qe6IkGII6TbMZYDIB2tunUzcOhkSaUtz20C8UnpIJiGV2opSHdhL4mSfZ
2DMWTH4BUwr/XC/tU5a0wYUpvkDlXTWEmbfzzQ7Ab0L84t1J5ZViPfa/Ylc=
-----END RSA PRIVATE KEY-----
Now that we have the REAL key, we can simply decrypt the file and grab the flag!
$ openssl rsautl -decrypt -inkey new.key -in how_to_make_meth.txt -out decrypt.txt
$ cat decrypt.txt
1. Chemicals
2. Mix 'em
3. HTB{5e59025ae4e2173cc372b7a890dddc75}
4. Profit
And another challenge in the books.