This is an old revision of the document!
The purpose of this task is to explore GDB, and automate a debugging session. You are encouraged to use the GDB User Manual, and what you learned during the previous lab sessions. We recommend that you start solving each subtask in a live debugging session, and then assemble the final script that will be submitted to vmchecker.
The given binary computes the SHA-1 hash of some input, but if you send him a signal at the right time, it will also compute a special hash. Write a GDB script/commands file that goes through the following steps (you can add more interesting step if you fell like it):
read()
syscall will be issued, catch itcompute_hash()
is called (you should now be in main()
's stack frame)printf
calls while in this modemalloc
callsmalloc
finishescompute_hash()
after malloc
callmain()
after compute_hash()