참고 URL : https://github.com/kevthehermit/RATDecoders/blob/master/DarkComet.py

참고 URL : https://blog.malwarebytes.org/intelligence/2012/06/you-dirty-rat-part-1-darkcomet/

              

http://www.arbornetworks.com/asert/wp-content/uploads/2012/07/Crypto-DarkComet-Report.pdf

http://www.contextis.com/blog/malware-analysis-dark-comet-rat//



http://www.arbornetworks.com/asert/2012/03/its-not-the-end-of-the-world-darkcomet-misses-by-a-mile/

http://blog.trendmicro.com/trendlabs-security-intelligence/darkcomet-surfaced-in-the-targeted-attacks-in-syrian-conflict/

http://resources.infosecinstitute.com/darkcomet-analysis-syria/


Mutex Name : DC_MUTEX-[랜덤문자열]



# Yara Rule (출처 : https://github.com/botherder/viper/blob/master/data/yara/rats.yara)


rule DarkComet

{

    meta:

        author = " Kevin Breen <kevin@techanarchy.net>"

        date = "2014/04"

        ref = "http://malwareconfig.com/stats/DarkComet"

        family = "darkcomet"

        tags = "rat, darkcomet"


    strings:

        // Versions 2x

        $a1 = "#BOT#URLUpdate"

        $a2 = "Command successfully executed!"

        $a3 = "MUTEXNAME" wide

        $a4 = "NETDATA" wide

        // Versions 3x & 4x & 5x

        $b1 = "FastMM Borland Edition"

        $b2 = "%s, ClassID: %s"

        $b3 = "I wasn't able to open the hosts file"

        $b4 = "#BOT#VisitUrl"

        $b5 = "#KCMDDC"


    condition:

        all of ($a*) or all of ($b*)

}



Server <-> Bot 간 RC4 암호알고리즘을 사용하여 통신하는 것은 알겠다. 그리고 기본 키로 #KCMDDC[버전]#-890[password] 형식인 것을 알겠는데 Decrypt 하는 법을 모르겠다... 음..


+ 추가 2014.08.19

참고 URL : http://matasano.com/research/PEST-CONTROL.pdf




import zipfile

import glob

import sys


filelist = glob.glob(sys.argv[1] + '\\*.zip')


for i in filelist:

print i

fzip = zipfile.ZipFile(i,'r')

for filename in fzip.namelist():

if "result" in filename:

print filename

fzip.extract(filename,sys.argv[1])

fzip.close()



# File 이름 중에 result 문자열이 들어 간 경우만 해제한다.

# 대상 압축 파일 위치는 Argument로 받는다.

아파트 (교황 궁에 있는)는 그렇게 사치스럽지 않습니다 그곳은 평화스러운 곳입니다. 어쨌든 나는 혼자 살 수가 없습니다. 나는 이 세대가 전 세계에 걸쳐 있는 엄청난 빈곤을 우리에게 말하고 있다고 믿습니다. 


세상의 빈곤이 스캔들입니다. 이 세상에 엄청난 부가 있고 모든 사람이 먹을 수 있는 많은 자원이 있습니다. 너무나 많은 어린이들이 기하에 허덕이고 교육을 받지 못하고, 너무나 많은 사람들이 빈곤하다는 것을 이해할 수가 없습니다! 


오늘날 빈곤이 울부짖고 있습니다. 


우리 모두는 조금 더 가난해질 수 있는지 생각해야만 합니다. 


어떻게 하면 내가 가난한 선생님이셨던 예수님과 같이 조금 더 가난해질 수 있을까요. 


너무 많은 것을 가지지 않는 것이 조금 더 가난해지는 것입니다.


- 2013년 6월 7일 이탈리아와 알바니아의 예수회 학교 학생들과의 만남 중에서 

본 문서는 참고 / 공부용으로 수집한 문서로서 저자는 Jerald Lee 임을 밝힘니다.

 

[Windows_Hook]3.Debug_Technique.pdf

 

사용자 모드 디버거는 타겟 프로세스를 디버깅 하기 위해 CreatePRocess API를 이용하는데 함수의 전달인자 중 dwCreationFlags 변수에 DEBUG_ONLY_THIS_PROCESS 값을 사용하여 디버깅을 시작한다.

그리고 발생하는 다양한 이벤트들을 받기 위해 WaitForDebugEvent API를 호출하고 특정한 이벤트를 처리한 후에는 ContinueDebugEvent 함수를 호출한다.

이 방법의 문제점은 디버거가 실행되는 동안 타겟 프로세스도 멈춰있다는 것인데 이 문제는 멀티 스레드를 사용해서 해결할 수 있다.... ?

WaitForDebugEvent API가 호출됐을 때, 전달되는 이벤트 정보를 저장하는 DEBUG_EVENT 구조체는 잘알아두자.

디버그가 DEBUG_EVENT 구조체의 Union 안에 나열된 이벤트를 처리하는 동안 타겟 프로세스는 멈춰있게 되며 ContinueDebugEvent 함수가 호출되면 타겟 프로세스는 다시 실행이 된다.

 

+ Recent posts