App - System

Sunday 7 February 2021, 15:19  #1
App - System - ELF x86 - Format String Bug Basic 3 - Getting shell but not working
marwan-n
  • 2 posts

I’ve put a shellcode [Th1b4ud : no spoil] and it seems that the shell is getting executed but it’s exiting.
I’ve added a screenshot of my gef output where the process executed /bin/dash and exits. However running this normally with the cat trick is just giving me a Segmentation fault and not opening the shell.


no-spoil-msg-11.png
no-spoil-msg-11.png
 (PNG, 8.2 kb)
Sunday 7 February 2021, 15:35  #2
App - System - ELF x86 - Format String Bug Basic 3 - Getting shell but not working
Shiro
  • 25 posts

Hello,

Most likely an issue with a difference of offsets between GDB and the local exploit.
I advise you to keep debugging with an attached process with GDB instead of running the program through GDB, you’ll get the correct environment this way.

Sunday 7 February 2021, 18:36  #3
App - System - ELF x86 - Format String Bug Basic 3 - Getting shell but not working
marwan-n
  • 2 posts

Thank you for your reply, How can I attach the process to gdb if it’s running? Do I use the & and then use gdb?