CS0-003 · Question #88
An organization is experiencing security incidents in which a systems administrator is creating unauthorized user accounts A security analyst has created a script to snapshot the system configuration
The correct answer is A. diff daily_11_03_2019 daily_11_04_2019. To detect unauthorized user accounts from daily /etc/passwd snapshots, the analyst needs a command that can compare two different daily snapshots.
Question
An organization is experiencing security incidents in which a systems administrator is creating unauthorized user accounts A security analyst has created a script to snapshot the system configuration each day. Following iss one of the scripts:
cat /etc/passwd > daily_$(date +"%m_%d_%Y") This script has been running successfully every day. Which of the following commands would provide the analyst with additional useful information relevant to the above script?
Options
- Adiff daily_11_03_2019 daily_11_04_2019
- Bps -ef | grep admin > daily_process_$(date +%m_%d_%Y")
- Cmore /etc/passwd > daily_$(date +%m_%d_%Y_%H:%M:%S")
- Dla -lai /usr/sbin > daily_applications
How the community answered
(17 responses)- A82% (14)
- B12% (2)
- D6% (1)
Why each option
To detect unauthorized user accounts from daily `/etc/passwd` snapshots, the analyst needs a command that can compare two different daily snapshots.
The `diff` command compares two files line by line and highlights their differences, which is ideal for identifying new or removed user accounts between two daily snapshots of the `/etc/passwd` file.
The `ps -ef | grep admin` command monitors running processes at a given moment, not historical changes to user accounts within `/etc/passwd`.
The `more /etc/passwd` command displays the current password file, and redirecting it to a new file only creates another snapshot, it does not perform a comparison.
The `ls -lai /usr/sbin` command lists directory contents and attributes, which is unrelated to tracking user account changes in `/etc/passwd`.
Concept tested: File comparison for system auditing
Source: https://man7.org/linux/man-pages/man1/diff.1.html
Topics
Community Discussion
No community discussion yet for this question.