SY0-301 · Question #425
The security administrator is analyzing a user's history file on a Unix server to determine if the user was attempting to break out of a rootjail. Which of the following lines in the user's history…
The correct answer is A. cd ../../../../bin/bash. Repeated use of 'cd ../../../../' traverses up multiple directory levels, which is the standard method to escape a chroot rootjail by reaching the real filesystem root.
Question
The security administrator is analyzing a user's history file on a Unix server to determine if the user was attempting to break out of a rootjail. Which of the following lines in the user's history log shows evidence that the user attempted to escape the rootjail?
Options
- Acd ../../../../bin/bash
- Bwhoami
- Cls /root
- Dsudo -u root
How the community answered
(34 responses)- A74% (25)
- B15% (5)
- C9% (3)
- D3% (1)
Why each option
Repeated use of 'cd ../../../../' traverses up multiple directory levels, which is the standard method to escape a chroot rootjail by reaching the real filesystem root.
A chroot rootjail restricts a process to a subdirectory, treating it as the filesystem root. The command 'cd ../../../../bin/bash' attempts directory traversal by moving up multiple parent directories to reach the actual system root and then access a real shell binary, which is the canonical technique for escaping a poorly configured chroot environment.
'whoami' simply queries the current user identity and provides no information about an attempt to change filesystem scope or escalate privileges.
'ls /root' attempts to list the root user's home directory, which may indicate reconnaissance but does not indicate an attempt to break out of a jailed environment.
'sudo -u root' attempts privilege escalation to the root user account but does not attempt to escape the restricted filesystem boundary imposed by a chroot jail.
Concept tested: Chroot rootjail escape via directory traversal
Source: https://linux.die.net/man/2/chroot
Topics
Community Discussion
No community discussion yet for this question.