BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA PT0-003 Exam - Topic 2 Question 24 Discussion

Posted by Rosamond on Jun 14, 2025 at 02:44 AM

[Information Gathering and Vulnerability Scanning]

A penetration tester is enumerating a Linux system. The goal is to modify the following script to provide more comprehensive system information:

#!/bin/bash

ps aux >> linux_enum.txt

Which of the following lines would provide the most comprehensive enumeration of the system?

Suggested Answer: A

This command gathers:

/etc/passwd -- lists all local user accounts.

netstat -tuln -- lists listening ports and associated services.

/etc/bash.bashrc -- contains environment variables and configurations that could reveal system behaviors or hidden persistence mechanisms.

This provides a much broader and deeper enumeration compared to other options.


Get Premium PT0-003 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
32 comments · newest first
SH
Sharmaine 11 months ago
A covers a lot of ground, can't argue with that!
BE
Bettye 11 months ago
I think B is better for system details, though.
AM
Amina 11 months ago
Option A gives a good mix of user and network info.
DO
Dominga 12 months ago
Wait, why would you use curl for local info? Seems off.
AL
Aliza 12 months ago
D seems solid too, especially with lsof included.
NO
Noah 1 year ago
I thought option C was interesting since it includes the hostname and user info, but I don't think it covers as much as the others.
EL
Elenore 1 year ago
I'm leaning towards option D because lsof gives detailed info about open files and network connections, but I can't recall if that's the most comprehensive.
TO
Tora 1 year ago
I remember practicing with similar questions, and I feel like option A could also be good because it gathers user info and network connections.
ME
Mel 1 year ago
I think option B might be the best choice since it includes system info like uname and network info with ifconfig, but I'm not entirely sure.
DO
Dorthy 1 year ago
This is a good test of our enumeration skills. I'm leaning towards A since it hits a lot of the key areas, but I'll need to carefully review each option to make sure I don't miss anything important.
MA
Ma 1 year ago
I think A is the way to go here. Grabbing the password file, network connections, and bash configuration should give the penetration tester a pretty thorough understanding of the target system. The other options seem a bit more limited in scope.
LU
Luisa 1 year ago
Option D looks interesting - it includes some commands I recognize like `uname` and `ls` that could provide useful system details. I'll have to think through which option gives the most comprehensive overview.
BL
Blair 1 year ago
Hmm, I'm a bit unsure about this one. I'm not familiar with all of those commands, so I'll need to double-check what each one does. Maybe I should try to research them quickly before answering.
IS
Isaac 1 year ago
This looks like a pretty straightforward enumeration question. I'd go with option A - it seems to cover a good range of system information like user accounts, network connections, and system configuration.
WA
Wava 1 year ago
Option A all the way! Who doesn't love a good old-fashioned /etc/passwd dump? It's like getting the keys to the kingdom.
JU
Judy 1 year ago
↳ replying to Wava
User 2: I agree, it's a classic move for enumeration. Plus, netstat and bashrc can reveal a lot too.
DO
Donte 1 year ago
↳ replying to Wava
User 1: Option A is definitely the way to go. /etc/passwd is a goldmine of information.
DA
Daniela 1 year ago
Hmm, I'm not sure. Maybe B? Checking the current user, system info, and network config could be helpful. Though, I do like the sound of 'curl ifconfig.me' in option C.
JU
Julene 1 year ago
↳ replying to Daniela
I agree, B seems like a solid option. But I'm also curious about option C with 'curl ifconfig.me'.
RE
Rene 1 year ago
↳ replying to Daniela
I think B is a good choice. It covers checking the current user, system info, and network configuration.
DE
Denise 1 year ago
↳ replying to Daniela
C) hostname >> linux_enum.txt; echo $USER >> linux_enum.txt; curl ifconfig.me >> linux_enum.txt
MI
Milly 1 year ago
↳ replying to Daniela
B) whoami >> linux_enum.txt; uname -a >> linux_enum.txt; ifconfig >> linux_enum.txt
WI
William 1 year ago
Hmm, I see your point. Option D does include more detailed commands for system enumeration.
JU
Juliann 1 year ago
Wait, is this a trick question? I feel like the answer is going to be something really obscure, like 'dd if=/dev/urandom of=linux_enum.txt'.
RI
Rickie 1 year ago
↳ replying to Juliann
User 3: I'm not sure, but I think C) hostname >> linux_enum.txt; echo $USER >> linux_enum.txt; curl ifconfig.me >> linux_enum.txt could also be a good choice
JA
Jacinta 1 year ago
↳ replying to Juliann
User 2: No, I believe the most comprehensive option is A) cat /etc/passwd >> linux_enum.txt; netstat -tuln >> linux_enum.txt; cat /etc/bash.bashrc >> linux_enum.txt
DI
Dick 1 year ago
↳ replying to Juliann
User 1: I think the answer is B) whoami >> linux_enum.txt; uname -a >> linux_enum.txt; ifconfig >> linux_enum.txt
KI
Kizzy 1 year ago
I disagree, I believe option D would give a better enumeration of the system.
HA
Harley 1 year ago
Option A looks the most comprehensive to me. Grabbing the password file, network connections, and bash configuration should give a good overview of the system.
LA
Lazaro 1 year ago
↳ replying to Harley
User 2: Yeah, I agree. It's important to gather as much data as possible during enumeration.
AL
Alfreda 1 year ago
↳ replying to Harley
User 1: I think Option A is the best choice. It covers a lot of important system information.
WI
William 1 year ago
I think option B would provide the most comprehensive system information.
0/2000 characters

Save Cancel