Question
can I get some help to find the answers for these multiple choices questions please! q 14) You are writing buffer overflow attack code of
can I get some help to find the answers for these multiple choices questions please!
q 14)
You are writing buffer overflow attack code of the type discussed in class. The target of your attack is a procedure named victim, which receives a packet from the network and stores it in a buffer that is allocated on the stack.Your goal is to force victim to call this function:
int osCommand (int arg1, int arg2, int arg3) { ... }
You want victim to call osCommand with the following arguments:
osCommand(0xCAFEBEEF, 3, 1024);
You know that osCommand will be at address 0x401050 in memory, the value of espwill be 0x22FD60 while victim is running, and esp will point to the start of the buffer. You need to make sure that victim's return address on the stack is replaced with:
a) the value of ebp
b) the value of esp
c) 0x401050
d) 0xCAFEBEEF
-----------------------------------------------------------------------------------------------
q 15) In the situation described in the previous question, attack code must be placed on the stack. That attack code is:
a) push $0x400 push $0x3 push $0xCAFEBEEF mov $0x22FD60,%eax call *%eax
b) push $0xCAFEBEEF push $0x3 push $0x400 mov $0x22fd60,%eax call *%eax
c) push $0x400 push $0x3 push $0xCAFEBEEF mov $0x401050,%eax call *%eax
d) push $0xCAFEBEEF push $0x3 push $0x400 mov $0x401050,%eax call *%eax
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