Bufferoverflow issue

Hi guys, I’m trying to solve stack-five in https://exploit.education but I’m facing an issue I think I’ve written my exploit script properly Screenshot%20from%202019-05-21%2007-19-57 the shellcode is from http://shell-storm.org/shellcode/files/shellcode-806.php when i run the script in gdb I got this message Screenshot%20from%202019-05-21%2007-22-49 I actually I don’t know what kind of error is this I think I’ve done everything properly I’ve been struggling for 5 hours and I did not figure out what’s the problem.

Thanks in advanced

It’s probably because of incorrect handling of strings, give encoding it in UTF-8 a try?
image

1 Like

Thank you for your response, I think this is not the problem because I solved the previous exercises facing this issue, this link for my previous solution https://github.com/3esawe/Phoenix

Greetings

image
The actual exception is raised when the stack5 process exits normally and you get a /bin/dash running, so gdb is the one responsible for it, and the reason is UTF-8 locale not being set.

root@Nwwz:~$ localectl
...
root@Nwwz:~$ locale --all-locales
...

Try to change some environment variables(LC_ALL, LC_CTYPE…) in order to fix that.

1 Like

I tried to unset env LINE, unset env COLUMNS but it doesn’t work

That’s not really what I said should be done:

root@Nwwz:~$ locale --all-locales
C
C.UTF-8
(SNIP)
root@Nwwz:~$ export LC_CTYPE=C.UTF-8
root@Nwwz:~$ echo $LC_CTYPE
C.UTF-8

And try to run GDB again?

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.