조회 수 3734 추천 수 0 댓글 0
Live data acquisition - Memory dump with Mandiant Memoryze (lab test)
OS X VM: 10.8.4
Memory: 2GB
1. Download Memoryze for the Mac from:
https://www.mandiant.com/resources/download/mac-memoryze

2. Mount and run MacMemoryDumper


Note: the final size of the dumped image may exceed the size of your RAM.
3. basic process listing based on the memory image
./macmemoryze proclist -f ./my.mem 2> err.txt

Note: macmemoryze usage

4. process file handles of a particular process
sudo ./macmemoryze proclist -w -p 14 ~/Downloads/my.mem 2> err.txt

5. process section info of a particular process
sudo ./macmemoryze proclist -s -p 14 ~/Downloads/my.mem 2> err.txt

6. find hidden process
malware를 OS가 관리하고 있는 process list에서 unlink할 경우 위의 리스트에 malware가 출력되지 않는다. Memoryze는 process 카빙 (carving) 기능이 있어 메모리에 있는 시그니처를 기반으로 process를 나열하고 분석할 수 있다. 즉, 표준 OS listing에서 숨겨진 process를 찾아낼 수 있다.

아래는 live memory 분석을 통해 system call table을 출력 ('-f' 옵션이 없음). system call table hooking은 공격자가 OS 커널을 가지고 사용자 레벨 프로그램을 모니터하거나 필터링이 가능하도록 해준다. 보통 사용자 레벨 프로그램에서 악의적인 의도로 사용되는 파일 또는 네트워크 연결상태를 보이지 않게 만들기 위해 사용한다. syscalllist 기능은 March Trap table을 탐지하고 리스트하기 사용될 수도 있다. march trap table이란 OS X의 BSD 부분에 있는 system call table과 유사하다. OS X의 Mach 부분은 아님. 따라서 이 테이블에도 hooking이 있는지 점검해야 한다. live listing은 아래와 같이 실행

syscall table을 hooking하는데 드라이버를 사용한다. Memoryze는 메모리에서 로드된 kexts를 carve할 수 있다. malware 제작자는 보통 OS에서 자신을 숨기기위해 내부 데이터 구조에서 unlink한다. 이에 대항하여 Memoryze는 live 메모리 또는 dead 파일를 파싱하여 로드된 드라이버를 찾아낸다.

7. XML output
-x 옵션을 사용해 XML 포맷으로된 출력값을 얻을 수 있다.

Designed by sketchbooks.co.kr / sketchbook5 board skin