Angr - Examples
输入以到达地址(指示地址)
import angr
import sys
def main(argv):
path_to_binary = argv[1] # :string
project = angr.Project(path_to_binary)
# Start in main()
initial_state = project.factory.entry_state()
# Start simulation
simulation = project.factory.simgr(initial_state)
# Find the way yo reach the good address
good_address = 0x804867d
# Avoiding this address
avoid_address = 0x080485A8
simulation.explore(find=good_address, avoid=avoid_address)
# If found a way to reach the address
if simulation.found:
solution_state = simulation.found[0]
# Print the string that Angr wrote to stdin to follow solution_state
print(solution_state.posix.dumps(sys.stdin.fileno()))
else:
raise Exception('Could not find the solution')
if __name__ == '__main__':
main(sys.argv)到达地址的输入(指示打印)
注册表数值
栈值

静态内存值(全局变量)
动态内存值(Malloc)
文件模拟
应用约束
模拟管理器
钩住/绕过对函数的一次调用
Hooking a function / Simprocedure
钩住一个函数 / Simprocedure
模拟带有多个参数的scanf
静态二进制文件
最后更新于