Skip to content

thomasleplus/cyberchef-recipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

cyberchef-recipes

A few useful CyberChef recipes.

JWT Decode

This is the recipe to decode a JWT token. The steps are:

  1. URL decoding
  2. Base64 decoding (for each section)
  3. Remove the signature blob
  4. JSON formating (easier to read)

https://gchq.github.io/CyberChef/#recipe=URL_Decode()Fork('.','%5C%5Cn',false)From_Base64('A-Za-z0-9%2B/%3D',true,false)Filter('Line%20feed','%5E%7B.*%7D$',false)JSON_Beautify('%20%20%20%20',false,true)

jwt.io is probably a better alternative but the above recipe can be a starting point if you're going to do further operations on the decoded JWT.

SAML Decode

This is the recipe to decode a SAML assertion. The steps are:

  1. URL decoding
  2. Base64 decoding
  3. Decompression
  4. XML formating (easier to read)

https://gchq.github.io/CyberChef/#recipe=URL_Decode()From_Base64('A-Za-z0-9%2B/%3D',true,false)Raw_Inflate(0,0,'Adaptive',false,true)XML_Beautify('%5C%5Ct')

ROT8000

This one is not really a recipe but more of a fun operation that I contributed to the CyberChef project. ROT8000 is a Caesar cipher shifting characters by 8000 in the Unicode charset, the same way ROT13 shifts latin characters by 13 in the latin alphabet. Also similarly to ROT13, ROT8000 is an involution meaning that if you apply it twice, you end up with the original plaintext message (in other words the ciphering and deciphering functions are the same). A more detailed description of the ROT8000 function can be found on its inventor's page. This is not encryption nor secure in any way, shape or form! Use it just for fun.

Coincidently, with ROT8000 latin characters typically end up in the Chinese symbol section of the Unicode charset. So latin text ciphered with ROT8000 looks like Chinese text to a casual observer (unless you can read Chinese and then it's pretty obvious that the text is gibberish). In this recipe you can see an example and if you enable the second ROT8000 function in the recipe you can see how the text gets deciphered back to its original plaintext:

https://gchq.github.io/CyberChef/#recipe=ROT8000()ROT8000(/disabled)&input=VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4&oenc=65001