forensic-wargame

grrcon2015 1,2,3

SKUSTI 2022. 7. 25. 22:30

쓰던 .md에서 긁어온거라 뭔가 이상함

조만간 공부 혹은 forensic 카테고리에 이번글 쓰면서 공부한것 올릴예정

 

Volatility 사용 문제풀이

CTF-d Memory-grrcon 2015 1,2,3


Writer

Kusti

환경

Windows 10, Ubuntu 16.04

Using Tool, Site

volatility, Virustotal

기타

1. Window 환경에서의 volatility 명령어는 volatility_2.6_win64_standalone.exe로 시작한다.
2. Linux환경에서의 volatility 명령어는 vol.py로 시작한다.
3. Flag값은 넣지 않았다.

I. Target 에서 E-mail adress 찾기

1.  imageinfo를 통해 Target file의 정보를 불러온다.
   	1.  imageinfo 사용 방식 : vol -f [Target] imageinfo
   	2.  volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss imageinfo
   	3.  imageinfo를 통해 Suggested Profile을 알수 있다.
2.  Pattern matching 혹은 List Walking을 사용해 Process list를 출력한다.
   1.  psscan방식 사용 : vol -f [Target] --profile=[Suggested Profile] psscan
   2.  volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 psscan
   3.  pslist방식 사용 : vol -f [Target] --profile=[Suggested Profile] pslist
   4.  volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 pslist
3.  OUTLOOK은 무료 개인 전자메일 프로그램이다. 이 프로세스를 dump한다.
   	1.  memdump 활용 : vol - f [Target] --profile=[Suggested Profile] memdump -p [proccess ID] -D [경로]
   	2.  volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 memdump -p 3196 -D ./
4.  해당 dump파일 안에 있는 문자열을 txt파일로 변환한다.
   	1.  Strings 프로그램활용 : string.exe [file] > [file]
   	2.  strings.exe 3196.dump > a.txt
5.  Ctrl + F 를 활용하여 @gmail을 찾아 전자메일 주소를 확인한다.

II. Target에서 공격자가 보낸 첨부파일의 이름

  1. Key Format을 보면 exe파일인것을 볼수 있다.
  2. 앞서 I 만들었던 a.txt에서 .exe파일들을 찾아 보면 확인할수 있다.

III. AllSafeCyberSec 사용자들을 피싱했다. 사용된 악성코드의 이름은 무엇인가?

Virustotal 이라는 웹사이트를 사용했는데 dumped file에서 permission issue가 발생하였다. 그래서 Linux환경에서 chmod777을 이용해 권한변경후 진행하였다.

  1. 악성코드가 특정파일을 감염시켰을 거라 판단, Memory Dump에서 Filescan을 진행한다. 모든범위에서 filescan을 하지 않고 특정 구문이 들어간 범위에서 filescan을 하였고 이과정에서 2개의 경우의 수를 두었다.
    1. AllsafeCyberSec 사용자들을 피싱했다는것을 토대로 AllsafeCyberSec을 특정구문으로 두고 명령어 작성
      • Windows : volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 filescan | findstr AllsafeCyberSec
      • Linux : vol.py -f Target1-1dd8701f.vmss --profile=Win7SP0x86 filescan | grep "AllsafeCyberSec"
    2. II에서 찾은 첨부파일을 특정구문으로 두고 명령어 작성
      • Windows : volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 filescan | findstr 첨부파일
      • Linux : vol.py -f Target1-1dd8701f.vmss --profile=Win7SP0x86 filescan | grep "첨부파일"
    3. AllsafeCyberSec을 특정구문으로 두었을땐 검색결과가 없었지만 첨부파일을 특정구문으로 두고 filescan을 실행했을때 6개의 file이 검색되었다.
  2. 감염된 파일을 dump후 Virustotal에 업로드하여 확인한다.
    1. dumpfiles명령어를 활용하여 6개의 파일을 dump한다.
      • Windows : volatility_2.6_win64_standalone.exe -f Target1-1dd8701f.vmss --profile=Win7SP0x86 dumpfiles -Q [pid] -D ./
      • Linux : vol.py -f Target1-1dd8701f.vmss --profile=Win7SP0x86 dumpfiles -Q [pid] -D ./
    2. dump한 파일중 특정 파일에서 특정 악성코드가 감지되었다.