Timeline for system("/bin/sh") exits without waiting for user input [OverTheWire narnia0 challenge] [closed]
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 2, 2023 at 13:22 | comment | added | Steffen Ullrich | @VishalSubramanyam: Your question is similar off-topic as the original question. Also, don't ask new questions as a comment. | |
Jan 2, 2023 at 13:19 | comment | added | Vishal Subramanyam |
@SteffenUllrich I have run some experiments and I'm still not able to understand why a variation of the OP's method doesn't work. Running python -c "print 'A'*20+'\xef\xbe\xad\xde'+'ls -al'" | /narnia/narnia0 doesn't print the directory listing as expected. We didn't close stdin for the shell without providing input that it ignored.
|
|
Apr 6, 2017 at 11:56 | history | closed |
Steffen Ullrich AviD♦ |
Not suitable for this site | |
Apr 6, 2017 at 11:55 | comment | added | Steffen Ullrich | stdin of your /bin/sh is stdin of your program which is the output of your python program. The shell will try to read input data from there and then exit when no more input data are there. And this behavior has nothing to do with information security and therefore off-topic. | |
Apr 6, 2017 at 11:09 | history | asked | Rakesh Mane | CC BY-SA 3.0 |