###### tags:`trend ctf` # hh ## Steps - 先確定作業系統版本 - `volatility -f dump.vmem imageinfo` - 似乎只能 work 在 windows,如果是 linux 則用 - `strings -a <mem> | grep BOOT_IMAGE` - 不知道為什麼 Win10x64 搜不到 - 指令格式: `volatility -f <img> --profile=<OSversion> command ...` - 看當時執行的 process - `pslist`, `pstree`, `psxview` - `cmdline` - 當時的桌面 - screenshot --dump-dir tmp - 當時的網路狀態 - netscan - for windows - printkey, dumpregistry (註冊表資訊) - past command (看到用 command line 執行的指令) - cmdscan - file list (找出被 map 到記憶體的 file) - filescan - process environment - envars - process dump (可以 dump process binary) - **process dump** - memmap, memdump - process file dump (process 開啟檔案可能會殘留) - dumpfiles - 顯示出對應檔名的 json: `--summary=grrcon_summary.json` - type - img  —  ImageSectionObject - dat  —  DataSectionObject - vacb  —  SharedCacheMap - reference - https://github.com/volatilityfoundation/volatility/wiki/Command-Reference - 小畫家 dump - mspaint - 安裝 GIMP ``` sudo add-apt-repository ppa:otto-kesselgulasch/gimp sudo apt update sudo apt install gimp ``` - 但感覺有一堆 dependency 要裝,所以也可以直接用 ubuntu software center 抓 - 小畫家在存 data 時,會把 image 寫到 heap 或是 data section (一定有地方存要顯示的畫面) - 前提是要知道 offset + 長寬 - 用 `memdump` dump 出來 - GIMP 可以支持 raw image data - memdump 可以做到 80% 的東西 Disk forensic - 還原被刪掉的檔案、log - dump disK: `dd if=/dev/sdb1 of=/backup/sdb1.img` - 被刪除的檔案該怎麼找: `foremost`, `diskgenius` (windows) - 找什麼 - log - web directory - /tmp, /var/tmp - /usr/bin, /usr/local/bin - system log - /etc, /usr/local/etc - /var/cron - **被刪掉的檔案** - 使用 foremost - Recover files using their headers, footers, and data structures