CPSA ยท Unix user enumeration and mail/file services
Unix post-exploitation activities
Password hash handling, patch level checks and reverting changes.
Key points
- After gaining access a tester may collect password hashes (on Linux usually /etc/shadow, readable by root) and must protect them as sensitive data; check the patch level by comparing installed package versions with vendor advisories; and revert every change made (test files, accounts, configuration) while recording what was done for the report.
Practice questions
In which file do modern Linux systems normally store password hashes?
- /etc/hosts
- /etc/shadow
- /etc/motd
- /etc/fstab
Show answer
Answer: B. /etc/shadow
/etc/shadow holds the hashes and is readable only by root. /etc/passwd is world-readable and normally holds an x placeholder.
Which are sound ways to handle password hashes collected during a test?
- Store them encrypted and limit who can access them
- Redact or truncate them in the report
- Delete them when the agreed retention period ends
- Email them in plain text to the whole team
- Keep them indefinitely for future reference
Show answer
Answer: A. Store them encrypted and limit who can access them, B. Redact or truncate them in the report, C. Delete them when the agreed retention period ends
Hashes are sensitive: keep few copies, store them encrypted, redact them in the report and delete them per the agreement. Emailing them in plain text or keeping them indefinitely contradicts that.
Because a tester is authorised, there is no need to record the changes made on a host.
Show answer
Answer: False
False. Authorisation does not remove the duty to document. The client needs the list of changes to verify clean-up and to trace test activity in their own logs.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
