A tester's SSH account uses a restricted bash that blocks slashes in commands and changes to PATH, but the server allows remote command execution at login. Which approach best escapes the restriction?
Show the answer
Correct answerA. Request an unrestricted shell as the SSH remote command so it runs instead of the login shell
AWhy this is right: The bare shell name has no slash, so it is allowed and starts a shell without the restrictions.
BWhy not this: This is a kiosk-style escape; an SSH text session has no graphical application or dialog.
CWhy not this: History contents do not control the restrictions; this confuses log tampering with escaping.
DWhy not this: The stem says PATH changes are blocked, so this is exactly what the restricted shell prevents.
The restriction applies to the interactive restricted shell. Asking SSH to run a plain shell name as the remote command starts an unrestricted shell, which is a shell escape. Changing PATH is exactly what the restriction blocks.