Memory Forensic/Volatility 3

[Digital Forensic] Memory Forensic Volatility 3

DF_m@ster 2024. 5. 7. 12:42

Memory Forensic

Memory Forensic은 현재 PC에서 실행 중인 프로세스 및 비휘발성 데이터에 기록되지 않는 휘발성 데이터를 분석할 수 있기 때문에 Memory Forensic은 중요한 과정으로 여겨진다.

 

본 글은 Memory Forensic 분석 도구로 유명한 Volatility 3의 명령어를 정리한 글이다.

 

 

 

0. Output settings

0-1. Output

Output : Volatility 3 명령어에서 분석 결과가 Sting인 경우 파일로, 여러개의 파일인 경우 폴더로 분석 결과를 출력하는 명령어

python.exe vol.py -f "Memory dump file path" windows."Plug-in" > "Save directory path\file name"
python.exe vol.py -f "Memory dump file path" -o "Save directory path" windows."Plug-in"
  • >: 분석 결과를 파일로 출력
  • -o: 분석 결과를 폴더에 저장

 

0-2. Clear Output

Clear Output : Volatility 3 명령어에서 분석 결과를 csv를 이용해 탭 정렬하여 출력하는 명령어

python.exe vol.py -f "Memory dump file path" -r csv windows.pstree.PsTree | ConvertFrom-Csv -Delimiter "," | Select-Object -Property * -ExcludeProperty TreeDepth | ft * -AutoSize > "Save directory path\file name"
  • -r csv: output 형식을 csv로 설정
  • ConvertFrom-Csv -Delimiter ",": csv 형식에서 “,” 삭제
  • ft * -AutoSize: csv 형식에서 탭 정렬 설정
  • Select-Object -Property * -ExcludeProperty TreeDepth: Tree Depth '*' 제거

 

0-3. Search String

Search String : Volatility 3 명령어에서 분석 결과 중 특정 String만을 포함하는 결과만 출력하는 명령어

python.exe vol.py -f "Memory dump file path" windows."Plug-in" | Select-String "Search string" > "Save directory path\file name"
  • Select-String: 선별할 Sting 설정
  • Caution: 출력 텍스트가 짤려서 출력되는 경우, 해당 String은 출력되지 않는다.

 

 

 

1. Memory Dump Info

1-1. Info

info : Memory Dump 파일의 config 정보 출력하는 명령어

python.exe vol.py -f "Memory dump file path" windows.info
python.exe vol.py --save-config "Save directory path\file name" -f "Memory dump file path" windows.info
python.exe vol.py -c "json file path" -f "Memory dump file path" windows.pslist
  • config: config 정보 추출
  • --save-config: config 파일 저장
  • -c: config 파일 참조

 

 

 

2. Process Info

2-1. Search String

pslist.PsList : Memory Dump 파일의 실행 중인 프로세스 리스트를 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.pslist

psscan.PsScan : Memory Dump 파일의 구조를 파악해 존재하는 모든 프로세스 리스트를 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.psscan

pstree.PsTree : Memory Dump 파일의 프로세스를 Tree로 시각화하여 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.pstree

 

2-2. Dump Files

dumpfiles.DumpFiles : Memory Dump 파일의 실행 중인 프로세스를 덤프하는 명령어 (Output Type: Directory)

python.exe vol.py -f "Memory dump file path" -o "Save directory path" windows.dumpfiles --pid "PID"
python.exe vol.py -f "Memory dump file path" -o "Save directory path" windows.dumpfiles --virtaddr "Logical address"
  • --pid: 설정한 PID의 프로세스 덤프
  • --virtaddr: 설정한 가상 주소의 프로세스 덤프
  • --physaddr: 설정한 물리 주소의 프로세스 덤프

 

2-3. Handles

handles.Handles : Memory Dump 파일의 특정 프로세스가 Handling하는 목록을 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.handles > "Save directory path\file name" ‑‑pid "PID"
  • --pid: 설정한 PID의 프로세스 Handling 목록

 

2-4. Dll List

dllist.DllList : Memory Dump 파일의 특정 프로세스의 Dll 목록을 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows."Plug-in" | Select-String "Search string" > "Save directory path\file name"
  • --pid: 설정한 PID의 프로세스 Dll 목록

 

2-5. Cmd Line

cmdline.CmdLine : Memory Dump 파일의 CMD 명령어 목록을 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.cmdline > "Save directory path\file name"

 

 

 

3. Network Info

3-1. Netstat

netstat.NetStat : Memory Dump 파일의 현재 실행중인 프로세스 네트워크 정보를 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.netstat > "Save directory path\file name"

 

3-2. Netscan

netscan.NetScan : Memory Dump 파일의 실행했던 모든 프로세스 네트워크 정보를 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.netscan > "Save directory path\file name"

 

 

 

 

4. File Info

4-1. File Scan

filescan.FileScan : Memory Dump 파일의 실행 중인 프로세스의 프로그램을 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.filescan > "Save directory path\file name"

 

 

5. Malware Info

5-1. Mal Find

malfind.MalFind : Memory Dump 파일의 실행 중 악성 프로세스로 의심되는 프로세스를 출력하는 명령어 (Output Type: File)

python.exe vol.py -f "Memory dump file path" windows.malfind > "Save directory path\file name"

 

 

 

 

 

Reference

https://blog.onfvp.com/post/volatility-cheatsheet/