转:http://ele7enxxh.com/Use-AFL-dyninst-To-Fuzz-Blackbox-Binaries.html

使用afl-dyninst fuzz无源码的二进制程序

通常来讲,afl-fuzz需要对待fuzz程序重编译,重而对其进行插桩,这就要求拥有待fuzz程序的完整源代码。而afl-dyninst提供了一种静态无源码插桩的手段使得可以对无源码二进制程序插桩。

本文的测试系统为:ubuntu14.04。

下载&&编译

首先需要安装以下软件:

sudo apt-get install libelf-dev libelf1 libiberty-dev libboost-all-dev

afl-dyninst是基于dyninst的,所以需要下载&&编译&&安装dyninst:

git clone https://github.com/dyninst/dyninst.git
cd dyninst
mkdir build
cd build
cmake -DBOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu
make
sudo make install

下载&&编译afl-dyninst

git clone https://github.com/talos-vulndev/afl-dyninst.git
cd afl-dyninst
make
sudo cp afl-dyninst /usr/bin/
sudo cp libAflDyninst.so /usr/local/lib/
echo "/usr/local/lib" > /etc/ld.so.conf.d/dyninst.conf && ldconfig
echo "export DYNINSTAPI_RT_LIB=/usr/local/lib/libdyninstAPI_RT.so" >> ~/.bashrc

使用

Usage: ./afl-dyninst -i <binary> -o <binary> -l <library> -e <address> -s <number>
-i: Input binary
-o: Output binary
-l: Library to instrument (repeat for more than one)
-e: Entry point address to patch (required for stripped binaries)
-r: Runtime library to instrument (path to, repeat for more than one)
-s: Number of basic blocks to skip
-v: Verbose output
example:
afl-dyninst -i testbin -o testbin_ins
to fuzz:
export AFL_SKIP_BIN_CHECK=1
afl-fuzz -i in -o out testbin_ins

dyninst目前支持POWER/Linux, x86/Linux, x86_64/Linux,x86/Windows XP/2000/2003/Windows 7多个平台以及aarch64,不过可惜的是不支持arm/thumb。afl-dyninst于15年3月公布,不过到目前为止还未添加到afl-fuzz的发行版本中,推测其应该存在较多的bug。不过dyninst项目目前仍然活跃,相信以后会更加成熟。持续关注中!

最新文章

  1. 手机页面touch触摸事件
  2. Hbase随笔2
  3. SQL 变量
  4. U3D UGUI学习3 - RectTransform
  5. (1)html开头解说与案例演示
  6. UML中的六大关系
  7. java IO文件读写例子(OutputStream,InputStream,Writer,Reader)
  8. Highcharts 时间序列,可缩放的图表
  9. wordpress教程之文章页single.php获取当前文章所属分类
  10. ios获取本机网络IP地址方法
  11. Effective Java 第三版——16.在公共类中使用访问方法而不是公共属性
  12. layui中进行form表单一些问题
  13. 【bzoj4009 hnoi2015】接水果
  14. Windows Server 2008 R2提示api-ms-win-crt-runtime-l1-1-0.dll 丢失解决方法
  15. Win7 VS2017编译Godot3.0.2和2.1.4
  16. C# -- 使用递归列出文件夹目录及目录下的文件
  17. git忽略.idan目录
  18. HttpRunner Manager接口自动化测试平台实践(Windows)
  19. vue 自学笔记(七) 组件细节问题
  20. (Gorails) activeStore模块,把一堆属性放在一个hash对象内。gem &#39;activerecord-typedstore&#39;增强了store模块,更好用了

热门文章

  1. 使用cron命令配置定时任务(cron jobs)
  2. python---Scrapy模块的使用(二)
  3. NOIP2013 提高组 Day1
  4. HDU 4990 Reading comprehension 简单矩阵快速幂
  5. easyui 控件获取焦点方式
  6. Hadoop面试链接
  7. 【Codeforces811E】Vladik and Entertaining Flags [线段树][并查集]
  8. 【51nod】1238 最小公倍数之和 V3 杜教筛
  9. Spring Boot中使用Spring-data-jpa让数据访问更简单、更优雅
  10. 常见的bug