Notice
Recent Posts
Recent Comments
Link
«   2024/03   »
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
31
Archives
Today
Total
관리 메뉴

Simple Analysis blog

GandCrab & (CoinMining??) 본문

Analysis

GandCrab & (CoinMining??)

velocy 2018. 11. 9. 15:07

트윗을 하던 중 "https://twitter.com/tccontre18/status/1060539545874247680" 게시글에서 갠드크랩의 신명나는 bypass 루틴을 보게되어 분석해보았다.

During the tweet, "https://twitter.com/tccontre18/status/1060539545874247680" In the post, I looked at the bypass routines of GandCrab.


해당 악성코드는 다운로더형식의 코드를 지니고 있었다.

The malicious code had code in the form of a downloader.


<Wireshark pcap>




메인 코드는 기존의 갠드크랩과 매우 유사하며, RunPE 형식으로 VirtualProtect() -> Decoding -> JMP 으로 진행되었다.

The main code is very similar to the existing GandCrab, and runs in RunPE format as VirtualProtect () -> Decoding -> JMP.


<다운로더 메인 코드>



<갠드크랩 메인 코드>



이동된 메인 코드는 함수 내부에 PE 구조의 시그니쳐가 생성되어있는 것을 확인할 수 있다.

In the main code, the signature of the PE structure is created inside the function.


<Decoding code 내부 PE 시그니쳐>



생성된 코드에서는 Anti SandBox / VM 기능이 들어가 있었으며, 내부 프로세스의 목록을 체크하여 존재한다면 ExitProcess()를 통하여 종료한다.

In the generated code, Anti SandBox / VM function was included. Check the list of internal processes and exit through ExitProcess () if it exists.


 - python.exe

 - pythonw.exe

 - prl_cc.exe

 - vmusrvc.exe

 - vboxtray.exe

 - vboxcontrol.exe

 - vmwareservice.exe

 - vmwaretray.exe

 - tpautoconnsvc.exe

 - vmtoolsd.exe

 - vmwareuser.exe

 - dir_watch.dll

 - wpespy.dll

 - sbiedll.dll

 - sbiedllx.dll


<Anti-Sandbox / VM>



다음으로는 "75969590" 이라는 이름으로 뮤텍스를 등록하여 재실행을 방지한다.

Next, register the mutex with the name "75969590" to prevent replay.


<Mutex>



위 루틴들을 거치며 Sandbox, VM 환경이 아닌 경우에는 방화벽이나 Windows Defender 를 우회한다.

Through the above routines, bypass the firewall or Windows Defender if it is not a sandbox, VM environment.


<Bypass windows security>



실행되고있는 다운로더를 Windows 경로의 "T80870405687060"으로 복사한 뒤, 디렉토리와 파일 모두 숨김처리한다.

Copy the downloader that is running to "T80870405687060" in the Windows path, and then hide both the directory and the file.


<copy file>


<set hidden>


<set hidden>



그 후 생성된 파일을 Enabled service 형태로 등록하며, 레지스트리등록을 통해 자동실행이 되도록 해준다.

After that, the created file is registered as Enabled service type and it is automatically executed through registry registration.


<Enabled>


<set service>


<set autorun>



방화벽 및 Windows Defender 우회, Sandbox, VM 체크, clone 생성 등의 행위들을 마친 후 "hxxp://92.63.197.48/vnc/", "hxxp://92.63.197.60/vnc/" 에 t.exe, m.exe, p.exe, s.exe, o.exe 를 하나씩 연결하며 추가 악성코드 다운로드를 시도한다.

"hxxp: //92.63.197.48/vnc/ "," hxxp: //92.63.197.60/vnc/ "after completing actions such as firewall and Windows Defender detour, sandbox, VM check, Attach .exe, p.exe, s.exe, o.exe one by one and try to download additional malicious code.


(오늘자 기준 2018-11-09 에는 해당 서버가 막혀있어, 추가 다운로드는 불가능 하였다.)

(Today's criterion is 2018-11-09, the server is blocked and no additional downloads were possible.)


<connect C&C>


<fiddler>




[부록]


하지만 위 다운로드 서버에서 유포하는 파일의 경우, 기존에 확보해두었던 샘플과 VT의 기능을 이용하여 확인할 수 있었다.

"hxxp://92.63.197.48" 의 서버에서는 GandCrab Ransomware 를 유포중이었으며, "hxxp://92.63.197.60" 서버에는 Coinminer로 추정되는 악성코드가 /newup.txt 라는 파라미터를 이용하여 접속을 시도하는 모습을 확인하였다. (하지만 여기서도 C2는 당연히 죽어있었다.)

However, in case of the file distributed by the above download server, we could confirm it by using the sample and VT function that we had already secured.

The server of "hxxp: //92.63.197.48" was distributing GandCrab Ransomware, and malicious code estimated to be Coinminer on "hxxp: //92.63.197.60" server tried to access by using parameter called /newup.txt I confirmed the figure. (But C2 was, of course, dead here.)



   

<GandCrab v5.0.4>


<Coinminer>


<Coinminer connection>




예전에 비슷한 예가 있었으며 매우 주관적인 관점으로 GandCrab 유포자는 CoinMiner 의 유포도 함께 진행중 이거나 해당 서버가 해킹당해 이리저리 쓰이고 있는 듯 하다. 

There was a similar example in the past, and from a highly subjective point of view, the GandCrab spreader seems to be using Frozen CoinMiner, or the server is being hacked.


(Ex. https://twitter.com/jameswt_mht/status/996400003840126977)



해당 다운로더에 대한 더 자세한 내용은 아래 [참조 ] [1] 의 링크에 들어가보면 알 수 있다.

You can find out more about this downloader by referring to the link below [Reference] [1].




[IOC]


Downloader


md5 : 77ab057031aed055f40dbcd22c8eeb47

SHA-1 : 3edfed5f75e4c64d914787c14273acaf70009d11

SHA-256 : 796a87b9905c52ff7d1da91f2ff980b5dfdb9437a09624ccb4e6d8fe470ea666



C2


hxxp://92.63.197.48/vnc/t.exe

hxxp://92.63.197.48/vnc/m.exe

hxxp://92.63.197.48/vnc/p.exe

hxxp://92.63.197.48/vnc/s.exe

hxxp://92.63.197.48/vnc/o.exe


hxxp://92.63.197.60/vnc/t.exe

hxxp://92.63.197.60/vnc/m.exe

hxxp://92.63.197.60/vnc/p.exe

hxxp://92.63.197.60/vnc/s.exe

hxxp://92.63.197.60/vnc/o.exe


[부록]


GandCrab

md5 : da66cbc9ae879173f9e38d51a2cffdb8

SHA-1 : ce651b549e945fab1ffbced06c671c8f050b5018

SHA-256 : 098aad386b0f549cefddf2001dba9f31f40d88a3618cd3a8d5589b4b0b467342


Miner

md5 : b9ebcc1ffea3b9815168514552672f44

SHA-1 : 32cc1f0a637c10f04b086f80825a569490c935d3

SHA-256 : a9704707d32f121b243238759b35d738c07b99e4bc822b3e31f6397428afe0d9



[참조]


[1] https://tccontre.blogspot.com/2018/11/re-gandcrab-downloader-theres-more-to.html

[2] http://malware-traffic-analysis.net/2018/11/02/index.html


References
Copyright 2018. (YEJUN KIM) all rights reserved.
Copyright 2018. (YEJUN KIM) All pictures cannot be copied without permission.


'Analysis' 카테고리의 다른 글

Return to Satan, Lucky Ransomware  (0) 2018.12.11
We will become back very soon! ;)  (0) 2018.12.05
Return to ROKRAT!! (feat. FAAAA...Sad...)  (1) 2018.11.16
Are you VenusLocker? or GandCrab?  (1) 2018.10.22
ROKRAT is Back!!  (0) 2018.09.21
Comments