[Debian 계열의 리눅스]
◎ 커널 헤더 패키지 설치
| # apt-get install linux-headers |
※ linux-headers 는 설치시 정확한 패키지명을 지정하라는 메세지가 발생하는데 "uname -r"을 통해 버전을 확인하고 설치를 하면 됩니다.
◎ 개발에 필요한 기본 라이브러리와 헤더파일 등을 가지고 있는 패키지 설치
| # apt-get install build-essential |
※ Debian 계열에서 make / compile 과 관련된 에러가 발생하면 build-essential 패키지를 설치해주면 됩니다.
◎ Dwarfdump 설치
| # apt-get install dwarfdump |
dwartdump 를 설치합니다.
[Redhat 계열의 리눅스]
◎ 커널 헤더 패키지 설치
| # yum install kernel-devel |
또는
| # rpm --install [패키지명] |
◎ Libdwarf 설치
| # tar xvfz libdwarf-20170416.tar.gz # cd dwarf-20170416/libdwarf # ./configure # make # cd ../dwarfdump # ./configure # make # ln -s (dwarf dir)/dwarfdump/dwarfdump /usr/local/bin/dwarfdump |
CentOS 의 경우 Libdwarf 를 자동으로 설치할 수 없기 때문에 소스를 다운로드 받아 수동으로 설치해야 합니다.
다운로드 경로 : https://www.prevanders.net/dwarf.html#releases
◎ 개발에 필요한 기본 라이브러리와 헤더파일 등을 가지고 있는 패키지 설치
| # yum install elfutils-libelf-devel |
◎ 종합
| # yum groupinstall "Development Tools" -y && yum install kernel-devel kernel-headers glibc* binutils elfutils elfutils-devel elfutils-libelf* gcc subversion |
[공통]
◎ 볼라틸리티(Volatility) 설치
| # cd volatility # python ./setup.py install |
다운로드 경로 : https://github.com/volatilityfoundation/volatility/releases
◎ vtypes(kernel's data structures : 커널의 데이터 구조) 생성
| # cd [volatility directory]/tools/linux # make # head module.dwarf |
make를 진행하면 module.dwarf 파일과 system map file 이 생성됩니다.
◎ Symbols 가져오기
| # zip /[volatility directory]/volatility/plugins/overlays/linux/[profile name.zip] volatility/tools/linux/module.dwarf /boot/[make 이후 만들어진 system map file] |
리눅스용 프로파일은 커널 데이터 구조와 디버그 심볼로 이루어진 압축 파일 형태로 만들면 됩니다. 이는 Volatility 가 커널 데이터 구조와 디버그 심볼을 통해 필요한 정보를 찾고 해석하기 때문입니다. 심볼은 System.map 파일 안에 있으며 /boot 디렉토리에 있습니다.
리눅스용 프로파일 생성은 make 시 생성된 module.dwarf 파일과 심볼 정보를 가지고 있는 System.map 파일을 zip 파일 형태로 압축하면 됩니다.
| # zip linux_profile_name.zip module.dwarf /boot/system_map _file.map |
만약 dwarf 파일이 생성된 폴더에서 zip 작업을 한다면 생성된 파일을
[volatility directory]/volatility/plugins/overlays/linux 디렉토리에 저장해줍니다.
◎ 프로파일 확인
| # python ./vol.py --info | grep Profile |
volatility 의 info 옵션으로 프로파일이 정상적으로 등록되었는지 확인합니다.
[참조 URL]
https://github.com/volatilityfoundation/volatility/wiki/Linux
Linux
An advanced memory forensics framework. Contribute to volatilityfoundation/volatility development by creating an account on GitHub.
github.com
[Python2 가상환경에서 실행]
◎ Python 2 관련 버전 확인
- Pyrthon 2 설치버전을 확인합니다.
| # python2 --version 또는 # python2 -V |
◎ Python 2 가상환경 설정
- Python 2 pip 설치
> Python 2는 EOL 되었기 때문에 별도 다운로드 경로에서 pip2를 설치해야 합니다:
| 개발환경 설치 # apt-get install python2-dev build-essential get-pip.py 스크립트 다운로드 # wget https://bootstrap.pypa.io/pip/2.7/get-pip.py Python 2용 pip 설치 # python2 get-pip.py 설치 확인 # which pip2 # pip2 --version |
- virtualenv 설치
| setuptools를 먼저 업그레이드하세요 # pip2 install --upgrade setuptools pip Python 2용 virtualenv 설치 # pip2 install virtualenv |
- Python2 가상환경 생성 및 사용
| 가상환경 생성 # virtualenv venv-python2 가상환경 활성화 # source venv-python2/bin/activate |
- 가상환경에서 필요한 패키지를 설치합니다.
| (venv-python2) # pip2 install pycryptodome openpyxl ujson pytz distorm3 |
◎ 볼라틸리티(Volatility) 2 다운로드
- Volatility 2는 설치하지 않고 직접 폴더에서 실행해도 됩니다.
| # unzip volatility-2.6.zip # cd volatility-master |
다운로드 경로 : https://github.com/volatilityfoundation/volatility/releases
- Volatility 2가 올바르게 실행되는지 확인하려면 다음 명령을 실행하세요.
| (venv-python2) # python2 vol.py -h Volatility Foundation Volatility Framework 2.6 Usage: Volatility - A memory forensics analysis platform. Options: -h, --help list all available options and their default values. Default values may be set in the configuration file (/etc/volatilityrc) --conf-file=/root/.volatilityrc User based configuration file -d, --debug Debug volatility --plugins=PLUGINS Additional plugin directories to use (colon separated) --info Print information about all registered objects --cache-directory=/root/.cache/volatility Directory where cache files are stored --cache Use caching --tz=TZ Sets the (Olson) timezone for displaying timestamps using pytz (if installed) or tzset -f FILENAME, --filename=FILENAME Filename to use when opening an image --profile=WinXPSP2x86 Name of the profile to load (use --info to see a list of supported profiles) -l LOCATION, --location=LOCATION A URN location from which to load an address space -w, --write Enable write support --dtb=DTB DTB Address --output=text Output in this format (support is module specific, see the Module Output Options below) --output-file=OUTPUT_FILE Write output in this file -v, --verbose Verbose information --shift=SHIFT Mac KASLR shift address -g KDBG, --kdbg=KDBG Specify a KDBG virtual address (Note: for 64-bit Windows 8 and above this is the address of KdCopyDataBlock) --force Force utilization of suspect profile -k KPCR, --kpcr=KPCR Specify a specific KPCR address --cookie=COOKIE Specify the address of nt!ObHeaderCookie (valid for Windows 10 only) Supported Plugin Commands: amcache Print AmCache information apihooks Detect API hooks in process and kernel memory atoms Print session and window station atom tables atomscan Pool scanner for atom tables auditpol Prints out the Audit Policies from HKLM\SECURITY\Policy\PolAdtEv bigpools Dump the big page pools using BigPagePoolScanner bioskbd Reads the keyboard buffer from Real Mode memory cachedump Dumps cached domain hashes from memory callbacks Print system-wide notification routines clipboard Extract the contents of the windows clipboard cmdline Display process command-line arguments cmdscan Extract command history by scanning for _COMMAND_HISTORY connections Print list of open connections [Windows XP and 2003 Only] connscan Pool scanner for tcp connections consoles Extract command history by scanning for _CONSOLE_INFORMATION crashinfo Dump crash-dump information deskscan Poolscaner for tagDESKTOP (desktops) devicetree Show device tree dlldump Dump DLLs from a process address space dlllist Print list of loaded dlls for each process driverirp Driver IRP hook detection drivermodule Associate driver objects to kernel modules driverscan Pool scanner for driver objects dumpcerts Dump RSA private and public SSL keys dumpfiles Extract memory mapped and cached files dumpregistry Dumps registry files out to disk editbox Displays information about Edit controls. (Listbox experimental.) envars Display process environment variables eventhooks Print details on windows event hooks evtlogs Extract Windows Event Logs (XP/2003 only) filescan Pool scanner for file objects gahti Dump the USER handle type information gditimers Print installed GDI timers and callbacks gdt Display Global Descriptor Table getservicesids Get the names of services in the Registry and return Calculated SID getsids Print the SIDs owning each process handles Print list of open handles for each process hashdump Dumps passwords hashes (LM/NTLM) from memory hibinfo Dump hibernation file information hivedump Prints out a hive hivelist Print list of registry hives. hivescan Pool scanner for registry hives hpakextract Extract physical memory from an HPAK file hpakinfo Info on an HPAK file idt Display Interrupt Descriptor Table iehistory Reconstruct Internet Explorer cache / history imagecopy Copies a physical address space out as a raw DD image imageinfo Identify information for the image impscan Scan for calls to imported functions joblinks Print process job link information kdbgscan Search for and dump potential KDBG values kpcrscan Search for and dump potential KPCR values ldrmodules Detect unlinked DLLs lsadump Dump (decrypted) LSA secrets from the registry machoinfo Dump Mach-O file format information malfind Find hidden and injected code mbrparser Scans for and parses potential Master Boot Records (MBRs) memdump Dump the addressable memory for a process memmap Print the memory map messagehooks List desktop and thread window message hooks mftparser Scans for and parses potential MFT entries moddump Dump a kernel driver to an executable file sample modscan Pool scanner for kernel modules modules Print list of loaded modules multiscan Scan for various objects at once mutantscan Pool scanner for mutex objects notepad List currently displayed notepad text objtypescan Scan for Windows object type objects patcher Patches memory based on page scans poolpeek Configurable pool scanner plugin printkey Print a registry key, and its subkeys and values privs Display process privileges procdump Dump a process to an executable file sample pslist Print all running processes by following the EPROCESS lists psscan Pool scanner for process objects pstree Print process list as a tree psxview Find hidden processes with various process listings qemuinfo Dump Qemu information raw2dmp Converts a physical memory sample to a windbg crash dump screenshot Save a pseudo-screenshot based on GDI windows servicediff List Windows services (ala Plugx) sessions List details on _MM_SESSION_SPACE (user logon sessions) shellbags Prints ShellBags info shimcache Parses the Application Compatibility Shim Cache registry key shutdowntime Print ShutdownTime of machine from registry sockets Print list of open sockets sockscan Pool scanner for tcp socket objects ssdt Display SSDT entries strings Match physical offsets to virtual addresses (may take a while, VERY verbose) svcscan Scan for Windows services symlinkscan Pool scanner for symlink objects thrdscan Pool scanner for thread objects threads Investigate _ETHREAD and _KTHREADs timeliner Creates a timeline from various artifacts in memory timers Print kernel timers and associated module DPCs truecryptmaster Recover TrueCrypt 7.1a Master Keys truecryptpassphrase TrueCrypt Cached Passphrase Finder truecryptsummary TrueCrypt Summary unloadedmodules Print list of unloaded modules userassist Print userassist registry keys and information userhandles Dump the USER handle tables vaddump Dumps out the vad sections to a file vadinfo Dump the VAD info vadtree Walk the VAD tree and display in tree format vadwalk Walk the VAD tree vboxinfo Dump virtualbox information verinfo Prints out the version information from PE images vmwareinfo Dump VMware VMSS/VMSN information volshell Shell in the memory image windows Print Desktop Windows (verbose details) wintree Print Z-Order Desktop Windows Tree wndscan Pool scanner for window stations yarascan Scan process or kernel memory with Yara signatures |
'DEFENSIVE > Volatility' 카테고리의 다른 글
| [Volatility] Volatility 볼라틸리티 2 plugins 및 profiles 확인 (0) | 2018.02.19 |
|---|---|
| [Volatility] Volatility 볼라틸리티 2 를 이용한 메모리 분석 방법론 (0) | 2017.11.30 |
| [Volatility] Volatility 볼라틸리티 2를 이용한 메모리 정보 추출 (0) | 2017.11.30 |
| [Volatility] Volatility 볼라틸리티 2 설치전 요구사항 (0) | 2017.04.19 |
| [Volatility] Volatility 볼라틸리티 2 소개 (0) | 2017.04.06 |
