Demonslay335

Kraken Encrypted File Notes

Aug 23rd, 2018
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. master_private_key - unlocks all victim's session_key's (of this sample at the least)
  2. master_public_key - encrypts session_key (RSA-2048)
  3. session_key - unlocks all files (unlocks file_key, filesize_key, and filename_key) (RC4)
  4. file_key - unlocks specific file (AES-256)
  5. filesize_key - unlocks the original filesize (Salsa20)
  6. filename_key - unlocks the original filename (Salsa20)
  7.  
  8. Ransom note contains the RSA(session_key, master_public_key)
  9. All keys (with exception of master_key) are generated securely by RNGCryptoServiceProvider, aka CryptGenRandom
  10.  
  11. File Format (spaced for readability)
  12. ----------------------
  13. <AES(filebytes, file_key)> : 0x00 - -0x200
  14. <first 16 original bytes> : 0x10 bytes
  15. <last 16 original bytes> : 0x10 bytes
  16.  
  17. <RC4(file_key, session_key)> : 0x20 bytes
  18. <SHA256(file_key)> : 0x20 bytes
  19.  
  20. <Salsa20(filesize, filesize_key)> : 0x20 bytes
  21. <RC4(filesize_key, session_key)> : 0x20 bytes
  22. <SHA256(filesize_key)> : 0x20 bytes
  23.  
  24. <Salsa20(filename, filename_key)> : 0x100 bytes
  25. <RC4(filename_key, session_key)> : 0x20 bytes
  26. <SHA256(filename_key)> : 0x20 bytes
  27.  
  28. ----------------------
  29.  
  30. Or pseudo-struct:
  31.  
  32. struct KrakenEncryptedFile{
  33. BYTE *AesEncryptedFileBytes;
  34. BYTE FirstOriginalBlock[0x10];
  35. BYTE LastOriginalBlock[0x10];
  36.  
  37. BYTE Rc4EncryptedAesKey[0x20];
  38. BYTE Sha256HashedAesKey[0x20];
  39.  
  40. BYTE Salsa20EncryptedFileSize[0x20];
  41. BYTE Rc4EncryptedFileSizeKey[0x20];
  42. BYTE Sha256HashedFileSizeKey[0x20];
  43.  
  44. BYTE Salsa20EncryptedFileName[0x100];
  45. BYTE Rc4EncryptedFileNameKey[0x20];
  46. BYTE Sha256HashedFileNameKey[0x20];
  47. }
Add Comment
Please, Sign In to add comment