Guest User

How to decrypt and change the Cook Key in Ubuntu 14.04

a guest
Oct 26th, 2020
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.33 KB | None | 0 0
  1. 1) Dump Cook Key to image file (device sr0 could be different on your system, it should be the device of the Cook Key USB Pendrive):
  2. sudo dd if=/dev/sr0 of=image.img bs=1M
  3.  
  4. 2) Make a backup of the Cook Key image:
  5. cp image.img backup.img
  6.  
  7. 2a) Compress the backup image to ~10MB:
  8. 7z a -t7z -m0=lzma2 -mx=9 -aoa -mfb=64 -md=32m -ms=on backup.7z backup.img
  9.  
  10. 3) Insert Ikaro's key and the path to kernel dump file in calc key calc_key.py phython script (https://pastebin.com/EzVu3yH0) and run:
  11. python calc_key.py
  12.  
  13. 4) Compile the crypto-losetup (https://www.mikrocontroller.net/topic/thermomix-rezeptchips#5637422) and use the calculated key to decrypt the image from the Cook Key:
  14. sudo modprobe cryptoloop
  15. gcc -o crypto-losetup crypto-losetup.c
  16. sudo ./crypto-losetup /dev/loop0 path/to/img {calculated key}
  17. mkdir mnt enc_dump
  18. sudo mount /dev/loop0 mnt
  19. sudo cp -r mnt/* enc_dump/
  20.  
  21. 5) Change the files in 'enc_dump' folder with new recipes, images, etc.
  22.  
  23. 6) Create new squashfs filesystem and write to the image.img file:
  24. mksquashfs enc_dump edit.img -comp lzo
  25. sudo dd if=edit.img of=/dev/loop0 bs=1M
  26. sudo umount mnt
  27. sudo losetup -d /dev/loop0
  28.  
  29. 7) Write image.img back to the Cook Key or USB Pendrive that can be read by the machine
  30. sudo dd if=image.img of=/dev/sr0 bs=1M
  31.  
  32. 8) Change serial of the USB Pendrive to: "0 0;exit 0" (without quotes)
Add Comment
Please, Sign In to add comment