Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Symbolic Logic

Authors: William Gustason, Dolph E Ulrich

2nd Edition

1478616857, 9781478616856

More Books

Students also viewed these Mathematics questions

Question

2. To store it and

Answered: 1 week ago