Сравниваем #NotPetya и #Petya — реально ли расшифровать свои файлы? Обновлено



Positive Technologies - NotPetya, , Petya 2016 .

, MFT. .

NotPetya


( Windows) , , — , MBR.

, 0x20 , - «» . 0x20 :

— , MFT ( 0)
— EncryptionKey ( 32 )
— Nonce ( 8 )
— Personal installation key ( 60 «123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz»)

CryptGenRandom, .

0x21 512 0x07.

0x22 MBR, XOR 0x07.

MFT. :

— 0x20,
— MFT ( 1),
— EncryptionKey ,
— EncryptionKey
— 0x20 ,
— 0x21 ( 0x07),
— EncryptionKey + Nonce,
— 0x21 .

MFT EncryptionKey + Nonce. Salsa20, . «expand 32-byte k» «-1nvalid s3ct-id». . , - , , , .

Salsa20 .

, , .

«0123456789abcdef» 32. , - , 32 . - SPONGENT ( ). 128 , EncryptionKey. 0x21, ( 0x07) – MFT MBR.


, . :

  1. Personal installation key, , EncryptionKey. , — . , - CryptGenRandom. — EncryptionKey + Personal installation key , ( , 100%).

  2. - SPONGENT, , , , (129 ), .

  3. EncryptionKey 32*8 == 256 . hex-, , 32*4 == 128 . . 32 32 .

Petya 9 2016


Petya . - . .

, , MBR, , .

:

  1. 0x36-0x39 ( 0x20-0x23 NotPetya).
  2. ( , / ) Petya.
  3. . NotPetya , , , , .
  4. Personal installation key 90 (15 6 ) 60 NotPetya. 58 527 ( 351 NotPetya).
  5. Petya secp256k1 secp192k1, , Personal installation key EncryptionKey, .
  6. , , «123456789abcdefghijkmnopqrstuvwxABCDEFGHJKLMNPQRSTUVWX» 16 .
  7. SPONGENT ( - ).
  8. Salsa20 «expand 32-byte k». , , Petya ( ), NotPetya, , .

Petya:



NotPetya:



, Petya, NotPetya .

, NotPetya , Petya . — . , . 2016 , Petya, .

UPD



Petya 2016 , (1, 2) mischa , PetyaGoldenEye.malware, VirusTotal .

, NotPetya , MBR, , PetyaGoldenEye: SHA256:b5ef16922e2c76b09edd71471dd837e89811c5e658406a8495c1364d0d9dc690.

NotPetya PetyaGoldenEye:





. .

- SPONGENT



, SPONGENT , . permute() «lfsr» spongent() , Null-terminated , , NotPetya.
, LFSR == 0x9E ( SPONGENT-256/256/16) 140 , NotPetya 0xA3 152 ( ).

Salsa20



, Salsa20 , , . s20_expand32() «o» s20_littleendian() «return *(__int16*)b;», NotPetya.

- , s20_littleendian() (, 16- ), «keystream» . 128-, 256-. , 128- .



Petya MFT ( ) , GitHub.

(Petya Red) , .

(Petya Green, PetyaGoldenEye) , , . , .

NotPetya, , Petya . PetyaGoldenEye, .

, NotPetya, .


Source: https://habr.com/ru/post/J331962/


All Articles