312-50V13 · Question #26
312-50V13 Question #26: Real Exam Question with Answer & Explanation
The correct answer is D: Display passwd content to prompt. The Shellshock bash vulnerability, demonstrated by the provided command, attempts to execute arbitrary commands by injecting them into environment variables, ultimately displaying the content of /etc/passwd.
Question
env x='(){ :;};echo exploit' bash c 'cat/etc/passwd' What is the Shellshock bash vulnerability attempting to do on a vulnerable Linux host?
Options
- ARemoves the passwd file
- BChanges all passwords in passwd
- CAdd new user to the passwd file
- DDisplay passwd content to prompt
Explanation
The Shellshock bash vulnerability, demonstrated by the provided command, attempts to execute arbitrary commands by injecting them into environment variables, ultimately displaying the content of /etc/passwd.
Common mistakes.
- A. The command
cat /etc/passwdis used to display the file's content, not remove it;rmwould be used for removal. - B. The command
cat /etc/passwdonly displays the file; it does not change any passwords. Password changes typically involve commands likepasswd. - C. The command
cat /etc/passwddoes not add new users; adding users typically involvesuseraddor direct modification of/etc/passwdand/etc/shadowin a structured way.
Concept tested. Shellshock vulnerability exploitation
Reference. https://www.redhat.com/en/topics/security/shellshock
Topics
Community Discussion
No community discussion yet for this question.