CHFI OS and Network Forensics Practice Question
During a forensic investigation of a compromised Linux server, you find the following entry in /var/log/auth.log: 'Mar 10 03:14:15 server sshd[1234]: Accepted publickey for root from 10.0.0.5 port 54321 ssh2: RSA SHA256:AbCdEf123456'. Which artifact should you examine next to determine if unauthorized key-based access occurred?
⚠ Common exam trap
The trap here is that candidates may focus on the log entry itself or server configuration (sshd_config) instead of realizing that the authorized_keys file is the only place that records which keys are permitted, making it the direct source for verifying whether the key used was pre-authorized.
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
✓
~/.ssh/authorized_keys
The log entry shows a successful public key authentication from root. To determine if this key-based access was unauthorized, you must examine the ~/.ssh/authorized_keys file for the root user. This file contains the public keys that are authorized to log in as root; if the key fingerprint SHA256:AbCdEf123456 is present, the access was legitimate; if absent, it indicates an unauthorized key was added by an attacker.
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
/var/log/syslog is a general-purpose logging facility that aggregates kernel, daemon, and application messages; on most distributions SSH authentication activity is typically logged to /var/log/auth.log or /var/log/secure, not the default syslog file. Even if authentication messages appear in syslog, it records events such as successful or failed login attempts with timestamps and client IPs, not the static contents of user configuration files. Thus, unauthorized keys would never be listed in syslog; at most, it might show a connection that used a newly added key, but not the key itself.
- ✗
/etc/ssh/sshd_config
Why it's wrong here
/etc/ssh/sshd_config is the SSH daemon's configuration file, not a credential store. It controls directives such as PermitRootLogin, PubkeyAuthentication, and AuthorizedKeysFile, which defines the default path to the authorized_keys file (normally ~/.ssh/authorized_keys). While an investigator should inspect it to detect changes like enabling root login or redirecting AuthorizedKeysFile to an alternate location, the file does not contain the actual public key material that would appear after an attacker appends a key.
- ✓
~/.ssh/authorized_keys
Why this is correct
~/.ssh/authorized_keys is a per-user file that stores the public keys (one key per line) that are permitted to log in as that user via SSH. When an attacker compromises a Linux server, a common persistence technique is to append their own public key to /root/.ssh/authorized_keys or another user's authorized_keys file, enabling silent passwordless access at any time. Checking this file for unrecognized keys — and correlating key hashes or comments with known legitimate admins — is direct evidence of key-based backdoor access, making it the correct file to examine in this scenario.
- ✗
/etc/passwd
Why it's wrong here
/etc/passwd is a structured database of local user accounts containing fields for username, UID, GID, home directory, and login shell, but it does not hold SSH keys; password hashes are kept in /etc/shadow for security. If an attacker created a new user for backdoor access, that user would appear in /etc/passwd, but the authorized_keys for that new user would reside in their home directory (e.g., /home/username/.ssh/authorized_keys). Therefore, /etc/passwd alone would not reveal key-based persistence, only the existence of potentially suspicious accounts that might warrant further examination.
Quick reference
Asymmetric Encryption Algorithm Comparison
| Algorithm | Key Exchange | Signatures | Equivalent Security Key | Notes |
|---|---|---|---|---|
| RSA-3072 | Yes | Yes | 128-bit | Widely deployed; slow for bulk data |
| ECDSA P-256 | No | Yes | 128-bit | Fast signatures; standard TLS certs |
| ECDH / ECDHE | Yes | No | 128-bit | Perfect forward secrecy in TLS 1.3 |
| DH / DHE | Yes | No | 128-bit (3072-bit key) | Replaced by ECDHE in modern TLS |
| Ed25519 | No | Yes | ~128-bit | SSH keys, modern PKI |
Go deeper
Related to this question
About these practice questions
This CHFI question is part of Courseiva's 745-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 CHFI practice question is part of Courseiva's free EC-Council 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 CHFI exam.