3 ms·
I don't see how you could be right. It won't evaluate the result: ajf@Ubuntu-1204-precise-64-minimal:~$ echo `echo "3 > file"` 3 > file
by TazeTSchnitzel 14y ago
I don't see how you could be right. It won't evaluate the result:
ajf@Ubuntu-1204-precise-64-minimal:~$ echo `echo "3 > file"`
3 > file
- tptacek 14y agoCONCEDING THIS IN ADVANCE OF VERIFYING.
- deleted 14y ago[deleted]
- elithrar 14y agoping `\`echo /etc/passwd\`` zsh: permission denied: /etc/passwd I may be wrong here, but would just returning \`rootyourmachine.sh\`` in the request body therefore work? Edit: Serving that from a web server via ping `curl localhost:9999` only causes ping to respond with a usage warning, as if you had entered an incorrect command. Is there a way to "break out of" ping from here, though?
- tptacek 14y agoNo; you can pass arguments to ping, of course, but that's not helpful. Sorry, gut reaction to command interpolation with curl.
- eropple 14y agoLooks like you're right - I thought you could do it by injecting a quote or something, but apparently not.
- elithrar 14y ago> Looks like you're right - I thought you could do it by injecting a quote or something, but apparently not. Still, I think it's a good way to think. Expect that there's a way for that input to do something malicious, even if it doesn't seem immediately possible. I have a dynamic DNS daemon that fetches my IP via HTTP GET, and the first thing I do is validate that it's actually an IP before I do anything else with it.