New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CompTIA PT0-003 Exam - Topic 2 Question 24 Discussion

Actual exam question for CompTIA's PT0-003 exam
Question #: 24
Topic #: 2
[All PT0-003 Questions]

[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?

Show Suggested Answer Hide Answer
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.


Contribute your Thoughts:

0/2000 characters
Sharmaine
2 months ago
A covers a lot of ground, can't argue with that!
upvoted 0 times
...
Bettye
2 months ago
I think B is better for system details, though.
upvoted 0 times
...
Amina
2 months ago
Option A gives a good mix of user and network info.
upvoted 0 times
...
Dominga
3 months ago
Wait, why would you use curl for local info? Seems off.
upvoted 0 times
...
Aliza
3 months ago
D seems solid too, especially with lsof included.
upvoted 0 times
...
Noah
3 months 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.
upvoted 0 times
...
Elenore
3 months 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.
upvoted 0 times
...
Tora
4 months 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.
upvoted 0 times
...
Mel
4 months 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.
upvoted 0 times
...
Dorthy
4 months 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.
upvoted 0 times
...
Ma
4 months 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.
upvoted 0 times
...
Luisa
4 months 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.
upvoted 0 times
...
Blair
5 months 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.
upvoted 0 times
...
Isaac
5 months 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.
upvoted 0 times
...
Wava
8 months 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.
upvoted 0 times
Judy
6 months ago
User 2: I agree, it's a classic move for enumeration. Plus, netstat and bashrc can reveal a lot too.
upvoted 0 times
...
Donte
7 months ago
User 1: Option A is definitely the way to go. /etc/passwd is a goldmine of information.
upvoted 0 times
...
...
Daniela
8 months 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.
upvoted 0 times
Julene
6 months ago
I agree, B seems like a solid option. But I'm also curious about option C with 'curl ifconfig.me'.
upvoted 0 times
...
Rene
6 months ago
I think B is a good choice. It covers checking the current user, system info, and network configuration.
upvoted 0 times
...
Denise
6 months ago
C) hostname >> linux_enum.txt; echo $USER >> linux_enum.txt; curl ifconfig.me >> linux_enum.txt
upvoted 0 times
...
Milly
6 months ago
B) whoami >> linux_enum.txt; uname -a >> linux_enum.txt; ifconfig >> linux_enum.txt
upvoted 0 times
...
...
William
8 months ago
Hmm, I see your point. Option D does include more detailed commands for system enumeration.
upvoted 0 times
...
Juliann
8 months 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'.
upvoted 0 times
Rickie
7 months ago
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
upvoted 0 times
...
Jacinta
7 months ago
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
upvoted 0 times
...
Dick
8 months ago
User 1: I think the answer is B) whoami >> linux_enum.txt; uname -a >> linux_enum.txt; ifconfig >> linux_enum.txt
upvoted 0 times
...
...
Kizzy
8 months ago
I disagree, I believe option D would give a better enumeration of the system.
upvoted 0 times
...
Harley
8 months 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.
upvoted 0 times
Lazaro
7 months ago
User 2: Yeah, I agree. It's important to gather as much data as possible during enumeration.
upvoted 0 times
...
Alfreda
8 months ago
User 1: I think Option A is the best choice. It covers a lot of important system information.
upvoted 0 times
...
...
William
8 months ago
I think option B would provide the most comprehensive system information.
upvoted 0 times
...

Save Cancel