Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Draw the stack and detail what is located on the stack and where at the following points : before your code starts executing the function

Draw the stack and detail what is located on the stack and where at the following points :

before your code starts executing the function Gets (so the instance after the call is executed, but before any code from gets executed) you should show where any information from the functions test and getbuf is located on the stack

just before the ret in your exploit string gets executed

just before hexmatch has executed its ret

Be sure to include what address rsp and rbp are referencing in your diagram

image text in transcribed

1 Compare string to hex represention of unsigned value / 2 int hexmatch (unsigned val, char sval) char cbuf [110]; /Make position of check string unpredictable/ char *s cbuf + random ( ) % 100; sprintf (s, "%.8x", val); return strncmp (sval, s, 9)0; 7 10 11 void touch3 (char sval) 12 f 13 14 15 16 17 18 19 20 21 /Part of validation protocol vlevel - 3; if (hexmatch (cookie, sval)) called touch3(\"%s\") ", sval); printf("Touch31: validate (3) You else t called touch3(\"%s\") ", sval); printf ("Misfire: fail (3) You exit (0) 1 Compare string to hex represention of unsigned value / 2 int hexmatch (unsigned val, char sval) char cbuf [110]; /Make position of check string unpredictable/ char *s cbuf + random ( ) % 100; sprintf (s, "%.8x", val); return strncmp (sval, s, 9)0; 7 10 11 void touch3 (char sval) 12 f 13 14 15 16 17 18 19 20 21 /Part of validation protocol vlevel - 3; if (hexmatch (cookie, sval)) called touch3(\"%s\") ", sval); printf("Touch31: validate (3) You else t called touch3(\"%s\") ", sval); printf ("Misfire: fail (3) You exit (0)

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions