메모리 분석 - Volatility3 Window
Typora에 정리하며 공부한것을 긁어온것 + 추가본
들여쓰기 번호, 그림위치 조정에 약간 문제가 있을수도 있습니다.
volatility3으로 윈도우 10환경에서 분석을 진행하였고 ubuntu 18에서 volatiliy2를 실행하였습니다.
분석한 이미지파일은 windows7 입니다.
volatility2를 알고 있다는 가정하에 작성하여 플러그인에 대한 설명은 거의 없습니다.
volatility2와 명령어 형식만 바뀐것이나 malfind와 같은 특정 조건이 필요한 것들은 사진이 없습니다.
Volatility3 공부
Writer : KUSTI
OS : Windows
python2의 수명이 끝나감에 따라 2021년 2월 python3을 이용한 volatility3이 업데이트 되었다.
volatility3은 윈도우 운영체제를 분석할때 profile을 자동으로 만들어 편해진것 같다. 다만 분석할때 시간이 걸리는데 microsoft에서 관련된 정보를 받아오는 것 같다. 이게 프로파일을 자동으로 만드는 과정이라 하면 같은 파일을 분석할때 더이상 이과정이 필요해 보이지 않아 보였다. 그래서 이 과정을 어떻게 건너뛸수 있을까 찾아보았을때 https://cpuu.postype.com/post/9993241 의 포스팅 된 글을 보면서 시간을 단축 할 수 있었다.
macOS와 Linux는 자동으로 profile을 자동으로 만들어 주지 않는다.
하지만 아직 volatility2에 비해 개발된 플러그인은 적은것 같다. 예를들어 cmdscan이나 consoles와 같은 명령어가 사라졌다. windows 10이후 보안 강화로 인해 사라졌는지 혹은 아직 플러그인 구현이 안된 것인지는 추후 찾아봐야 할 것 같다.
- OS Information (imageinfo)
- vol.py -f [Target] windows.info
- 해당 작업을 수행하면 기존 python2를 기반으로 사용하던 volatility에서의 imageinfo와 비슷한 정보를 얻을 수 있다.
- volatility2에서는 적절한 profile을 찾을 수 없을때 kdbg를 스캔하여 추가정보를 수집해야 했다.
- volatility3에서는 해당 명령어에서 윈도우 32/64 결정과 주,부 OS version, kdbg정보를 포함한다.
Windows 7, Major OS : 6, Minor OS : 1, Kernel 정보등이 나온다.
- PS List
- vol.py -f [Target] windows.pslist
- vol.py -f [Target] windows.psscan
- vol.py -f [Target] windows.pstree
- psxview명령어가 사라졌다.
File output이란 값이 생겼다. volatility2에서는 보지 못한것 같다.
- Proc dump
- vol.py -f [Target] -o [path] windows.dumpfiles --pid <PID>
- volatility2의 procdump가 dumpfiles로 묶인것 같다.
- volatility3의 proc dump기능을 찾아 봤지만 찾지 못했다.
- Handles
- vol.py -f [Target] windows.handles --pid <PID>
- PID, Handles, offset, process, name, access를 갖고 있다.
- volatiliy2에서는 vol.py -f [target] --profile <profile> handles --pid <PID> 이었다.
Type값부터 한칸씩 밀린것 같다. dirctory와 File이 있는 줄을 Type으로 생각하면 될것 같다.
HandleValue 다음값에 있는 0x4, 0x8같은 값은 Handle값인것 같다. volatility2에서 실행해 봤을대 Handle값이였다.
- Dll List
- vol.py -f [Target] windows.dlllist --pid <PID>
이것도 밀려있는데 PID - Process Name - Process Base - Size - Name - Path - LoadTime - File ouput 인듯 하다.
- CMD Line
- vol.py -f [Target] windows.cmdline
- volatility2에 있던 cmdscan, consoles와 같은 명령어는 아직 없는것 같다.
- PID, Process name, args 를 보여준다.
- NETWORK Information
- vol.py -f [Target] windows.netscan
- vol.py -f [Target] windows.netstat
- netstat명령어는 없는것 같다. 다른 블로그에는 있다고 하는데 전 보이지 않습니다.
- XP/2003의 몇몇 플러그인은 더이상 사용하지 않기 때문에 volatility3에서는 사용하지 않는다.
- vol.py -f [Target] --profile [Profile] connscan
- vol.py -f [Target] --profile [Profile] connections
- vol.py -f [Target] --profile [Profile] sockscan
- vol.py -f [Target] --profile [Profile] sockets
- 위 4개는 volatility3에서 지원하지 않는다.
이것 역시 밀려있다.
- Hive List
- vol.py -f [Target] windows.registry.hivescan
- vol.py -f [Target] windows.registry.hivelist
- volatility2와는 명령어만 바뀐것 같다.
- Printkey
- vol.py -f [Target] windows.registry.printkey
- vol.py -f [Target] windows.registry.printkey --key "Software\Microsoft\Windows\CurrentVersion"
- volatility2와는 명령어만 바뀐것 같다.
- File Scan
- vol.py -f [Target] windows.filescan
- volatility2와는 명령어만 바뀐것 같다.
- File Dump
- 위 Proc Dump에서 설명했던 dumpfiles의 옵션들이다.
- vol.py -f [Target] windows.dumpfiles --virtaddr <offset>
- vol.py -f [Target] windows.dumpfiles --physaddr <offset>
- Malfind
- vol.py -f [Target] windows.malfind
- Process의 name, start와 protection, commit charge, privatememory, file out, hexdump disassembly를 볼 수 있다.
- YARA
- 완전히 이해하지 못해서 추후 추가 예정
Reference
https://cpuu.postype.com/post/9993241 --write-config를 통해 config.json을 만들어 프로파일링 시간 단축 https://newtonpaul.com/malware-analysis-memory-forensics-with-volatility-3/ volatility3 plugin 확인 (영문) https://blog.onfvp.com/post/volatility-cheatsheet/ 기존 volatility와의 차이점 확인 (영문)