nerdexam
EC-Council

312-50V11 · Question #240

What is the Shellshock bash vulnerability attempting to do a vulnerable Linux host? env x='(){ :;};echo exploit' bash -c 'cat/etc/passwd'

The correct answer is D. Display passwd content to prompt. To extract private information, attackers are using a couple of techniques. The simplest extraction attacks are in the form: () {:;}; /bin/cat /etc/passwd That reads the password file /etc/passwd, and adds it to the response from the web server. So an attacker injecting this code

Vulnerability Analysis

Question

What is the Shellshock bash vulnerability attempting to do a vulnerable Linux host? env x=’(){ :;};echo exploit’ bash -c ‘cat/etc/passwd’

Options

  • ARemoves the passwd file
  • BChanges all passwords in passwd
  • CAdd new user to the passwd file
  • DDisplay passwd content to prompt

How the community answered

(56 responses)
  • A
    9% (5)
  • B
    4% (2)
  • C
    16% (9)
  • D
    71% (40)

Explanation

To extract private information, attackers are using a couple of techniques. The simplest extraction attacks are in the form: () {:;}; /bin/cat /etc/passwd That reads the password file /etc/passwd, and adds it to the response from the web server. So an attacker injecting this code through the Shellshock vulnerability would see the password file dumped out onto their screen as part of the web page returned.

Topics

#Shellshock#bash vulnerability#command injection#Linux exploitation

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice