hardMultiple ChoiceObjective-mapped
XK0-006 Practice Question: An administrator is investigating a security…
An administrator is investigating a security breach. The attacker gained root access via an application vulnerability. The administrator needs to determine which commands were executed by the attacker after gaining access. Which log file should be examined first?
⚠ Common exam trap
Test-takers frequently choose /var/log/secure or /var/log/auth.log because they associate 'security breach' with authentication logs, but these logs only show how access was gained, not what commands were executed afterward.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
/root/.bash_history
/root/.bash_history, because this file logs the command-line history for the root user. After gaining root access via an application vulnerability, the attacker would execute commands as root, and those commands are recorded in the root user's bash history file. Examining this file provides a direct timeline of the commands executed post-compromise, which is the most efficient starting point for determining the attacker's actions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/var/log/syslog
Why it's wrong here
Contains general system messages.
- ✗
/var/log/secure
Why it's wrong here
Logs authentication on Red Hat.
- ✗
/var/log/audit/audit.log
Why it's wrong here
Requires auditd; not always enabled.
- ✗
/var/log/auth.log
Why it's wrong here
Logs authentication events, not commands.
- ✓
/root/.bash_history
Why this is correct
Contains the root user's command history.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Bash
Bash is a command-line interpreter that lets users interact with an operating system by typing text commands instead of clicking icons.
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
About these practice questions
This XK0-006 question is part of Courseiva's 979-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.