Post

침해사고분석 실습 5

리눅스 분석 실습 (록키리눅스)

툴 다운로드

Live Response Collection

  1. Brimorlabs에서 Live Response Collection 다운로드
  2. 명령어 실행:
    1
    2
    3
    4
    5
    
     unzip LiveResponseCollection-Cedarpelta.zip
     chmod -R 755 nix_Live_Response/
     cd nix_Live_Response
     ./nix_Live_Response.sh
     chmod -R 755 localhost_20250122_161909
    

CAT Scale

  1. WithSecure Labs에서 깃 명령어로 다운로드.
  2. 명령어 실행:
    1
    2
    3
    4
    
     git clone https://github.com/WithSecureLabs/LinuxCatScale.git
     chmod -R 755 LinuxCatScale/
     ./Cat-Scale.sh
     ./Extract-Cat-Scale.sh  # 오류 발생으로 보류
    

정보 수집

디스크 덤프

  1. 작업 디렉토리 생성 및 이동:
    1
    2
    3
    
     cd /home
     mkdir diskdump
     cd diskdump
    
  2. 디스크 정보 확인 및 덤프 생성:
    1
    2
    3
    4
    
     lsblk
     mount | grep sda1
     sudo dd if=/dev/sda1 of=/home/diskdump/image.dd bs=4M status=progress conv=noerror,sync
     du -sh *
    

메모리 덤프

  1. 시스템 업데이트 및 디렉토리 생성:
    1
    2
    3
    4
    
     dnf -y update
     cd /home
     mkdir memdump
     cd memdump
    
  2. LiME 설치 및 실행:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
     dnf install make gcc build*
     dnf install kernel-devel
     git clone https://github.com/504ensicsLabs/LiME.git
     cd LiME/src
     uname -r
     make
     insmod ./lime-5.14.0-503.19.1.el9_5.x86_64.ko "path=/root/dump.mem format=raw"
     cd /root
     mv dump.mem /home/memdump/
    

윈도우로 정보 옮기기 (분리된 환경에서 분석)

  1. WinSCP 다운로드 후 록키리눅스에서 덤프 파일 전송: WinSCP 전송 화면
  2. 전송된 파일 내용 확인:
    • 압축 파일은 반디집으로 해제.
    • 텍스트 파일은 에디터로 확인.
  3. FTK Imager 사용:
    • image mounting 기능으로 image.dd 열기.
    • Add Evidence Item으로 이미지 추가 후 분석.