What's your favorite color? Would you like to share with me? Run the command: ssh [email protected] -p 1001
(pw: guest) to tell me!
I tested it on my local machine. But buf is ABOVE good. So with a buffer overflow I cannot get to an address below the starting point. What am I missing?
Hmm ... I always get that: Enter your favorite color: Me too! That's my favorite color too! You get a shell! Flag is in flag.txt Segmentation fault (core dumped) It seems the process does not have enough privilege to call system() and a shell is not spawned. That is why it goes to the normal path and crashes with segfault when the stack is restored. You might want to revisit the permissions on the guest user.
I know the problem is, you have got the shell but your input has reached EOF so shell will exit immediately. Example if you type something like "./color < payload", input will stopped since it has reached EOF. In order to fix this try "(cat payload -) | ./color", this command will not make the shell exit immediately because input from payload continue to stdin. Hope it help you all. I waste 2 hours man to figure out what's the problem
thanks
That is the point. You can't so you have to bypass the check
Hmm ... I always get that: Enter your favorite color: Me too! That's my favorite color too! You get a shell! Flag is in flag.txt Segmentation fault (core dumped) It seems the process does not have enough privilege to call system() and a shell is not spawned. That is why it goes to the normal path and crashes with segfault when the stack is restored. You might want to revisit the permissions on the guest user.
I know the problem is, you have got the shell but your input has reached EOF so shell will exit immediately. Example if you type something like "./color < payload", input will stopped since it has reached EOF. In order to fix this try "(cat payload -) | ./color", this command will not make the shell exit immediately because input from payload continue to stdin. Hope it help you all. I waste 2 hours man to figure out what's the problem
3 months ago
difficult