I think the problem was in the instruction "mov byte [esi+7],0, now I've changed this works fine:
.data
sh db "/bin/sh"
in:
SECTION .data
sh db "/bin/sh",0
And obviously I removed the "mov byte [esi+7],0" which seems to write some other memory location.
Thank you
Thank you for your reply AirCon,
That's all the code of my program, I'm new in the assembly language on linux and I'm trying to understand how syscall work, but I can't figure out what is wrong on my code.
However this is what I got from gdb by tracing step to step:
.....
.....
(gdb) step
12...
Hi all,
the problem is that my program produces a segmentation fault but I don't know why, but the strange thing is that when I use gdb and I set a breakpoint to a specific line of the code, the program terminates correctly!
Here's the code:
global main
main:
lea esi,[sh]
xor eax,eax...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.