Question: Level 1 (Phase 1, 25 points ) For Phase 1, you will not inject new code. Instead, your exploit string will redirect the program to

 Level 1 (Phase 1, 25 points ) For Phase 1, you

will not inject new code. Instead, your exploit string will redirect the

Level 1 (Phase 1, 25 points ) For Phase 1, you will not inject new code. Instead, your exploit string will redirect the program to execute an existing procedure. Function getbuf is called within CTARGET by a function test having the following C code : 1 void test () 2 3 int val; val = getbuf ( ) ; printf ("No exploit. Getbuf returned 0x x\ ", val) ; 6 When getbuf executes its return statement (line 5 of getbuf ), the program ordinarily resumes execution within function test (at line 5 of this function). We want to change this behavior. Within the file ctarget, there is code for a function touch1 having the following C representation : 1 void touchl() 2 3 vlevel = 1; /* Part of validation protocol * / 4 printf ( "Touchl! : You called touchl() \ ") ; validate (1 ) ; exit (0) ; Your task is to get CTARGET to execute the code for touchl when getbuf executes its return statement rather than returning to test. Note that your exploit string may also corrupt parts of the stack not directly related to this stage , but this will not cause a problem , since touch 1 causes the program to exit directly Some Advice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!