Question
Re-write helloWorld.asm below as well as compile it. Then debug the program to answer the following questions: 1. Find memory addresses contain the programs environment
Re-write "helloWorld.asm" below as well as compile it. Then debug the program to answer the following questions:
1. Find memory addresses contain the programs environment strings. Additionally, what memory address contains the programs arguments?
2. Debug the program and stop it immediately before the syscall for write, then find the followings: - Find the current ESP. - Find the current EBP. - Find the current EIP.
3. Where is the message located?
4. State the return value for the write syscall, and where it is located.
-----------------------------------------------------------------
helloWorld.asm
*******************
extern printf;
section .data;
msg db "Hello world", 0xa, 0;
section .text
global main;
main:
push msg;
call printf;
add esp, byte 4;
return:
move eax, 0
ret;
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