Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions