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

the shellcode is from http://shell-storm.org/shellcode/files/shellcode-806.php when i run the script in gdb I got this message 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.

[email protected]:~$ localectl
...
[email protected]:~$ 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:

[email protected]:~$ locale --all-locales
C
C.UTF-8
(SNIP)
[email protected]:~$ export LC_CTYPE=C.UTF-8
[email protected]:~$ 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.