공부/포렌식 (Forensics)

[xcz.kr | Forensics] Prob24 write up

eunjuu 2023. 8. 18. 15:56
728x90

📎 http://xcz.kr/START/challenge.php
 
👾 Title
Memoryyyyy Dumpppppp
 
👾 Description

👾 어느날 나는 커피집에서 노트북을 놓고 잠시 자리를 비웠다.
그리고 다시 와서 작업을 하다가 작업프로그램이 갑자기 꺼졌고, 작업파일들이 모두 다 삭제되었다.
원인을 찾기위해 나는 서둘러 메모리 덤프를 만들었다.
이 메모리 덤프파일을 분석하여 다음 정보를 알아내자.
키 형식 : (Process Name_PID_Port_Process Execute Time(Day of the week-Month-Day-Hour:Min:Sec-Years)
ex (explorer.exe_1234_7777_Mon-Jan-01-12:00:00-2012)

 


 

메모리 덤프는 응용 프로그램 또는 시스템 충돌시 메모리 내용을 표시하고 저장하는 프로세스로, 주로 운영 체제 내에서 문제나 오류를 식별하거나 시스템 내에 설치된 응용 프로그램을 식별한다.

→ 일반적으로 메모리 덤프는 프로그램, 응용 프로그램 및 시스템이 종료되거나 충돌하기 전에 마지막 상태에 대한 정보를 제공

 

 

 

파이썬 스크립트 언어로 제작된 오픈소스 메모리 포렌식 도구볼라틸리티(Volatility)를 이용해 문제를 풀어보겠다.

 

 

먼저 문제에 첨부된 파일을 다운로드한다.

두 개의 파일 중 xczprob2.7z.001을 풀어서 나온 xczprob2 파일을 volatility로 분석해보겠다.

 

볼라틸리티는 exe 파일로 설치할 수도 있고, 파이썬의 설치 경로에 파일을 넣어서 설치할 수도 있다. 나는 exe파일을 다운로드 받았다.

 

설치 링크 : https://www.volatilityfoundation.org/releases

 

Release Downloads | Volatility Foundation

Volatility releases are the result of significant in-depth research into OS internals, applications, malicious code, and suspect activities. Releases represent a milestone in not only our team's progress, but also in the development of the community and fo

www.volatilityfoundation.org

 

먼저 imageinfo를 찾아보겠다.

 

 

  • imageinfo : 덤프 파일의 시스템 및 프로파일 정보 확인 가능
vol.py -f "분석할 파일 이름" imageinfo

 

 

Suggested Profile(s)를 통해 운영체제 정보를 확인할 수 있다.

이 파일은 WinXPSP2x86 운영체제를 사용한다.

 

 

다음으로 flag에 프로세스 이름을 넣어야 하니 psscan 이용해 프로세스 정보를 확인해보겠다.

 

  • psscan : 종료되거나 은닉되어 있는 프로세스 확인 가능
vol.py -f "분석할 파일 이름" --profile="프로파일 이름" psscan

프로파일 이름은 imageinfo에서 찾은 Suggested Profile(s)다. 

 

이것만으로는 정보가 부족해 connections 이용해 Active한 TCP 연결에 대한 정보를 조회하겠다.

 

  • connections : 현재 연결된 tcp 통신에 대한 정보 확인 가능
vol.py -f "분석할 파일 이름" --profile="프로파일 이름" connections

 

Pid가 1124인 한 개의 프로세스가 사용된 것을 확인할 수 있다. 위의 psscan에서 Pid가 1124인 프로세스를 찾아보니 “nc.exe”이다.

 

키 형식 : Process Name_PID_Port_Process Execute Time(Day of the week-Month-Day-Hour:Min:Sec-Years)

 

 

Process Name: nc.exe

PID : 1124

Port : 80

Process Execute Time(Day of the week-Month-Day-Hour:Min:Sec-Years)

 

flag {nc.exe_1124_80_Fri-Nov-02-09:06:48-2012}

 

 

 

+) 참고하면 좋은 사이트

https://www.ahnlab.com/kr/site/securityinfo/secunews/secuNewsView.do?menu_dist=2&seq=22227 

 

[Focus In-depth] 볼라틸리티를 이용한 메모리 분석 사례

컴퓨터 포렌식은 최근 몇 년 사이 침해 사고 대응과 분석 과정에서 중요한 기술적 분석 및 조사 기법으로 주목을..

www.ahnlab.com

 

 

728x90