App - System

Monday 29 October 2018, 19:17  #1
App - System Stack buffer overflow basic 1
artemis-hlr
  • 2 posts

Hi,

I managed to change the check, and the shell is supposed to open, but I got that instead...

[check] 0xdeadbeef
Yeah dude! You win!
Opening your shell...
Shell closed! Bye.

Is this supposed to happen? How should I get the .passwd if I can’t write anything to the shell?

Artemis

Wednesday 7 November 2018, 17:19  #2
App - System Stack buffer overflow basic 1
Lenstras95
  • 2 posts

Hi Artemis!

The shell closes because it receives no input.

To keep the shell open, you could write the exploit like this: (python -c "print(overflow and check)"; cat) | ./challenge

Thursday 8 November 2018, 17:05  #3
App - System Stack buffer overflow basic 1
artemis-hlr
  • 2 posts

Thanks! That’s exactly what I was missing to get it, I hadn’t thought about concatenating commands and wrapping with parenthesis ^^

Artemis

Sunday 12 May 2019, 17:08  #4
App - System Stack buffer overflow basic 1
En9in33r
  • 4 posts

Ok, but where I should find the password?

Thursday 16 May 2019, 20:06  #5
App - System Stack buffer overflow basic 1
Zlatan
  • 2 posts

When you have the shell, you should be able to read a file you weren’t able before.

Monday 17 June 2019, 20:58  #6
App - System Stack buffer overflow basic 1
bobby
  • 1 posts

Thank you. I didn’t even think of that. I was sitting in gdb trying to figure out how I could change the argument of system() .