As I mentioned in an earlier blog post, I’ve recently been messing around with various CTF challenges. Often, to advance to the next level you usually need to hunt for eggs which contain encrypted/encoded passwords.
After finding the password file you need to decrypt/decode the encrypted/encoded password string. Most of the time you’re told what the string is encrypted in, probably out of mercy so you don’t spend an afternoon banging your head against a desk.
There are some neat ways to decrypt strings through bash, here are a few ways:
If you’re ever in the rare situation where you need to rotate an alphabetical set by 13 characters (Caesar Cipher) you could use the tr command.
Or in the situation where something is encoded by base64 you can use the built-in base64 command.
There are plenty more ways to decrypt or decode strings. A neat tool that I have used to identify which hash algorithm is being used on cipher text is Hash Identifier.