티스토리 뷰

hwp 악성코드가 헌팅되었다. 악성코드는 "KINU 전문가 자문 요청사항" 이라는 제목이며 한미동맹/한중관계 등에 대한 질문지로 위장하고있다.

hwp file
hwp info

 

Stage 1. EPS & Shellcode

BIN0001.EPS 파일은 총 3가지로 구성되어있다.
/ar : shellcode & cve-2017-8291 exploit code 
/ar Decoding Data : /ar ^ key (0x00 ?!?!?!?!?!?)
Encoded Malware & Encoded Shellcode 

1st EPS Code

 

/ar의 코드는 exploit code와 쉘코드가 존재한다.

/ar code

메모리에 로드된 쉘코드가 실행되면 EPS 파일을 읽어와 데이터를 파싱한 후 복호화를 수행한다.

structure
signatrue (4byte) ; 0x0c790cbe
xor key (1byte) : 0xF5
decrypt size(4byte) : 0x00018E3F

structure & encoded shellcode 

 

복호화된 쉘코드는 HimTrayIcon.exe 프로세스에 인젝션된다. 인젝션된 쉘코드는 4byte로 암호화된 PE파일을 복호화 하고 userinit.exe 프로세스를 생성해 인젝션 한다. 
xor key : 0x04C40B86

shellcode Injected in himTrayIcon.exe & Decoded Malware

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

 

malware injected userinit.exe
steal system information

Stage 3. downloaded dll

다운받은 파일이 실행되면 대충 아래와 같은 악성기능을 수행한다.
- 특정 경로 생성
- 자가 복제
- 자동실행을 위한 레지스트리 등록
- ETC
path info
%AppData%\InstallShield\defender : iertutil.dll (self Copy)
%AppData%\InstallShield\plugin_defender : tader.wav (keylogging data & process info)
%AppData%\InstallShield\upgrade_defender : Encrypted stolen info

download malware 
check v3 process

 

stolen system info

시스템 정보를 탈취하면 svchost.exe 프로세스를 생성해 악성코드를 주입하고 실행한다.

Stage 4. svchost.exe

svchost.exe 프로세스는 다음과 같은 기능을 수행한다
- create mutex : CD407FA1-5EAF-4846-BB2C-B48138D5429B
- ststeal system info 
- Inject malware in iexplorer.exe
- Create Memory Mapped File : CD407FA1-5EAF-4846-BB2C-B48138D5429B_0
- File Encrypt : RC4 (KEY : B7F0E346-F6D5-8C67-7D77-F270B6F54003)

malware injected svchost.exe

 

Request an upload
File Encrypt
Create Process & Injection

 

Stage 5. iexplorer.exe

svchost.exe에서 요청한 명령을 Memory Mapped File로 읽어 파일 업/다운로드를 수행한다. 
file up/download using daum mail
email id : webclean-center@daum[.]net
pwd : ***********

MMF Read & File Upalod

 

File Download

Conclusion

자세히 쓰고싶었으나 업무가 밀려 자세히 못씀. 빠르게 대응해준 갓랩갓약등에 리스펙을 보냅니다. 

 

IOC

hwp file
42ae424f27d83fa132b2967b64f6ba21        
9e52e4295ba389d3912c7305aee6aba31b079383        
d94f26158dc3fd9fd93aa7f38afe63f3893b00c03d04c08f0581323e3ee3de58

button03.down
683dd86af996b9e7e10c54f99e64753c        
fb6eabdefca6d447e72147f8054a28ae01f7a578        
ed4c809ec7fb8aec56e4280b3f2867aa2eb75cd7db26464dd49d82ae99517b20        

button03_0xFF_XOR.down
702074bb1b644e1207633154ebf08eb9        
ddbca65cf7246eb3c970c00165c2245b4d9f758d        
0aa978d3ec302c57370201906148280a90baec51b99afdd334cc4e22e89fd037        

button04.down
683dd86af996b9e7e10c54f99e64753c        
fb6eabdefca6d447e72147f8054a28ae01f7a578        
ed4c809ec7fb8aec56e4280b3f2867aa2eb75cd7db26464dd49d82ae99517b20        

button04_0xFF_XOR.down
702074bb1b644e1207633154ebf08eb9        
ddbca65cf7246eb3c970c00165c2245b4d9f758d        
0aa978d3ec302c57370201906148280a90baec51b99afdd334cc4e22e89fd037        

C2
hxxp://clouds.scienceontheweb[.]net/img/png/load.png/
hxxp://clouds.scienceontheweb[.]net/img/png/download.png/?filename=button03
hxxp://clouds.scienceontheweb[.]net/img/png/download.png/?filename=button04

email
webclean-center@daum[.]net

Related Links

Gob ahnlab : https://asec.ahnlab.com/1253

 

Kimsuky 조직 악성 HWP 한글 문서 유포

10월 16일 어제 안랩 ASEC 분석팀에 새로운 악성 HWP 한글 문서가 접수되었다. 확인 결과 Kimsuky 조직 유형으로 판단된다. 악성 한글 문서는 한반도의 대북 정책 관련 한미/한중 외교에 관한 질문 내용이다. 공격..

asec.ahnlab.com

God alyac : https://blog.alyac.co.kr/2560?category=957259

 

김수키(Kimsuky) 조직 소행 추정 ‘대북 분야 국책연구기관’ 사칭 스피어피싱 공격 발견

안녕하세요. 이스트시큐리티 시큐리티대응센터(ESRC)입니다. 대북 분야 국책연구기관을 사칭해 특정 기관 관계자 정보를 수집하는 스피어피싱(Spear Phishing) 공격이 발견돼, 관련 업계 종사자의 각별한 주의가..

blog.alyac.co.kr

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함