반응형
문자열을 입력받고 해당 문자열을 complex_function으로 보낸다.
complex_function에서는 어떠한 연산을 진행하고 return 한다.
import angr
def main():
# create project
proj = angr.Project('./00_angr_find')
# entry point
init_state = proj.factory.entry_state()
# create simulation
simulation = proj.factory.simgr(init_state)
# expected address
print_good = 0x804867d
# start explore
simulation.explore(find=print_good)
if simulation.found:
solution = simulation.found[0]
print('flag: ', solution.posix.dumps(0))
else:
print('no solution')
if __name__ == '__main__':
main()
angr 사용법을 아예 모르겠어서 바로 Write-Up을 확인했다.
print_good에 들어가는 주소는 아래와 같이 Good Job이 출력되는 부분이다.
반응형
'CTF. > Angr Tutorial For CTF' 카테고리의 다른 글
05_angr_symbolic_memory #Angr Tutorial For CTF (0) | 2022.08.24 |
---|---|
04_angr_symbolic_stack #Angr Tutorial For CTF (0) | 2022.08.23 |
03_angr_symbolic_registers #Angr Tutorial For CTF (0) | 2022.08.22 |
02_angr_find_condition #Angr Tutorial For CTF (0) | 2022.08.21 |
01_angr_avoid #Angr Tutorial For CTF (0) | 2022.08.20 |
댓글