nerdexam
EC-Council

312-50V12 · Question #42

By performing a penetration test, you gained access under a user account. During the test, you established a connection with your own machine via the SMB service and occasionally entered your login an

The correct answer is D. .bash_history. The .bash_history file is a log of commands executed in the Bash shell. If a user enters their login and password in plaintext, it will be stored in the .bash_history file. This file can be cleared to remove any plaintext passwords that may have been stored. The .xsession-log fil

Submitted by kavita_s· Mar 4, 2026System Hacking Phases and Attack Techniques

Question

By performing a penetration test, you gained access under a user account. During the test, you established a connection with your own machine via the SMB service and occasionally entered your login and password in plaintext. Which file do you have to clean to clear the password?

Options

  • A.xsession-log
  • B.profile
  • C.bashrc
  • D.bash_history

How the community answered

(51 responses)
  • A
    4% (2)
  • B
    4% (2)
  • C
    2% (1)
  • D
    90% (46)

Explanation

The .bash_history file is a log of commands executed in the Bash shell. If a user enters their login and password in plaintext, it will be stored in the .bash_history file. This file can be cleared to remove any plaintext passwords that may have been stored. The .xsession-log file records X session messages, and the .profile and .bashrc files are scripts that are run at login to set environment variables and configure the shell. These files do not typically contain plaintext passwords.

Topics

#Post-exploitation#Linux forensics#Command history#Credential cleanup

Community Discussion

No community discussion yet for this question.

Full 312-50V12 Practice