The next level of OverTheWire's Nata challenge is Level 9. This is a command injection vulnerability.
Initially, you are given a search box.
Just like in previous levels, I looked at the available source code. You can see the vulnerability is that the user input is not sanitized. Due to this, you can inject code into the "grep" command it is running to do the search.
I simply put in the search box, "; cat /etc/natas_webpass/natas10", since that is where the password file is located. The command it ends up running is "grep -i ; cat /etc/natas_webpass/natas10 dictionary.txt". The semi-colon terminates the "grep" command, and allows the "cat" to then run next. I end up passing in the password file, as well as the dictionary. In some cases, you may need to end the line with a comment, to keep it from executing, by putting in a "#". Regardless, after running, you get the password to the next level.
Thursday, November 8, 2012
OverTheWire Natas Level 9
Labels:
commandinjection
hacking
natas
overthewire
wargames
linux linux linux
OverTheWire Monxla Part 3Nov 26, 2012
OverTheWire Monxla Part 2Nov 25, 2012
OverTheWire Monxla Part 1Nov 24, 2012
Author: Unknown
Waythemes is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design
Labels:
commandinjection,
hacking,
natas,
overthewire,
wargames
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment