PEV 支持 Linux、Windows、MAC OS X 三种操作平台对PE文件进行分析。
下载地址:
//本人推荐 :github 的代码,因为 这个 readme 更完整。
https://github.com/merces/pev.git
https://sourceforge.net/projects/pev/files/
官方在线指导:
https://libpe.readthedocs.io/en/latest/#
http://pev.sourceforge.net/doc/manual/en_us/
//以下完全复制自
http://ahageek.com/blog/linux-pe-analyzer/
//侵权请联系我删除。
包含的工具如下:
readpe :读取PE信息,比如导入导出表.
pehash :查看程序的整体,全部或某个节区的md5,sha1,ssdeep,支持的HASH算法包括:
md4, md5, ripemd160, sha, sha1, sha224, sha256 sha384, sha512, whirlpool,ssdeep
peres :对程序的资源进行处理,查看提取等,很有用.
--------------------------------------------------------------------------------------------------------
pedis :反汇编程序,可以指定从某个地址开始.
pesec :检测ASLR,DEP/NX,SEH,Stack cookies (EXPERIMENTAL).
pestr :查看程序中的字符串,类似于windows下的Strins程序.
--------------------------------------------------------------------------------------------------------
pescan :扫描程序的一些关键信息是否正常,通常可以用于预先判断程序是否有恶意意图.
ofs2rva :将指定文件偏移值(offset)转换为相对虚拟地址(RVA).其中ofs=offset,rva=relative virtual address.
rva2ofs :与rva2ofs功能相反.
pepack :查看程序的打包工具.
--------------------------------------------------------------------------------------------------------
cpload :处理cpl文件,即控制面板程序,官方文档中介绍含有此组件.但很不幸的是,此文件似乎并不存在.
1.安装
>>>下载地址:
http://sourceforge.net/projects/pev/files/pev-0.70/
>>>Linux下Debian系列,比如Ubuntu,的安装方法是下载.deb安装包,然后使用dpkg -i xx.deb即可完成安装.
>>>Windows下下载zip压缩包,然后解压缩就可以了.
2.组件介绍
由于工具使用非常简单,这里只简要的给出前三个工具的用法以及用法示例截图,具体的用法都可以通过xxx --help来获取帮助.
1.readpe
Usage: readpe OPTIONS FILE
Show PE file headers
Example: readpe --header optional winzip.exe
Options:
-A, --all full output (default)
-H, --all-headers print all PE headers
-S, --all-sections print all PE sections headers
-f, --format <text|csv|xml|html> change output format (default: text)
-d, --dirs show data directories
-h, --header <dos|coff|optional> show specific header
-i, --imports show imported functions
-e, --exports show exported functions
-v, --version show version and exit
--help show this help and exit
读取DOS头信息+显示数据目录
2.pehash
Usage: pehash OPTIONS FILE
Calculate hashes of PE pieces
Example: pehash -s '.text' winzip.exe
Options:
-f, --format <text|csv|xml|html> change output format (default: text)
-a, --algorithm <algorithm> generate hash using one of the following algorithms:
md4, md5, ripemd160, sha, sha1, sha224, sha256
sha384, sha512, whirlpool or ssdeep
-h, --header <dos|coff|optional> hash only the header with the specified name
-s, --section <section_name> hash only the section with the specified name
--section-index <section_index> hash only the section at the specified index (1..n)
-v, --version show version and exit
--help show this help and exit
计算整体以及各个节区的md5,sha1和ssdeep
以html的形式输出结果.text节区的信息+采用whirlpool算法计算索引为3的节区的HASH+计算DOS头信息
3.peres
Usage: peres OPTIONS FILE
Show information about resource section and extract it
Example: peres -a putty.exe
Options:
-a, --all Show all information, statistics and extract resources
-x, --extract Extract resources
-i, --info Show informations
-s, --statistics Show statistics
-v, --version Show version and exit
--help Show this help and exit
显示统计信息+提取资源
//以下是我自己的
3.遇到的问题
我安装后终端报错如下:(Ubuntu 16.0.4 64bit)
peres: error while loading shared libraries: libpe.so.1: cannot open shared object file: No such file or directory.
解决办法:
root@roy-virtual-machine:# ln -sf /opt/pev/lib/libpe/libpe.so.1root@roy-virtual-machine:# ldconfig
注:我把PEV安装在 /opt 目录下了。