Technical posts/Windows

[보안이슈] 워너크라이(Wannacypt) 랜섬웨어 관련

ODB 2017. 5. 15. 08:52

WannaCrypt ransomware worm targets out-of-date systems

https://blogs.technet.microsoft.com/mmpc/2017/05/12/wannacrypt-ransomware-worm-targets-out-of-date-systems/


하아... 랜섬이 나타났다

MS사에서도 급하게 패치를 배포했다는 그녀석


우리나라에서는 왜 워너크라이로 알려지고 있는지 알수는 없지만

그의 정식 이름은 WannaCrypt이다


SMB의 취약점을 타고 들어와서 활동하지만


The exploit code used by WannaCrypt was designed to work only against unpatched Windows 7 and Windows Server 2008 (or earlier OS) systems, so Windows 10 PCs are not affected by this attack.


윈도우 10은 영향받지 않는다..


그리고 보안회사 직원이 구매했다는 도메인은


The dropper tries to connect the following domain using the API InternetOpenUrlA():

hxxp://www[.]iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com

If connection is successful, the threat does not infect the system further with ransomware or try to exploit other systems to spread; it simply stops execution. However, if the connection fails, the dropper proceeds to drop the ransomware and creates a service on the system.

http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com 으로 

접속하면

sinkhole.tech로

127.0.0.1인 루프백 주소로 보내버린다


다시한번 22세 영국청년 고마워요 ㅎㅎ


랜섬웨어가 실행되면

When run, WannaCrypt creates the following registry keys:

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\\<random string> = “<malware working directory>\tasksche.exe”
  • HKLM\SOFTWARE\WanaCrypt0r\\wd = “<malware working directory>”
위 두 레지스트리가 써지면서 동작한다
(감염여부 확인을 위해 해당 레지스트리값이 있는지 확인한다)

It changes the wallpaper to a ransom message by modifying the following registry key:

  • HKCU\Control Panel\Desktop\Wallpaper: “<malware working directory>\@WanaDecryptor@.bmp”
바탕화면이 저렇게 바뀌고

It creates the following files in the malware’s working directory:

  • 00000000.eky
  • 00000000.pky
  • 00000000.res
  • 274901494632976.bat
  • @Please_Read_Me@.txt
  • @WanaDecryptor@.bmp
  • @WanaDecryptor@.exe
  • b.wnry
  • c.wnry
  • f.wnry
  • m.vbs
  • msg\m_bulgarian.wnry
  • msg\m_chinese (simplified).wnry
  • msg\m_chinese (traditional).wnry
  • msg\m_croatian.wnry
  • msg\m_czech.wnry
  • msg\m_danish.wnry
  • msg\m_dutch.wnry
  • msg\m_english.wnry
  • msg\m_filipino.wnry
  • msg\m_finnish.wnry
  • msg\m_french.wnry
  • msg\m_german.wnry
  • msg\m_greek.wnry
  • msg\m_indonesian.wnry
  • msg\m_italian.wnry
  • msg\m_japanese.wnry
  • msg\m_korean.wnry
  • msg\m_latvian.wnry
  • msg\m_norwegian.wnry
  • msg\m_polish.wnry
  • msg\m_portuguese.wnry
  • msg\m_romanian.wnry
  • msg\m_russian.wnry
  • msg\m_slovak.wnry
  • msg\m_spanish.wnry
  • msg\m_swedish.wnry
  • msg\m_turkish.wnry
  • msg\m_vietnamese.wnry
  • r.wnry
  • s.wnry
  • t.wnry
  • TaskData\Tor\libeay32.dll
  • TaskData\Tor\libevent-2-0-5.dll
  • TaskData\Tor\libevent_core-2-0-5.dll
  • TaskData\Tor\libevent_extra-2-0-5.dll
  • TaskData\Tor\libgcc_s_sjlj-1.dll
  • TaskData\Tor\libssp-0.dll
  • TaskData\Tor\ssleay32.dll
  • TaskData\Tor\taskhsvc.exe
  • TaskData\Tor\tor.exe
  • TaskData\Tor\zlib1.dll
  • taskdl.exe
  • taskse.exe
  • u.wnry
랜섬웨어가 활동하는 경로에 위의 파일들이 생성된다

WannaCrypt may also create the following files:

  • %SystemRoot%\tasksche.exe
  • %SystemDrive%\intel\<random directory name>\tasksche.exe
  • %ProgramData%\<random directory name>\tasksche.exe
위쪽에 파일도 추가 생성된다
(지금 당장 파일이 있는지 확인하자)
쳇 tasksche.exe가 아니고 다른 이름이 될수도 있다고 한다

걸리는 확장자명은
Then it searches the whole computer for any file with any of the following file name extensions: .123, .jpeg , .rb , .602 , .jpg , .rtf , .doc , .js , .sch , .3dm , .jsp , .sh , .3ds , .key , .sldm , .3g2 , .lay , .sldm , .3gp , .lay6 , .sldx , .7z , .ldf , .slk , .accdb , .m3u , .sln , .aes , .m4u , .snt , .ai , .max , .sql , .ARC , .mdb , .sqlite3 , .asc , .mdf , .sqlitedb , .asf , .mid , .stc , .asm , .mkv , .std , .asp , .mml , .sti , .avi , .mov , .stw , .backup , .mp3 , .suo , .bak , .mp4 , .svg , .bat , .mpeg , .swf , .bmp , .mpg , .sxc , .brd , .msg , .sxd , .bz2 , .myd , .sxi , .c , .myi , .sxm , .cgm , .nef , .sxw , .class , .odb , .tar , .cmd , .odg , .tbk , .cpp , .odp , .tgz , .crt , .ods , .tif , .cs , .odt , .tiff , .csr , .onetoc2 , .txt , .csv , .ost , .uop , .db , .otg , .uot , .dbf , .otp , .vb , .dch , .ots , .vbs , .der” , .ott , .vcd , .dif , .p12 , .vdi , .dip , .PAQ , .vmdk , .djvu , .pas , .vmx , .docb , .pdf , .vob , .docm , .pem , .vsd , .docx , .pfx , .vsdx , .dot , .php , .wav , .dotm , .pl , .wb2 , .dotx , .png , .wk1 , .dwg , .pot , .wks , .edb , .potm , .wma , .eml , .potx , .wmv , .fla , .ppam , .xlc , .flv , .pps , .xlm , .frm , .ppsm , .xls , .gif , .ppsx , .xlsb , .gpg , .ppt , .xlsm , .gz , .pptm , .xlsx , .h , .pptx , .xlt , .hwp , .ps1 , .xltm , .ibd , .psd , .xltx , .iso , .pst , .xlw , .jar , .rar , .zip , .java , .raw
인데...

생각을 곰곰히 해보면
보통 디비들은 dbf같은 확장자를 사용하는데
abc.dbf 파일을 abc.dbf.937 라는 식으로 뒤에 마스킹을 추가로 하거나
아니면 dbf말고 fbd 로 뒤집거나
해버리면 어떻게 되는지 정말 궁금하다
랜섬으로 테스트 해보고 싶은 마음은 없다...

WannaCrypt에 걸려서 암호화가 되면 확장자가 WNCRY로 변경되었다
앗! 위의 호기심은 해결될것 같다
뒤에 확장자 추가하는것, 확장자명 변경 모두 작동할것 같습니다
WNCRY라고 변경된 파일은 추가로 암호화 하지 않기 때문에 마지막 최종 확장자만 확인하는것 같다..
라고 했지만 헤더에서 특정정보를 읽는 다면 이야기는 달라지겠다 

After completing the encryption process, the malware deletes the volume shadow copies by running the following command:

cmd.exe /c vssadmin delete shadows /all /quiet & wmic shadowcopy delete & bcdedit /set {default} bootstatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no & wbadmin delete catalog -quiet


암호화가 끝나면 볼륨 쉐도우 카피본은 삭제한다


걸리면?


바탕화면과


창이 뜨고


파일 몇개를 풀어주면서 돈을 요구한다

해결법은 없다