Answered step by step
Verified Expert Solution
Question
1 Approved Answer
6 . 4 . When printf ( fmt ) is executed, the stack ( from low address to high address ) contains the following values
When printffmt is executed, the stack from low address to high address contains
the following values bytes each where the first number is the content of the variable
fmt which is a pointer pointing to a format string. If you can decide the content of the
format string, what is the smallest number of format specifiers that you can use crash the
program with a percent probability?
xAABBCCDD, xAABBDDFF, xxx
A server program takes an input from a remote user, saves the input in a buffer allocated
on the stack Region in Figure The address of this buffer is then stored in the local
variable fmt which is used in the following statement in the server program:
printffmt;
When the above statement is executed, the current stack layout is depicted in Figure
If you are a malicious attacker, can you construct the input, so when the input is fed into
the server program, you can get the server program to execute your code? Please write
down the actual content of the input you do not need to provide the exact content of
the code; just put malicious code in your answer, but you need to put it in the correct
location
If your answer to Problem causes the server to print out more than a billion characters,
it may take a while for your attack to succeed. Please revise your answer, so the total
number of characters printed out is less than
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started