CompTIA PenTest+ (PT0-003) — Question 81

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?

Answer options

Correct answer: A

Explanation

Option A is the most comprehensive as it gathers user account information from /etc/passwd, active network connections with netstat, and global bash configurations from /etc/bash.bashrc. The other options provide useful information but do not cover as many aspects of the system, such as network configuration and user accounts.