*nix Live Forensics
디지털 포렌식 조사에서 조사하고자 하는 대상(디지털기기)이 활성 상태인 경우, 초기에는 바로 전원을 종료한 후 비활성 데이터를 수집했다. 하지만 이 경우 램(RAM)과 같은 휘발성 메모리에 저장된 데이터는 사라지기 때문에 조사하기 어렵다. 휘발성 메모리에서 유지하는 데이터는 비교적 사용자가 사용하던 최근의 데이터이다. 따라서, 사건이 발생한 시점에 휘발성 메모리의 정보를 얻는다면 조사에 많은 도움이 될 수 있다.
사건이 발생하고 시간이 지났더래도 휘발성 메모리에서 유지하는 정보들은 매우 큰 도움이 될 수 있다. 실제로 몇 개월간 켜 놓은 컴퓨터의 램을 조사한 경우, 일주일, 심지어는 몇 달전에 사용한 데이터도 남아 있었다는 실험 결과가 있다. 따라서 최근에는 활성 데이터만을 대상으로 증거와 관련될 수 있는 데이터를 수집하는 라이브 포렌식(Live Forensics)이 활성화 되어 있다.
윈도우즈 환경에서 활성 데이터를 수집하는 도구는 COFEE를 비롯하여 많은 도구들이 있지만 Unix-like 시스템에서의 도구들은 많지 않은 편이다. 따라서, 대표적인 Unix-like 시스템에서 직관적으로 살펴볼 수 있는 활성 데이터 수집 명령을 살펴보도록 하자.
| Features | Ubuntu | Fedora | Free BSD |
| Storage/Partitiojn/File System | fdisk -l cat /proc/scsi/scsi cat /proc/ide cat /proc/diskstats cat /proc/partitions df -h |
cat /proc/scsi/scsi cat /proc/ide cat /proc/partition cat /etc/fstab df -h |
cat /etc/fstab df -h fdisk -v ad0 |
| Memory Status | cat /proc/meminfo cat /proc/ cat /proc/iomem cat /proc/slabinfo cat /proc/vmallocinfo cat /proc/vmstat vmstat |
vmstat | vmstat |
| System Uptime | uptime cat /proc/uptime |
uptime | uptime |
| Date | date | date | date |
| Machine model, OS Level, CPU … | uname -a uname -r cat /proc/version cat /proc/cpuinfo |
uname -a uname -r cat /proc/version cat /proc/cpuinfo |
uname -a uname -r sysctl hw.model |
| Modules, Patch, Hardware … | cat /proc/modules lsmod |
lsmod | kldstat |
| Installed Software | dpkg –get-selections cat /var/log/dpkg.log |
rpm -qa | pkg_info -a |
| Process Status | ps -elf | ps -ef | ps aux |
| Scheduling, Start programs | cat /etc/crontab ls /etc/init.d/* |
cat /etc/rc.d/ | cat /etc/crontab cat /etc/rc.d/ cat /etc/rc.local/ |
| Internet Protocol | ifconfig -a cat /etc/hosts |
ifconfig -a cat /etc/hosts |
ifconfig -a cat /etc/hosts |
| Routing Table | netstat -rn | netstat -rn | |
| ARP | arp -a | arp-a | arp -a |
| Network Status Open File & Sockets |
netstat -anp lsof -i -P -n |
netsat -anp | netstat -anp fstat |
| Recent Command | cat bash_history | history | history cat ~/.history |
| Account | cat /etc/ passwd cat /etc/ shadow cat /etc/ group |
cat /etc/ passwd cat /etc/ shadow cat /etc/ group |
cat /etc/ passwd cat /etc/ master.passwd cat /etc/ group |
| User Activity | w finger -lmsp last |
w last |
w finger -lmsp last |
| Booting Message | dmesg | dmesg | |
| Printer Queues | /var/spool/lpd/lp/* | /var/spool/lpd/lp/* | /var/spool/print |
| Run Level | runlevel | runlevel | |
| Kernel | /boot/vmlinuz | /kernel | |
| Physical Memory | /dev/mem /proc/kcore |
/dev/mem | /dev/mem /dev/kmem |
| Swap Partition | cat /proc/swaps | (/dev/sda2) | swapinfo (/dev/ad0s1b) |
| Features | IBM AIX | HP-UX | OpenSolaris |
| Storage/Partitiojn/File System | lsdev lscfg lsfs cat /etc/filesystems df -k bootinfo -s hdisk# |
ioscan -fC diskinfo/dev/rdsk/c#t#d# vgdisplay -v cat /etc/fstab bdf -i |
df -a mount -p cat /etc/device.tab cat /etc/vfstab prtvtoc format -d c#t#d# |
| Memory Status | vmstat | vmstat | vmstat |
| System Uptime | uptime | uptime | uptime |
| Date | date | date | date |
| Machine model, OS Level, CPU … | uname -a bootinfo -m lsdev -Cc processor |
uname -a uname -r model ioscan -fnC |
uname -imp uname -r psrinfo -pv |
| Modules, Patch, Hardware … | genkex oslevel -r |
kmadmin -s cat /stand/system ioscan -fn cat /stand/system |
modinfo -c prtconf -D |
| Installed Software | lslpp -L all | swlist | pkginfo |
| Process Status | ps -ef | ps -ef | ps -elf pstree -a pldd [PID] |
| Scheduling, Start programs | crontab -l cat /etc/rc |
cat /var/spool/cron /crontabs/$USER cat /etc/init.d/* |
crontab -l cat /etc/init.d/* |
| Internet Protocol | ifconfig -a cat /etc/hosts |
ifconfig lan0 netstat -in lanscan cat /etc/hosts |
ifconfig -a cat /etc/hosts |
| Routing Table | netstat -rn | netstat -rn | netstat -rn |
| ARP | arp -an | arp -an | arp -an |
| Network Status Open File & Sockets |
netstat -nat | netstat -an | netstat -an pfiles |
| Recent Command | cat~/.sh history | cat~/.bash_history | |
| Account | cat /etc/ passwd cat /etc/security/ passwd |
cat /etc/ passwd cat /tcb/files cat /auth/r/root cat /etc/ group logins |
cat /etc/ passwd cat /etc/ shadow cat /etc/ group logins |
| User Activity | w who last |
w finger -lmsp who -r last |
w finger -lmsp who -r last |
| Booting Message | dmesg | dmesg | |
| Printer Queues | /etc/qconfig | /etc/lp /interface/* |
/etc/lp /interfaces/* |
| Run Level | who -r | who -r | who -r |
| Kernel | /usr/lib/boot/unix_up | /stand/vmunix | /kernel/genunix |
| Physical Memory | /dev/mem | /dev/mem Gcode [PID] |
|
| Swap Partition | lsps -a (/dev/hd6) |
swapinfo -t (/dev/vg00/lvol2) |
swap -l (/dev/vx) (/dsk/swapvol) |
실제 HP-UX, AIX, IBM 서버를 대상으로 명령어는 모두 테스트 해보았다. 다만, 각 버전별로 조금 차이가 있을 수 있다. 그리고 조사한 명령 이외에도 포렌식 관점에서 중요하게 살펴봐야할 명령어도 있을 것이다. 자신의 목적에 맞게 필요한 부분만 취하거나 혹 추가하여 스크립트를 만들어두면 활성 시스템에서 데이터를 수집하는 것이 효과적일 것이다.
위 조사를 위해 도움을 준 @behappysoo, junghmi, @n0fate 님께 감사의 마음을 전합니다.
-
http://feedbeef.blogspot.com n0fate
-
enseo
-
http://forensic-proof.com Proneer
-
-
XnetBLue
-
http://forensic-proof.com Proneer
-
-
XnetBLue
-
http://forensic-proof.com Proneer
-
-
http://kklyoon.tistory.com 불멸의자취생
-
http://forensic-proof.com Proneer
-
Categories
- 0×00 News (18)
- 0×01 Fundamentals (18)
- 0×02 Live Forensics (3)
- 0×03 Incident Response (15)
- 0×04 Storage Forensics (27)
- 0×05 File System Forensics (36)
- 0×06 Windows Forensics (44)
- 0×07 *nix Forensics (3)
- 0×08 Mac Forensics (1)
- 0×09 Web Forensics (8)
- 0x0A Data Forensics (8)
- 0x0B Forensic Challenges (15)
- 0x0C Forensic Education (9)
- 0x0D EnCase (16)
- 0x0E Forensic Tools (10)
- 0x0F Slides (26)
- 0×11 Forensic Articles (10)
- 0×12 Forensic Interview (5)
artifacts CEIC challenge Codegate conference Data recovery defcon DFRWS ENCASE EnCE encoding FAT File System FTK hardware imaging index.dat interview Live Forensics live response malware mbr memory forensics network ntfs padocon practitioner prefetch process RAID Recycle Bin SCSI signature Slack slide SSD timeline timestamp USB usb artifacts virtual forensics WDFS web browser windows 8 writeup
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
Archives
- May 2013 (2)
- April 2013 (3)
- March 2013 (9)
- February 2013 (1)
- January 2013 (7)
- December 2012 (1)
- November 2012 (3)
- October 2012 (4)
- September 2012 (10)
- August 2012 (1)
- July 2012 (4)
- June 2012 (7)
- May 2012 (5)
- April 2012 (5)
- March 2012 (2)
- February 2012 (2)
- January 2012 (5)
- December 2011 (1)
- November 2011 (5)
- October 2011 (2)
- September 2011 (2)
- August 2011 (5)
- July 2011 (3)
- June 2011 (6)
- May 2011 (2)
- April 2011 (7)
- February 2011 (11)
- December 2010 (3)
- November 2010 (4)
- October 2010 (8)
- September 2010 (5)
- August 2010 (6)
- July 2010 (4)
- June 2010 (1)
- May 2010 (12)
- April 2010 (4)
- March 2010 (14)
- February 2010 (16)
- December 2009 (3)
- November 2009 (9)
- October 2009 (10)
- September 2009 (7)
- August 2009 (9)
- July 2009 (7)


