Refer to the exhibit. Given the sudo privileges, which command will successfully spawn a root shell?
The -c command flag executes a command immediately upon vim startup. By invoking :!/bin/sh, the user forces vim to spawn a system shell. Because vim is running with sudo privileges, the spawned shell inherits root permissions, effectively escalating the user's access level to the highest possible on the system.
Why this answer
The exhibit shows that the user can run 'vim' as root without a password. Since vim has a built-in shell execution feature, an attacker can escape the editor to a root-privileged command prompt. This is a classic example of misconfigured sudo rights, where allowing full access to a versatile utility that supports command execution effectively grants the user complete control over the system.
Exam trap
Candidates often try to execute vim normally or forget the critical syntax required to pass commands via flags, failing to utilize the built-in escape sequences needed to spawn a root shell.