NSHC Red Alert Team Document No. RA-M201705-01

윈도우 SMB 취약점으로 전파되는 워너크라이 랜섬웨어 분석 Malware Analysis Report

Facebook.com/nshc.redalert [email protected]

May, 2017 NSHC PTE. LTD.

이 보고서는 워너크라이 WannaCry (또는 워너크립트 Wanna Crypt, 워너디크립토 Wanna Decryptor, 워너크립토 WannaCrypt0r) 랜섬웨어를 분석한 것이다. 이 악성코드는 지난 3 월에 패치 된 MS 17-010 SMB 취약점을 악용해 국내뿐만 아니라 해외 많은 기관들에 웜 바이러스 형태로 확산되고 있다. 다른 랜섬웨어와 마찬가지로 대상 파일을 암호화한 후 비트코인을 요구한다.

Malware Analysis Report

1

목차 사건 개요

2

공격 시나리오

2

보안 대책

3

SMB 비활성화 방법

3

윈도우 SMB 취약점, 이터널블루

5

워너크라이 랜섬웨어

6

암호화 대상

6

악성코드 실행 순서

6

침해지표 (IOCS)

7

관련 링크

NSHC©2017 All rights reserved.

10

2

Malware Analysis Report

사건 개요 워너크라이 랜섬웨어는 2017 년 5 월 12 일 국내외에서 첫 감염 사례가 보고 된 이후, 피해 사례가 계속 증가하고 있다. 이미 3 월에 패치 된 윈도우 SMB 취약점을 통해 유포되고 있다. 전 세계 99 개국에서 감염 사례가 보고 될 만큼 해당 취약점으로 인한 피해는 심각하다. 이에 따라 마이크로소프트는 공식 보안 업데이트를 제공하지 않았던 윈도우 XP, 윈도우 서버 2003, 윈도우 8 에 대해서도 따로 패치를 제공하고 있다. 2017.3.14 MS17-010 SMB 취약점 공식 패치 2017.4.14 쉐도우브로커, NSA 의 이터널블루 EternalBlue 익스플로잇 공개 2017.5.12 해당 취약점 악용해 유포된 국내외 “워너크라이(워너크립트, 워너디크립트, 워너크립토라고도 불림)”라는 랜섬웨어 감염 사례 보고

그림 1. 크라이크립트 랜섬웨어 감염 이후 랜섬노트 및 바탕화면

공격 시나리오 1.

네트워크를 통해 PC 에 접근

2.

감염된 PC 에서 SMB 취약점으로 인한 악성코드 접근

3.

네트워크를 통해 다른 PC 감염 시도

4.

로컬 시스템의 파일 암호화 진행

즉, 공격 시나리오를 도식화 하면 다음과 같다.

NSHC©2017 All rights reserved.

3

Malware Analysis Report

보안 대책 1.

SMB 139, 445 TCP 포트 차단 또는 SMB 비활성화

2.

최신 보안 업데이트

3.

백신 프로그램 사용

4.

악성코드와 연결되는 도메인, IP 주소 차단

※ 13 일 미국 한 보안 업체 직원이 '워너크라이'(WannaCry)를 막는 소프트웨어 '킬 스위치'(kill switch) 발견해 확산을 멈추는데 기여했다. 즉, 이 악성코드와 연결되는 (등록되지 않은) 도메인을 발견해 10.69 달러에 사들여 킬 스위치로 작용한 것이다.

SMB 비활성화 방법



Windows Vista, Windows Server 2008 이상

아래와 같이 스크립트를 작성하여 관리자 권한으로 파워쉘을 실행한다. set ItemProperty-Path “HKLM:\SYSTEM\CurrentControlset\Services\Lanmanserver\Parameters” SMB1 – Type DWORD –Value 0 –Force set-ItemProperty –Path “HKLM:\SYSTEM\CurrentControlset\Services\Lanmanserver\Parameters” SMB2 – Type DWORD –Value 0 –Force

NSHC©2017 All rights reserved.

4

Malware Analysis Report



Wndows 8.1 / Windows 2012 R2 이상

제어판 -> 프로그램 -> Windows 기능 설정 또는 해제 -> SMB1.0/CIFS 파일 공유 지원 체크해제 -> 시스템 재시작 서버 운영 체제 : 서버 관리자 -> 관리 -> 역할 및 기능 -> SMB1.0/CIFS 파일 공유 지원 체크 해제 -> 확인 -> 시스템 재시작 •

Windows XP 또는 Windows Server 2003 사용자

RDP 사용 시 IP 접근통제를 통해 허용된 사용자만 접근할 수 있도록 설정 및 기본 포트 번호(3389/TCP) 변경 •

Windows Server 2003 이하

서버 내 WebDAV 서비스 비활성화

NSHC©2017 All rights reserved.

5

Malware Analysis Report

윈도우 SMB 취약점, 이터널블루 해커집단 쉐도우브로커는 NSA 가 이용했던 여러 공격 툴을 공개했다. 이 가운데, 지난 달 이터널블루 Eternalblue 를 포함해 시스템을 감염시키고 공격하는 방법에 관해 설명하는 문서, 유투브 비디오 등이 공개 되었다. 자세한 내용은 아래 문서를 참고한다. https://www.exploit-db.com/docs/41896.pdf 문서에서 설명하는 공격 툴을 간단히 요약하면 다음과 같다. •

쉐도우브로커가 공개한 툴 중 EternalBlue 는 인증없이 Windows 7 및 Windows Server 2008 을 공격하는 데 사용할 수 있는 유일한 프로그램



대상 컴퓨터에 악성 DLL 을 원격으로 주입하기 위해 플러그인 DoublePulsar 을 사용



취약한 대상에 대한 공격을 구성하고 실행하기 위해 NSA 의 “Metasploit”인 Fuzzbunch 프레임워크를 사용



EternalBlue 로 공격후 Empire 로 악성 DLL 을 만들어 DoublePulsar 로 DLL 인젝션을 하여 세션을 획득



EternalBlue 의 타임스템프에 따르면 NSA 는 2011 년부터 이 툴들을 가지고 있었던 것으로 나타남

NSHC©2017 All rights reserved.

6

Malware Analysis Report

워너크라이 랜섬웨어 암호화 대상 이 랜섬웨어에 감염되면 암호화 되는 파일의 확장자는 다음과 같다. .der, .pfx, .key, .crt, .csr, .p12, .pem, .odt, .sxw, .stw, .3ds, .max, .3dm, .ods, .sxc, .stc, .d if , .slk, .wb2, .odp, .sxd, .std, .sxm, .sqlite3, .sqlitedb, .sql, .accdb, .mdb, .dbf, .odb, .m df, .ldf, .cpp, .pas, .asm, .cmd, .bat, .vbs, .sch, .jsp, .php, .asp, .java, .jar, .class, .mp3, .w av, .swf, .fla, .wmv, .mpg, .vob, .mpeg, .asf, .avi, .mov, .mp4, .mkv, .flv, .wma, .mid, .m3 u, .m4u, .svg, .psd, .tiff, .tif .raw, .gif, .png, .bmp, .jpg, .jpeg, .iso, .backup, .zip, .rar, .tg z, .tar, .bak, .ARC, .vmdk, .vdi, .sldm, .sldx, .sti, .sxi, .dwg, .pdf, .wk1, .wks, .rtf, .csv, .txt, .msg, .pst, .ppsx, .ppsm, .pps, .pot, .pptm, .pptx, .ppt, .xltm, .xltx, .xlc, .xlm, .xlt, .xlw, .xl sb, .xlsm, .xlsx, .xls, .dotm, .dot, .docm, .docx , .doc,

악성코드 실행 순서 - mssecsvc.exe 파일이 taskche.exe 파일을 드랍하는 형태로 실행. - mssecsvc.exe 파일은 웜 행위로 감염 시도 - mssecsv2.0 서비스 생성 - 감염된 시스템의 IP 주소 확인 후 동일한 서브넷에 있는 각 IP 주소의 TCP 445 포트에 연결 시도 - 악성코드가 시스템에 성곡적으로 연결되면 데이터 전송 (SMB 취약점 이용) - taskche.exe 파일 실행되며 암호화 진행 •

C:\ D:\ 등등 드라이버 및 네트워크 공유, 이동식 저장 장치 확인



대상 확장자를 확인하여 암호화 실행



암호화는 RSA 2048 비트 암호화를 진행

- 암호화 진행하는 동안 Tor 디렉토리를 생성하여 tor.exe 와 tor.exe 에서 사용하는 9 의 dll 파일을 생성 - taskdl.exe 와 taskse.exe 라는 두 개의 파일을 추가로 생성 •

taskdl.exe : 임시파일 삭



taskse.exe: @[email protected] 실행하여 사용자에게 경고문 발생, 랜섬노트

- tor.exe 는 @[email protected] 가 실행 시킴 - 새로 실행되는 프로세스는 해당 tor.exe 를 사용해 네트워크 연결 시작 (익명성 유지)

NSHC©2017 All rights reserved.

7

Malware Analysis Report

- 랜섬웨어는 복원을 못하도록 쉐도우 카피 영역 데이터를 지움 (WMIC.exe, vssadmin.exe, cmd.exe 를 사용해 작업 수행)

침해지표 (IOCs) No

IOC

기타

1

b9c5d4339809e0ad9a00d4d3dd26fdf44a32819a54abf84

File hash - sha256

6bb9b560d81391c25 2

2584e1521065e45ec3c17767c065429038fc6291c091097e

File hash - sha256

a8b22c8a502c41dd 3

ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6

File hash - sha256

e5babe8e080e41aa 4

2ca2d550e603d74dedda03156023135b38da3630cb014e

File hash - sha256

3d00b1263358c5f00d 5

4a468603fdcb7a2eb5770705898cf9ef37aade532a796464

File hash - sha256

2ecd705a74794b79 6

09a46b3e1be080745a6d8d88d6b5bd351b1c7586ae0dc9

File hash - sha256

4d0c238ee36421cafa 7

24d004a104d4d54034dbcffc2a4b19a11f39008a575aa614

File hash - sha256

ea04703480b1022c 8

f8812f1deb8001f3b7672b6fc85640ecb123bc2304b56372

File hash - sha256

8e6235ccbe782d85 9

4a25d98c121bb3bd5b54e0b6a5348f7b09966bffeec3077

File hash - sha256

6e5a731813f05d49e 10

51432d3196d9b78bdc9867a77d601caffd4adaa66dcac94

File hash - sha256

4a5ba0b3112bbea3b 11

f01b7f52e3cb64f01ddc248eb6ae871775ef7cb4297eba5d

File hash - sha256

230d0345af9a5077 12

11d0f63c06263f50b972287b4bbd1abe0089bc993f73d75

File hash - sha256

768b6b41e3d6f6d49 13

149601e15002f78866ab73033eb8577f11bd489a4cea87b

File hash - sha256

10c52a70fdf78d9ff 14

16493ecc4c4bc5746acbe96bd8af001f733114070d694db7

File hash - sha256

6ea7b5a0de7ad0ab 15

190d9c3e071a38cb26211bfffeb6c4bb88bd74c6bf99db9b

File hash - sha256

b1f084c6a7e1df4e 16

4186675cb6706f9d51167fb0f14cd3f8fcfb0065093f62b10 a15f7d9a6c8d982

NSHC©2017 All rights reserved.

File hash - sha256

8

Malware Analysis Report

17

593bbcc8f34047da9960b8456094c0eaf69caaf16f1626b8

File hash - sha256

13484207df8bd8af 18

5ad4efd90dcde01d26cc6f32f7ce3ce0b4d4951d4b94a19a

File hash - sha256

a097341aff2acaec 19

6bf1839a7e72a92a2bb18fbedf1873e4892b00ea4b122e4

File hash - sha256

8ae80fac5048db1a7 20

7c465ea7bcccf4f94147add808f24629644be11c0ba4823f1

File hash - sha256

6e8c19e0090f0ff 21

9b60c622546dc45cca64df935b71c26dcf4886d6fa811944

File hash - sha256

dbc4e23db9335640 22

9fb39f162c1e1eb55fbf38e670d5e329d84542d3dfcdc341

File hash - sha256

a99f5d07c4b50977 23

b3c39aeb14425f137b5bd0fd7654f1d6a45c0e8518ef7e20

File hash - sha256

9ad63d8dc6d0bac7 24

b47e281bfbeeb0758f8c625bed5c5a0d27ee8e0065ceead

File hash - sha256

d76b0010d226206f0 25

b66db13d17ae8bcaf586180e3dcd1e2e0a084b6bc987ac8

File hash - sha256

29bbff18c3be7f8b4 26

c365ddaa345cfcaff3d629505572a484cff5221933d68e4a5

File hash - sha256

2130b8bb7badaf9 27

d8a9879a99ac7b12e63e6bcae7f965fbf1b63d892a8649ab

File hash - sha256

1d6b08ce711f7127 28

e14f1a655d54254d06d51cd23a2fa57b6ffdf371cf6b828ee

File hash - sha256

483b1b1d6d21079 29

7a828afd2abf153d840938090d498072b7e507c7021e4cd

File hash - sha256

d8c6baf727cafc545 30

a897345b68191fd36f8cefb52e6a77acb2367432abb648b9

File hash - sha256

ae0a9d708406de5b 31

b43b234012b8233b3df6adb7c0a3b2b13cc2354dd6de27

File hash - sha256

e092873bf58af2693c 32

c73633e55a1d66af88a3dc2d46e7d47e0a47ce0bab0930a

File hash - sha256

70b97b003adafc9af 33

f5cbff5c100866dd744dcbb68ee65e711f86c257dfcc41790

File hash - sha256

a8f63759220881e 34

0bb221bf62d875cca625778324fe5bd6907640f6998d21f3

File hash - sha256

106a0447aabc1e3c 35

11011a590796f6c52b046262f2f60694310fa71441363d91

File hash - sha256

16ada7248e58509a 36

1e6753f948fa648ef9e0d85795b7f090968ee1f240efc0628 283776ea55ccb0f

NSHC©2017 All rights reserved.

File hash - sha256

9

Malware Analysis Report

37

22ccdf145e5792a22ad6349aba37d960db77af7e0b6cae8

File hash - sha256

26d228b8246705092 38

31c2024d0df684a968115e4c3fc5703ef0ea2de1b69ece58

File hash - sha256

1589e86ba084568a 39

4c69f22dfd92b54fbc27f27948af15958adfbc607d68d6ed0

File hash - sha256

faca394c424ccee 40

5dee2ac983640d656f9c0ef2878ee34cda5e82a52d3703f8

File hash - sha256

4278ac372877346d 41

5f2b33deee53390913fd5fb3979685a3db2a7a1ee872d47

File hash - sha256

efc4f8f7d9438341f 42

63bd325cc229226377342237f59a0af21ae18889ae7c7a13

File hash - sha256

0fbe9fd5652707af 43

7bb9ea2c0f53fa96883c54fa4b107764a6319f6026e4574c9

File hash - sha256

feec2cb7d9e7d21 44

7c0104b0d987d724fa996da8e876cf5fa0fbf5880726f9c56

File hash - sha256

5eec57c0c80ce56 45

7e369022da51937781b3efe6c57f824f05cf43cbd66b4a24

File hash - sha256

367a19488d2939e4 46

940dec2039c7fca4a08d08601971836916c6ad5193be07a

File hash - sha256

88506ba58e06d4b4d 47

a141e45c3b121aa084f23ebbff980c4b96ae8db2a8d6fde4

File hash - sha256

59781aa6d8a5e99a 48

a1d23db1f1e3cc2c4aa02f33fec96346d9d5d5039ffc2ed4a

File hash - sha256

3c65c34b79c5d93 49

a50d6db532a658ebbebe4c13624bc7bdada0dbf4b0f279e

File hash - sha256

0c151992f7271c726 50

ac7f0fb9a7bb68640612567153a157e91d457095eadfd2a7

File hash - sha256

6d27a7f65c53ba82 51

c1f929afa37253d28074e8fdaf62f0e3447ca3ed9b51203f6

File hash - sha256

76c1244b5b86955 52

ceb51f66c371b5233e474a605a945c05765906494cd272b

File hash - sha256

0b20b5eca11626c61 53

e0ec1ad116d44030ad9ef5b51f18ff6160a227a46ffcf64693

File hash - sha256

335c7fb946fad6 54

e2d1e34c79295e1163481b3683633d031cab9e086b9ae2a

File hash - sha256

c5e30b08def1b0b47 55

ec9d3423338d3a0bfccacaf685366cfb8a9ece8dedbd08e8

File hash - sha256

a3d6446a85019d3a 56

402751fa49e0cb68fe052cb3db87b05e71c1d950984d339 940cf6b29409f2a7c

NSHC©2017 All rights reserved.

File hash - sha256

10

Malware Analysis Report

57

0e5ece918132a2b1a190906e74becb8e4ced36eec9f9d1c

File hash - sha256

70f5da72ac4c6b92a 58

498b8b889bb1f02a377a6a8f0e39f9db4e70cccad820c6e5

File hash - sha256

bc5652e989ae6204 59

7966d843e5760ece99bd32a15d5cd58dc71b1324fdc87e3

File hash - sha256

3be46f377486a1b4b 60

840ab19c411c918ea3e7526d0df4b9cb002de5ea15e8543

File hash - sha256

89285df0d1ea9a8e5 61

www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com

URL

62

57g7spgrzlojinas.onion

Tor URL

63

76jdd2ir2embyv47.onion

Tor URL

64

cwwnhwhlz52maqm7.onion

Tor URL

65

gx7ekbenv2riucmf.onion

Tor URL

66

sqjolphimrr7jqw6.onion

Tor URL

67

xxlvbrloxvriy2c5.onion

Tor URL

68

C:\WINDOWS\tasksche.exe

Create File

69

C:\Windows\mssecsvc.exe

Create File

70

MsWinZonesCacheCounterMutexA

Mutex

71

C:\taskse.exe

Create File

72

C:\taskdl.exe

Create File

73

C:\m.vbs

Create File

74

C:\111.exe

Create File

75

C:\@[email protected]

Create File

관련 링크 Microsoft Security Bulletin MS17-010 - Critical Security Update for Microsoft Windows SMB Server https://technet.microsoft.com/en-us/library/security/ms17-010.aspx Shadow Brokers Release New Files Revealing Windows Exploits, SWIFT Attacks https://www.bleepingcomputer.com/news/security/shadow-brokers-release-new-filesrevealing-windows-exploits-swift-attacks/ Wana Decrypt0r Ransomware Using NSA Exploit Leaked by Shadow Brokers Is on a Rampage https://www.bleepingcomputer.com/news/security/wana-decrypt0r-ransomware-usingnsa-exploit-leaked-by-shadow-brokers-is-on-a-rampage/

NSHC©2017 All rights reserved.

LEGAL DISCLAIMER NSHC (NSHC Pte. Ltd.) takes no responsibility for any incorrect information supplied to us by manufacturers or users. Quantitative market information is based primarily on interviews and therefore is subject to fluctuations. NSHC Research services are limited publications containing valuable market information provided to a selected group of customers. Our customers acknowledge, when ordering or downloading our publications NSHC Research Services are for customers’ internal use and not for general publication or disclosure to third parties. No part of this Research Service may be given, lent, resold or disclosed to noncustomers without written permission. Furthermore, no part may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the permission of the publisher. For information regarding permission, contact us. [email protected]

This document contains information that is the intellectual property of NSHC Inc. and Red Alert team only. This document is received in confidence and its contents cannot be disclosed or copied without the prior written consent of NSHC. Nothing in this document NSHC PTE. LTD. 8 Shenton Way, #04-01 AXA Tower, Singapore 068811 Facebook.com/nshc.redalert [email protected]

constitutes a guaranty, warranty, or license, expressed or implied. NSHC disclaims all liability for all such guaranties, warranties, and licenses, including but not limited to: Fitness for a particular purpose; merchantability; non-infringement of intellectual property or other rights of any third party or of NSHC.

RA-M201705-01-WannaCry-Ransomware.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item.

314KB Sizes 10 Downloads 253 Views

Recommend Documents

No documents