728x90
728x170

새로운 워너크라이 해독용 툴이 등장했다

윈도XP부터 윈도7까지 버전이 설치된 컴퓨터의 워너크라이 랜섬웨어 암호화를 풀 수 있도록 돕는 기술이다.

미국 씨넷은 지난 19일 '워너키위'(WanaKiwi)라는 워너크라이 해독용 툴을 소개했다. 세계적인 랜섬웨어 공격에 당한 피해 사례를 도울 수 있는 최초의 구세주가 될 수 있다고 묘사했다.

워너크라이 랜섬웨어는 감염시킨 컴퓨터에 보관된 주요 파일을 윈도 암호화 API로 무단 암호화하고, 그 복호화 키를 따로 안전하게 보관한 뒤 없앤다. 이 복호화 키를 찾지 못하면 감염 피해자는 해당 파일을 직접 복구할 수 없기 때문에, 악성코드가 요구하는 비트코인을 복구 대가로 지불하거나 파일 되살리기를 포기할 수 밖에 없다.

워너키위 툴은 워너크라이 랜섬웨어에 감염된 후 컴퓨터 어딘가에 보관된 복호화 키를 찾아낸다. 이보다 먼저 공개된 툴 '워너키(WannaKey)'도 워너키위와 비슷한 역할을 한다. 하지만 워너키는 윈도XP 환경만 지원한다는 제약이 있었다. 워너키위는 윈도비스타, 윈도7에도 쓸 수 있다. 감염 후 재부팅을 하지 않은 컴퓨터에서만 쓸 수 있다는 제약은 공통적이다.

워너키는 프랑스 회사 �o스랩의 아드리앵 기네 연구원이 만들어 선보인 툴이다. 그는 윈도XP 기기에서 메모리에 남아 있는 워너크라이 랜섬웨어가 사용한 RSA 암호화 키를 복구하고 그걸로 복호화 코드를 생성한다. 워너크라이 공격을 당한 컴퓨터엔 복호화 키가 만들어지고 이는 컴퓨터가 재부팅되기 전까지 메모리에 숨여져 남아 있게 된다는 점을 이용했다.

또다른 프랑스 연구원 벤자민 델피(Benjamin Delpy)는 이 기술을 윈도7 버전 운영체제(OS)까지 적용할 수 있도록 업그레이드한 툴을 내놨다. 그게 워너키위다. 워너키위를 구동하면 암호화 처리 동작의 기초 구성요소인 키를 컴퓨터 메모리에서 찾는다. 다만 감염된 컴퓨터를 재부팅했을 경우 이 키는 없어졌을 수도 있다.

미국 씨넷은 "재부팅하지 않은 컴퓨터라면 워너키위는 암호화를 풀 수 있는 키를 복구해 무단으로 암호화된 파일을 고쳐줄 것"이라며 "향후 다른 파일의 암호화 피해도 예방될 것"이라고 덧붙였다. 또 "워너크라이 변종이나 이를 흉내낸 랜섬웨어가 계속 등장해 컴퓨터를 감염시키는 만큼, 새로운 감염 피해자가 워너키위같은 툴을 원할 것"이라고 평했다.

출처 : http://m.news.naver.com/read.nhn?sid1=105&oid=092&aid=0002117044

 

아래는 해당 파일을 다운 받을수 있는 깃허브 경로입니다.

https://github.com/gentilkiwi/wanakiwi

첨부  :  wanakiwi-master.zip

이하는 깃허브 소개 내용

Introduction

This utility allows machines infected by the WannaCry ransomware to recover their files.

wanakiwi is based on wanadecrypt which makes possible for lucky users to :

  • Recover the private user key in memory to save it as 00000000.dky
  • Decrypt all of their files

The Primes extraction method is based on Adrien Guinet's wannakey which consist of scanning the WannaCry process memory to recover the prime numbers that were not cleaned during CryptReleaseContext().

Adrien's method was originally described as only valid for Windows XP but @msuiche and I proved this can be extended to Windows 7.

Alt text

Usage

Process access

wanakiwi.exe [/pid:PID|/process:program.exe]

pid or process are optional parameters, by default the utility will look for any of this process:

  • wnry.exe
  • wcry.exe
  • data_1.exe
  • ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa.exe
  • tasksche.exe

Limitations

Given the fact this method relies on scanning the address space of the process that generated those keys, this means that if this process had been killed by, for instance, a reboot - the original process memory will be lost. It is very important for users to NOT reboot their system before trying this tool.

Secondly, because of the same reason we do not know how long the prime numbers will be kept in the address space before being reused by the process. This is why it is important to try this utility ASAP.

This is not a perfect tool, but this has been so far the best solution for victims who had no backup.

Compatibility

O.S. x86 x64
Windows XP ?
Windows 2003 ?
Windows 7 ?

Frequently Asked Questions

Does it modify the original encrypted files ?

No, the original encrypted files (.WNCRY) remain unmodified. The decrypted files are generated as separate files.

Does it work on an infected machine that had been rebooted or shutdown ?

No, the whole point is to be able to analyze the process memory of the process which created the keys. If it had been shutdown or rebooted, this memory state is lost.

What about hibernated machines ?

Yes, when you hibernate your machine it actually saves the state of memory on disk which allows to keep the process memory state. In those scenarios, a machine which has been hibernated for multiple days has her memory state intact and identical to the day it hibernated. Which actually raises your chances of file recovery.

What shall we do after recovering our files ?

We strongly recommend you to immediately back up those decovered files on an external empty disk before rebooting or shutting down your machine - including the 00000000.dky file generated by wanakiwi which is the decryption key. Once you backed-up up your recovered files, we recommend you to reinstall a fresh version of Windows.

Acknowledgement

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)

With BIG thanks and love to:

  • @msuiche <3
  • @halsten
  • @malwareunicorn
  • @adriengnt

Resources

 

728x90
그리드형
Posted by kjun
,