Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ComputerSecurityQuestion Consider the following C code: 1 void greet{char *arg) { 2 char buffer (16): 3 printf(I am the Senate. What is your name? *):

ComputerSecurityQuestionimage text in transcribed

Consider the following C code: 1 void greet{char *arg) { 2 char buffer (16): 3 printf("I am the Senate. What is your name? *): 4 scanf("%s", buffer): 5 printf("It's treason then, %s " buffer): 6 } 7 8 int main(int argc char *argv[]) { 9 char beg [6] = 'Kenobi': 10 char end [9] = 'maybe not?': 11 strncat(beg, end, 5): 12 greet(argv[1]): 13 return 0: 14 } What is the line number that has a memory vulnerability and what is this vulnerability called? Just before the program executes line 4, the registers are: %esp: 0xBFFFFB20 %ebp: 0xBFFFFB48 Given this information, describe in detail how an attacker would take advantage of the vulnerability. Also make sure to include the address that the attacker needs to over-write. (Maximum 5 sentences) What would you change to fix the problem in part 1? Given the code as is, would stack canaries prevent exploitation of this vulnerability? Why or why not

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions