PT0-001 · Question #159
After successfully enumerating users on an Active Directory domain controller using enum4linux a penetration tester wants to conduct a password-guessing attack Given the below output: Which of the…
The correct answer is B. grep user enuza41inux_output.txt I awk '{print $1}' | cut -d[ -? I cut -d] -f1>; username.txt. The correct pipeline uses grep to isolate user lines from enum4linux output and then chains cut commands with bracket delimiters to extract clean usernames.
Question
After successfully enumerating users on an Active Directory domain controller using enum4linux a penetration tester wants to conduct a password-guessing attack Given the below output:
Which of the following can be used to extract usernames from the above output prior to conducting the attack?
Exhibit
Options
- Acat enum41inux_output.txt > grep -v user I sed
s/\[//' I seds/]//' 2> usernames.txt - Bgrep user enuza41inux_output.txt I awk '{print $1}' | cut -d[ -? I cut -d] -f1>; username.txt
- Cgrep -i rid v< enura.41inux_output. txt' | cut -d: -? i cut -d] -f1>; usernames. txt
- Dcut -d: -f2 enum41inux_output.txt | awk '{print S2}' I cut -d: -f1 > usernaraes.txt
How the community answered
(19 responses)- A16% (3)
- B74% (14)
- C5% (1)
- D5% (1)
Why each option
The correct pipeline uses grep to isolate user lines from enum4linux output and then chains cut commands with bracket delimiters to extract clean usernames.
The syntax uses '>' instead of '|' between cat and grep, which redirects stdout to a file rather than piping it, making the entire command logically broken.
This command greps for lines containing 'user' to filter the relevant enum4linux output, uses awk to isolate the correct field, then applies sequential cut commands using '[' and ']' as delimiters to extract only the username string that appears between the brackets, which matches the standard enum4linux user enumeration output format and produces a clean list for a password-guessing attack.
Filtering on 'rid' targets RID-related lines rather than user account lines, producing a different subset of output that does not cleanly yield usernames for a credential attack.
The awk variable is written as '$S2' which is a typo for '$2', and the overall field delimiter logic does not correctly target the bracket-enclosed username format present in enum4linux output.
Concept tested: Parsing enum4linux output with Linux text tools
Topics
Community Discussion
No community discussion yet for this question.
