angr Template
What is it
This template finds the flag character by character automatically. It works if the flag is passed to a series of functions for validation check. For example, the program contains hundreds of functions that check whether the password that the user gives is valid or not.
This template can be used to solve:
Google CTF 2020 "beginner"
BambooFox CTF 2021 "Flag Checker Revenge"
DiceCTF 2021 "babymix"
... and many others
How to Use
Examine the binary manual and guess the flag length. Usually the clue would be the
strlen
function call or the upper bound of somefor
loop.Upon success or failure, the binary may execute the
call puts
instruction and prints a string. Find the address ofcall puts
for the successful cases and the address ofcall puts
for failed cases. They should be filled in as thefind_addr
andavoid_addr
respectively.Run the script and wait patiently. It usually takes 5+ mins to complete.
Template
Change the lines containing <
and >
:
Reference
Last updated