angr进阶(7)多分支的avoid获取

在大佬的文章中找到了应对多个avoid分支的时候如何批量获取的脚本,特此记录一下

 1 e = open('./yolomolo', 'rb').read()
 2 
 3 avoids = []
 4 
 5 index = 0
 6 while True:
 7     index = e.find(b'\xB9\x00\x00\x00\x00',index+1)
 8     if index == -1:
 9         break
10     addr = 0x400000 + index
11     avoids.append()
12 
13 print (len(avoids))
14 print (avoids)

其中\xB9\x00\x00\x00\x00mov ecx 0的机器码,根据不同题目的特征进行修改

当然这个部分也是在最后的程序中先运行的,然后就可以获得avoid

参考博客:https://xz.aliyun.com/t/4353

posted @ 2019-03-22 09:56  61355ing  阅读(139)  评论(0编辑  收藏  举报