취약점 한글파일을 이용한 MBR 파괴기능의 악성코드 등장

최근 접수되는 취약점 한글 문서파일에서 기존에 존재했던 백도어 기능외에 주요 확장자 파일들에 대한 파괴 및 MBR 파괴기능을 갖는 파일이 접수되어 주의가 필요하다.

2014년 12월 9일 최초 접수된 취약점 한글 문서파일들은 모두 기 알려진 취약점을 이용하였으며, 최신 패치적용제품에서는 동작하지 않는다. 총 9개의 문서파일이 접수되었으며, 모두 동일한 악성파일을 내부에 포함하고 있다.

 

1. 생성하는 파일 및 서비스

%system% 폴더에 생성된 DLL을 서비스로 등록/구동 시, 사용하는 정보는 악성코드 내부에 목록으로 가지고 있으며, 아래의 항목 중 하나를 랜덤하게 선택한다.

 

[서비스 이름]

– BitLocker Drive Decryption Service
– Internet Connection Service
– Media Center Service
– Network Storage Service
– Peer Networking Address
– PNRP Machine Name
– Power Policy
– Program Compatibility Service
– Remote Registry Configuration
– Smart Card Management Service
– Tablet PC Management Service
– Task Schedule Manager
– Thread Ordering Service
– WebClient Manage Service
– Windows Color Adjustment
– Windows Modules Management
– Windows Time Synchronization
– Wired Config Service
– WLAN Config Service
– Workstation management

 

[생성 파일명]

– bddsvc.dll
– iconsvc.dll
– ehressvc.dll
– netstsvc.dll
– pnas.dll
– pnrpmchname.dll
– pwpsvc.dll
– pcssvc.dll
– rregconf.dll
– scardmngsvc.dll
– tcpmsvc.dll
– tschmng.dll
– mmthread.dll
– wcmngsvc.dll
– coladj.dll
– wndmodmng.dll
– timesyncsvc.dll
– wiredconfsvc.dll
– wlanconf.dll
– wstmng.dll

 

[서비스 설명]

– BDESVC hosts the BitLocker Drive Decryption service.
– Provides network address translation, addressing, name resolution and/or intrusion prevention services for a home or small office network.
– Allows Media Center to locate and connect to the computer.
– This service delivers network notifications (e.
– Enables multi-party communication using Peer-to-Peer Connecting.
– This service publishes a machine name using the Peer Name Resolution Protocol.
– Manages power policy and power policy notification delivery.
– This service provides support for the Program Compatibility Assistant (PCA).
– Enables remote users to modify registry configurations on this computer.
– Manages access to smart cards read by this computer.
– Enables Tablet PC pen and ink functionality
– Enables a user to configure and schedule automated tasks on this computer.
– Provides ordered execution for a group of threads within a specific period of time.
– Enables Windows-based programs to create, access, and modify Internet-based files.
– The WcasPlugInService service hosts third-party Windows Color System color device model and gamut map model plug-in modules.
– Enables installation, modification, and removal of Windows updates and optional components.
– Maintains date and time synchronization on all clients and servers in the network.
– The Wired AutoConfig (DOT3SVC) service is responsible for performing IEEE 802.1X
– The WLANSVC service provides the logic required to configure, discover, connect to, and disconnect from a wireless local area network.
– Creates and maintains client network connections to remote server using the SMB protocol

 

2. MBR 파괴시간


MBR 파괴는 아래의 레지스트리 키값의 'number' 항목의 값 체크('0' 보다 큰 값인 경우 파괴동작)를 통해 이루어지며, 최초감염 시 '0' 값으로 설정된다. 아래의 [그림-1]은 악성코드가 등록한 레지스트리 키 'PcaSvcc' 항목의 내용을 나타낸다. MBR 파괴 동작 여부를 결정하는 number 항목의 값은 사용자 시스템의 시간정보를 통해 2014년 12월 10일 오전 11시 이후가 되면, '0'이 아닌 값으로 설정되며, MBR 파괴기능이 동작하도록 되어있다.

[그림-1] MBR 파괴 시, 참조하는 레지스트리 값

아래의 [그림-2]는 악성코드 내부에 MBR 파괴를 결정하는 시간정보를 비교하는 코드부분을 나타낸다. 악성코드 내부에 저장된 “0x780D0C33” 값과 GetLocalTime 함수 호출을 통해 얻은 시스템 시간과의 특정 연산을 통해 시간정보를 비교하는 작업이 이루어짐을 알 수 있다.

[그림-2] MBR 파괴시간 비교하는 코드

 

3. MBR 파괴기법

MBR 파괴는 0x200(512바이트) 크기에 대해 덮어쓰게되며, 아래의 [그림-3]과 같은 데이터로 채워짐을 알 수 있다. 감염 시, 'A'~'Z' 모든 드라이브에 대해 동일한 과정이 반복된다.

[그림-3] MBR 데이터

아래의 [그림-4]는 덮어쓴 MBR 코드의 내용으로, 부팅 시 “Who Am I?”라는 문자열을 출력하는 기능을 갖는다.

[그림-4] MBR 코드

아래의 [그림-5]는 MBR 감염 후, 재부팅 시 사용자에게 보여지는 화면을 나타낸다.

[그림-5] 부팅 화면

 

4. 파일 파괴기능

악성코드는 MBR 에 대한 파괴기능 외에 특정 확장자를 갖는 파일들에 대한 파괴기능도 함께 갖고있다. 현재까지 확인된 파괴대상 파일들은 다음과 같다.

– hwp
– doc
– pdf
– docx
– alz
– zip
– rar
– egg
– iso
– exe
– dll
– sys

'A'~'Z' 드라이브의 위 확장자를 갖는 파일들을 찾아 4096 바이트(4K) 크기로 변경 및 NULL 값으로 채우는 과정을 수행한다.

 

5. 한글 취약점 내용

접수된 9개의 취약점 한글문서는 문서의 내용은 다르나 모두 동일한 취약점을 사용하였다. 아래의 [그림-6]은 취약점을 발생시키는 부분 및 동작하는 쉘코드 중 일부를 나타낸다. 한글문서에서 문단의 레이아웃('HWPTAG_PARA_LINE_SEG')을 담당하는 부분을 처리하는 과정에서 취약점이 발생하며, 쉘코드(ShellCode) 삽입 및 힙스프레이(Heap Spray)를 위해 문단의 텍스트('HWPTAG_PARA_TEXT')가 이용되었다.

[그림-6] 한글 취약점 발생부분

 

6. 관련 파일들

현재까지 확인된 취약점 한글파일 및 생성하는 악성파일들에 대한 MD5 및 V3 진단내용은 다음과 같다.

– 54783422cfd7029a26a3f3f5e9087d8a (V3: HWP/Exploit, 2014.12.10.06)
– b5b6e93ab27cec75f07af2a3a6a40926 (V3: HWP/Exploit, 2014.12.10.02)
– 800866bbab514657969996210bcf727b (V3: HWP/Exploit, 2014.12.10.02)
– ead682b889218979b1f2f1527227af9b (V3: HWP/Exploit, 2014.12.10.02)
– f09ea2a841114121f32211faac553e1b (V3: HWP/Exploit, 2014.12.09.06)
– 9daf088fe4c9a9580216e98dbb7d1fca (V3: HWP/Exploit, 2014.12.09.06)
– 3ec69ee7135272e5bed3ea5378ade6ee (V3: HWP/Exploit, 2014.12.11.05)
– 33874577bf54d3c209925c9def880eb9 (V3: HWP/Exploit, 2014.12.11.05)
– af792a34548a2038f034ea9a6ff0639a (V3: HWP/Exploit, 2014.12.11.05)
– 3BA8A6815F828DFC518A0BDBD27BBA5B (V3: Trojan/Win32.Destroyer, 2014.12.10.00)

 

7. 대응방안

악성코드 감염을 막기위해서는 항상 한글 프로그램 및 백신 프로그램을 최신 업데이트 상태로 유지하는 것이 필요하다. 또한, 취약점 한글문서파일은 모두 특정인에게 이메일의 첨부파일 형태로 유포된 것으로 확인되었다. 불명확한 발신인 혹은 확인되지 않은 첨부파일의 경우, 실행 전에 보안에 문제가 없는 지 확인하는 과정이 필요하다.

 

 

 

Categories:악성코드 정보

0 0 votes
별점 주기
Subscribe
Notify of
guest

0 댓글
Inline Feedbacks
View all comments