lazarusholic

Everyday is lazarus.dayβ

kimsuky group's attack using hwp malware

2019-10-20, kino
https://sfkino.tistory.com/75
#Kimsuky

Contents

티스토리 뷰
[Hwp Malware] kimsuky group's attack using hwp malware분석가E 2019. 10. 20. 15:12
hwp 악성코드가 헌팅되었다. 악성코드는 "KINU 전문가 자문 요청사항" 이라는 제목이며 한미동맹/한중관계 등에 대한 질문지로 위장하고있다.
Stage 1. EPS & Shellcode
BIN0001.EPS 파일은 총 3가지로 구성되어있다.
/ar : shellcode & cve-2017-8291 exploit code
/ar Decoding Data : /ar ^ key (0x00 ?!?!?!?!?!?)
Encoded Malware & Encoded Shellcode
/ar의 코드는 exploit code와 쉘코드가 존재한다.
메모리에 로드된 쉘코드가 실행되면 EPS 파일을 읽어와 데이터를 파싱한 후 복호화를 수행한다.
structure
signatrue (4byte) ; 0x0c790cbe
xor key (1byte) : 0xF5
decrypt size(4byte) : 0x00018E3F
복호화된 쉘코드는 HimTrayIcon.exe 프로세스에 인젝션된다. 인젝션된 쉘코드는 4byte로 암호화된 PE파일을 복호화 하고 userinit.exe 프로세스를 생성해 인젝션 한다.
xor key : 0x04C40B86
Stage 2. userinit.exe
userinit.exe 프로세스가 생성되면 뮤텍스를 생성하고 가상환경 여부를 확인하고 시스템정보를 탈취해 서버로 전송한다.
mutex : clouds_xys
c2 : hxxp://clouds.scienceontheweb[.]net/img/png/load.png/
C2에 정상적으로 연결되면 추가 악성코드를 다운받는다. 파일은 0xFF로 인코딩 되어있다.
download c2 :
hxxp://clouds.scienceontheweb[.]net/img/png/download.png/?filename=button03
hxxp://clouds.scienceontheweb[.]net/img/png/download.png/?filename=button04
Stage 3. downloaded dll
다운받은 파일이 실행되면
대충 아래와 같은 악성기능을 수행한다.
- 특정 경로 생성
- 자가 복제
- 자동실행을 위한 레지스트리 등록
- ETC
path info
%AppData%\InstallShield\defender : iertutil.dll (self Copy)
%AppData%\InstallShield\plugin_defender …

IoC

0aa978d3ec302c57370201906148280a90baec51b99afdd334cc4e22e89fd037
42ae424f27d83fa132b2967b64f6ba21
683dd86af996b9e7e10c54f99e64753c
702074bb1b644e1207633154ebf08eb9
9e52e4295ba389d3912c7305aee6aba31b079383
d94f26158dc3fd9fd93aa7f38afe63f3893b00c03d04c08f0581323e3ee3de58
ddbca65cf7246eb3c970c00165c2245b4d9f758d
ed4c809ec7fb8aec56e4280b3f2867aa2eb75cd7db26464dd49d82ae99517b20
fb6eabdefca6d447e72147f8054a28ae01f7a578
http://clouds.scienceontheweb.net/img/png/download.png/?filename=button03
http://clouds.scienceontheweb.net/img/png/download.png/?filename=button04
http://clouds.scienceontheweb.net/img/png/load.png/