4byte (압축된 사이즈) + 4byte (압축 해제 사이즈) + 78 9c(zlib header) + Data
gh0st flags는 존재하지 않는다.
기존 알려진 flags + zlib header 기반 snort 탐지를 우회하기 위함이라 판단된다.
4byte (압축된 사이즈) + 4byte (압축 해제 사이즈) + 78 9c(zlib header) + Data
gh0st flags는 존재하지 않는다.
기존 알려진 flags + zlib header 기반 snort 탐지를 우회하기 위함이라 판단된다.
1. 개요
Upatre 악성 코드는 2013년 8월경에 최초로 확인되어 지속적으로 유포 정황이 확인되고 있다. 보통 금융 사기 조직이 가장 많이 사용하는 다운로더 툴로 확인되며, Spam Botnet (Cutwail 등)에 의해 악의적으로 발송된 이메일 통해 사용자에게 유포를 시도한다. Upatre 악성 코드 감염 시, Zeus Banking Trojan, Rovnix Volume Boot Record Bootkit, Dyreza (DYRE) Banking Trojan, Ransomware 등의 악성 코드가 다운로드 및 실행이 될 것으로 보이며, 이 외 공격자의 의도에 따른 악성 코드가 다운로드 및 실행이 될 것으로 예상된다.
2. 감염 방식
- 이 메일을 통한 악성 코드 유포를 주로 진행하며, 그 대략적인 흐름은 아래 그림과 같다.
- 아래와 같은 방식을 같이 사용하여, 행위를 진행한다.
1) 첨부 파일에 ‘비밀번호’를 걸어서 유포
2) 이 메일 첨부 파일 내부에 또 다른 이 메일 파일 (*.msg, *.em l)을 첨부하여 해당 파일에 Upatre를 첨부하는 방식으로 유포
3) 이 메일 내용에 특정 URL로 접속되도록 보내며, 이를 통해 악의적인 Upatre 파일을 다운로드하는 방식으로 유포
4) 탐지를 회피하기 위해Header Byte를 랜덤하게 생성하고 악성 코드를 암호화
5) C&C 통신 시 SSL 암호화를 통해 진행하며, 연속적인 악성 코드 다운로드 수행
3. 확인된 행위
- 일반적으로 %TMP% 하위에 악의적인 exe 파일 생성할 것으로 판단
- 상황에 따라 추가 파일들 (txt) 생성 및 다운로드될 가능성이 존재 (그림 파일, 추후에 복호화 되어 PE로 사용될)
- 원본 악성 코드 (주로 pdf.exe 형태이며, icon은 pdf 그림) 는 자가 삭제
- C&C 서버로 감염 정보를 알리며, 감염 PC 사용자 정보, OS 정보, Spam 메일이 발송된 년, 월정보가 C&C 서버로 전송될 것으로 판단
4. Indicator Of Compromise
- HTTP 통신을 통해 C&C 서버와 통신을 하는데 URI를 C&C와 통신 시, 특정 규격을 맞추어 사용하는 것으로 판단
URI의 Parent Directory는 0704uk11 = 0704(date), uk(country), 11, Campaign ID
WORKSTATION = COMPUTER NAME, Bot ID
61-SP1 : Operating System
JJBELKBEHMBLL : Encrypted IP
(http://www.secureworks.com/cyber-threat-intelligence/threats/dyre-banking-trojan/)
- Parent Directory 또한 반복적으로 사용되는 경우가 존재하기에 이를 IoC로 활용할 수 있을 것으로 판단 (http://www.johannesbader.ch/projects/upcol.php?t=stats&sl=pd)
- 또한 비정상적인 User-Agent를 사용하는 Upatre 악성 코드가 확인되는 바, 이를 통한 Network Traffic 기반 탐지가 가능할 것으로 판단
(http://www.johannesbader.ch/projects/upcol.php?t=stats&sl=ua)
==============================================================================
Reference
- https://isc.sans.edu/forums/diary/UpatreDyre+malspam+Subject+eFax+message+from+unknown/19713/
- http://blogs.cisco.com/security/talos/upatre-ssl
- http://www.malware.unam.mx/en/content/infection-campaign-downloader-upatre-and-trojan-dyre-through-emails
- http://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/dyre-emerging-threat.pdf
- http://www.secureworks.com/cyber-threat-intelligence/threats/dyre-banking-trojan/
Upatre is a Trojan Downloader family that once installed, is responsible for stealing information and
downloading additional malware onto the victim machine. It typically arrives via spammed e-mail messages from the Cutwail Botnet,
either as an attachment or via a URL pointing to a remote hosting site. We are also seeing Exploit Kits being used as a vector for Upatre infections in the wild.
Upon successful infection, Upatre has been responsible for downloading malicious payloads from known malware families such as:
Zeus (Zbot) banking Trojan
Rovnix Volume Boot Record (VBR) bootkit
Dyreza (DYRE) banking Trojan
The Upatre malware family was first discovered in August 2013 and exponentially increased its infection rates by October, 2013.
With the demise of the popular Blackhole Exploit Kit in October 2013, many malware authors resorted to traditional spam
with the Upatre Trojan downloader as a medium for delivery of the ultimate payload, which also contributed to the increase in infections.
The Upatre malware authors have deployed multiple new techniques over the past year,
which is the reason why it is one of the most prevalent malware families today. Some of the features that we have tracked include:
One of the Indicate of Promise of Upatre Trojan
kereruthjertr456
Yastro
Infection
infects files by prepending its virus code to executable files
다수의 EXE 실행 파일 변조 (Modifiy)
Communication
infects files by prepending its virus code to executable files
Indicator of Compromise
1. C:\WINDOWS\svchost.com
2. HKLM\SOFTWARE\Classes\exefile\shell\open\command\: "C:\WINDOWS\svchost.com
3. MutexObject Name: MutexPolesskayaGlush
Reference : http://www.microsoft.com/security/portal/threat/encyclopedia/entry.aspx?Name=Virus:Win32/Neshta.A#tab=2
http://researchcenter.paloaltonetworks.com/2015/07/watering-hole-attack-on-aerospace-firm-exploits-cve-2015-5122-to-install-isspace-backdoor/
CVE-2015-5122 취약점을 이용하며, NFlog Backdoor의 진화 버전으로 해석하고 있다. Windows 7 x32, x64 별 동작이 다르며, XP 또한 동작이 다른 것으로 확인된다고 한다.
HTTP POST 이용하여 C&C 통신을 진행하며, 특정 URI 값과 Body에 암호화를 통해 전송하는 방식을 이용한다고 한다.
초기 접속을 탐지하기 위한 Snort는 Emerginthreat에서 제공하고 있으나 정/오탐 판별은 필요해보인다.
http://doc.emergingthreats.net/bin/view/Main/2020924
C&C를 HTTP POST 형태로 진행하는 과정에서 해당 URI의 depth? 계산 혹은 미스(?)에 따라 URI의 Slash가 // 와 같이 2개가 보이는 경우도 있다고 한다. 이런 상황이 흔할지는 모르지만, 체크해둘만 하다.
단순 특정 부분의 URI를 통한 Snort 탐지는 모니터링은 가능해보이나 실제 적용하기에는 어려움이 없지 않나 생각된다.