c0msherl0ck.github.io

forensics.blogspot.com/2010/01/nist-forensic-challenge_04.html

https://www.youtube.com/watch?reload=9&v=LITxwxdvuWo "SANS SIFT - Mount E01 Forensic Image Using imageMounter.py script"

https://medium.com/@cloudyforensics/sans-sift-workstation-761b3dc395bc "SANS SIFT Workstation"


#31. Perform a Anti-Virus check. Are there any viruses on the computer?


1. Converting image

2. Antivirus scan


1. Converting image


Virtual machine 에서 해당 이미지를 분석하기 위하여 다음과 같이 이미지를 변환한다.(dd -> vmdk)

[주의] E01 -> vmdk 는 되지 않으므로, E01 -> (FTK imager) -> DD ->(qemu) -> vmdk 과정을 거쳐야 한다.

$qemu-img convert [image1] [image2] .. [image N] -O vmdk [output.vmdk]


vmdk 파일을 virtual machine 에 import 하여 antivirus 스캔을 진행하려고 하였으나, 많은 antivirus 프로그램들이 해당 WinXP 버전에서 dll 에러가 뜨는 등의 문제가 발견되어, SANS-SIFT 에 직접 마운트하여 스캔을 진행하였다.


2. Antivirus Scan


가. image mount

$imageMounter.py -e [image] [mounted path]  // -e 는 E01 옵션이다.


나. scan

$clamscan -ri [mounted path]  // -r : recursive, -i : print only infected file


다. unmount

$umount [mounted path]


https://www.cfreds.nist.gov/Hacking_Case.html

http://forensic-proof.com/archives/288 "윈도우 휴지통 분석"


#28. How many executable files are in the recycle bin?


[윈도우 운영체제별 휴지통 경로]

Operating System

 Common File System

 Recycle Bin system folder

 Windows 95/98/ME

 FAT32

 C:Recycled

 Windows NT/2K/XP

 NTFS

 C:Recycler<USER SID>

 Windows Vista

 NTFS

 C:$Recycle.Bin<USER SID>


winhex 에서 해당 경로를 찾아가면 다음과 같고, 실행파일은 총 4개이다.


#29. Are these files really deleted?


윈도우에서 파일을 삭제할 때에는 실제로 해당 파일을 지우는 것이 아니라 해당 파일의 Meta 정보만($MFT 등) 변경하는 것이다. 그러므로, 삭제를 하여 휴지통으로 이동(폴더 경로 변경)되었다 하더라도 손쉽게 우클릭을 통해 복구를 할 수 있는 것이다. 추가적으로, 휴지통으로 이동이 아닌 shift + delete 기능의 경우에는 Meta 정보만($MFT 등) 삭제를 하였다 표기하고, 실제 파일 데이터 영역까지의 링크를 끊는것이므로 해당 영역에는 파일 데이터가 계속 존재하고 있고, 파일 카빙등을 통해 복구할 수 있다.

 

#30. How many files are actually reported to be deleted by the file system? 


https://github.com/abelcheung/rifiuti2 "USAGE"

https://github.com/abelcheung/rifiuti2/releases "DOWNLOAD"

Rifiuti2 is a for analyzing Windows Recycle Bin INFO2 file. Analysis of Windows Recycle Bin is usually carried out during Windows computer forensics. Rifiuti2 can extract file deletion time, original path and size of deleted files and whether the trashed files have been permanently removed.


$rifiuti2.exe -o [output] [input : INFO2]


https://www.cfreds.nist.gov/Hacking_Case.html


#27. Yahoo mail, a popular web based email service, saves copies of the email under what file name?


#26 에서 용의자의 email address 는 mrevilrulez@yahoo.com 이었고, 이를 email.file_2.txt 에서 찾아보면 다음의 4개의 파일에서 해당 이메일 주소가 발견되었음을 알 수 있다.


Documents and Settings/Mr. Evil/Local Settings/Temporary Internet Files/Content.IE5/HYU1BON0/last[1].htm

Documents and Settings/Mr. Evil/Local Settings/Temporary Internet Files/Content.IE5/HYU1BON0/login[1].htm

Documents and Settings/Mr. Evil/Local Settings/Temporary Internet Files/Content.IE5/HYU1BON0/ShowFolder[1].htm

Documents and Settings/Mr. Evil/Local Settings/Temporary Internet Files/Content.IE5/HYU1BON0/ShowLetter[1].htm


[email.file_2.txt]


위의 4가지 파일을 추출하여 열어보았을 때, email 사본이 저장된 것은 ShowLetter[1].htm 파일이다.


[ShowLetter[1].htm]


https://www.cfreds.nist.gov/Hacking_Case.html

http://network-forensics.blogspot.com/2010/01/nist-forensic-challenge_04.html

http://bahndal.egloos.com/586095 "[bash: grep] 바이너리 파일에서 16진수(hex) 데이터 검색하기"


#26. Search for the main users web based email address. What is it?


grep regular expression for email address

$ grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" filename.txt


여기서 \b 는 공백을 의미하는데, 공백이 없도록 검색하는 것이 미탐의 확률을 줄인다.

"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}"


"\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" 가 미탐을 줄이기에 경험적으로 가장 좋다.

grep [옵션] [문자열] [탐색할 파일] > [결과파일]


grep 옵션 설명

-E : regular expression

-I(대문자 i) : binary file 무시

-i : 대소문자 무시

-r : 현재 input path 의 하위 디렉토리까지 탐색

-o : 매칭된 문자열만을 출력(default : 매칭된 문자열이 있는 행을 출력)

-h : 파일명을 표시하지 않음

-l(소문자 L) : 파일명만 표시

-a : binary file 처리


email.file.txt : 파일명, 매칭된 문자열이 있는 행

email.file_2.txt : 파일명, 매칭된 문자열

email.file_3.txt : 파일명


email.file.txt

email.file_2.txt

email.file_3.txt


[email.file.txt]


[email.file_2.txt]


[email.file_3.txt]


※ web based email address 이므로, Documents and Settings/Mr. Evil/Local Settings/Temporary Internet Files/Content.IE5/ 경로에서 발견된 이메일 주소를 기반으로 재분석한다.


총 75개의 주소가 나타나고, 이중 가장 많이 나타난 이메일 주소는 mrevilrulez@yahoo.com 이므로, 이것이 혐의자의 web based email address 라 할 수 있다.

https://www.cfreds.nist.gov/Hacking_Case.html

https://www.wireshark.org/docs/wsug_html_chunked/ChWorkBuildDisplayFilterSection.html

https://www.wireshark.org/docs/dfref/h/http.html

http://network-forensics.blogspot.com/2010/01/nist-forensic-challenge_04.html


#23. Ethereal, a popular “sniffing” program that can be used to intercept wired and wireless internet packets was also found to be installed. When TCP packets are collected and re-assembled, the default save directory is that users \My Documents directory. What is the name of the file that contains the intercepted data?


#24. Viewing the file in a text format reveals much information about who and what was intercepted. What type of wireless computer was the victim (person who had his internet surfing recorded) using?


1. wireshark 를 이용하여 해당 파일을 열고, http 패킷의 user-agent 영역을 분석한다.


2. tshark 로 결과 파일 뽑아내기

$ tshark -R http.user_agent -Tfields -e http.user_agent -r interception


#25. What websites was the victim accessing?


1. wireshark 를 이용하여 해당 파일을 열고, http 패킷의 host 영역을 분석한다.


2. tshark 로 결과 파일 뽑아내기

$ tshark -R http.host -Tfields -e http.host -r interception | sort -u (정렬 후 중복제거)


https://www.cfreds.nist.gov/Hacking_Case.html


#21. A popular IRC (Internet Relay Chat) program called MIRC was installed.  What are the user settings that was shown when the user was online and in a chat channel?


환경설정 파일인 ini 파일들을 추출하여 분석할 결과, 다음과 같이 mirc.ini 파일에서 user settings 관련 흔적을 찾을 수 있었다.


# 22. This IRC program has the capability to log chat sessions. List 3 IRC channels that the user of this computer accessed



https://www.cfreds.nist.gov/Hacking_Case.html


#20. List 5 newsgroups that Mr. Evil has subscribed to?


#19 에서 발견된 outlook express 관련 폴더 경로로 접근하면 다음과 같다.

이를 통해 혐의자가 outlook 을 통해 구독한 newsgroup 을 알 수 있다.

Documents and Settings/Mr. Evil/Local Settings/Application Data/Identities/{EF086998-1115-4ECD-9B13-9ADC067B4929}/Microsoft/Outlook Express/

https://www.youtube.com/watch?v=BxuY9FET9Y4

http://network-forensics.blogspot.com/2010/01/nist-forensic-challenge_04.html


#19. What two installed programs show this information?


#18 의 NNTP 서버 정보인 news.dallas.sbcglobal.net 문자열이 있는 파일을 검색한다.


1. linux 기본 명령어인 grep 을 사용하기 위하여, C:\Windows\System32 폴더 경로에 grep.exe 명령어 파일을 복사한다.


Linux command.zip



2. 다음의 명령어를 통해, 해당 문자열이 있는 파일 목록을 matches.txt 로 추출한다.

[주의] arsenal image mounter 로 이미지를 마운팅할때 Write temporary 옵션을 선택해야 D 드라이브(이미지 마운트 경로)에 바로 생성이 된다. Read Only 일 경우 redirection 파일 경로를 다른 곳으로 해야한다.


3. 추출된 matches.txt 를 보면 다음과 같다.


matches.txt



Forte Agent, Outlook Express 폴더 경로에서 발견된 것으로 미루어 보아 두 프로그램을 통해 뉴스를 구독했음을 알 수 있다.

https://www.cfreds.nist.gov/Hacking_Case.html


#17. What is the SMTP email address for Mr. Evil?

#18. What are the NNTP (news server) settings for Mr. Evil?


1. E-mail Program 조사

HKLM\SOFTWARE\Clients\Mail


Forte Agent, Hotmail, MSN Explorer, Outlook Express 4 개의 이메일 프로그램 중, Forte Agent 를 공격자가 설치한 프로그램이므로, 해당 프로그램을 이용했을 가능성이 가장 높다.


2. 해당 프로그램 폴더 조사

Forte Agent 프로그램 폴더에서 정보가 될만한 파일을 탐색하던 도중, 다음과 같이 환경설정 파일을 발견하였다.

\Program Files\Agent\Data\AGENT.INI


3. 파일 분석

AGENT.INI 파일을 열면, 다음과 같이 E-mail addressnews server 정보를 발견할 수 있다.



https://www.cfreds.nist.gov/Hacking_Case.html


#16. Find 6 installed programs that may be used for hacking.


이전 글 data leakage case #10, 11 application installed/execution logs 의 Registry 부분 참고.

REGA 를 통한 분석.


[설치된 응용 프로그램]

2004-08-20 이후에 설치된 프로그램을 조사한다.


Anonymizer Bar :  a tool that attempts to make activity on the Internet untraceable.

Cain & Abel : a password testing & recovery and intrusion testing tool for Microsoft Windows

Faber Toys : a system utility, mainly developed for power users who want to know what's going on in their Personal Computer. It may also be used by programmers as a tool for tracking their applications.

Forte Agent : a multi-server newsreader. Agent is also an excellent multiple POP and SMTP e-mail client.

CuteFTP :  a series of FTP (file transfer protocol) client applications 

CuteHTML : a special program for editing and building web pages. It also supports the creation of webpages in visual mode.

mIRC : a popular Internet Relay Chat client used by individuals and organizations to communicate, share, play and work with each other on IRC networks around the world.

Powertoys For Windows XP : a set of freeware system utilities for power users, developed by Microsoft for its flagship operating system, Windows. PowerToys do not undergo the same rigorous testing that the operating system components do and are published without technical support.

123 Write All Stored Passwords : WASP will display all passwords of the currently logged on user that are stored in the Microsoft PWL file.

PWL 파일이란? 윈도의 네트워크 암호 설정 정보 파일. 사용자가 네트워크에 접속하기 위해 로그온 암호를 설정하면 윈도는 사용자 이름과 동일한 파일명에 확장자가 PWL인 파일을 생성하게 된다. 또한 로그온 암호 외에도 네트워크 상의 공유 자원을 지정할 때 사용할 수 있는 암호도 PWL 파일에서 관여하게 된다

Look@LAN : users can use to keep track of network activity.

Network Stumbler : A reliable software that helps you to quickly detect wireless local area networks (WLANs) and search for locations with poor coverage in your WLAN

WinPcap : WinPcap has been recognized as the industry-standard tool for link-layer network access in Windows environments, allowing applications to capture and transmit network packets bypassing the protocol stack, and including kernel-level packet filtering, a network statistics engine and support for remote packet capture.

Ethereal : This network protocol analyzer allows you to examine data from a live network or from a captured file on disk.


[공격 시나리오]

가. 공격자 IP 은닉

Anonymizer (hides IP tracks when browsing)


나. Wifi 탐색

NetStumbler (wireless access point discovery tool) 


다. Network 정보 수집

Look&LAN_1.0 (network discovery tool) 

Ethereal (packet sniffer) 


라. Password Cracking

Cain & Abel v2.5 beta45 (password sniffer & cracker) 

123 Write All Stored Passwords (finds passwords in registry) 


[응용프로그램 사용 로그]