nerdexam
CompTIA

PT0-003 · Question #109

In a file stored in an unprotected source code repository, a penetration tester discovers the following line of code: sshpass -p donotchange ssh [email protected] Which of the following should the…

The correct answer is B. Take a screen capture of the source code repository for documentation purposes. C. Investigate to find whether other files containing embedded passwords are in the code repository. When a penetration tester discovers hard-coded credentials in a file within an unprotected source code repository, the next steps should focus on documentation and further investigation to identify additional security issues. Taking a Screen Capture (Option B): Documentation…

Submitted by saadiq_pk· Mar 6, 2026Vulnerability Discovery and Analysis

Question

In a file stored in an unprotected source code repository, a penetration tester discovers the following line of code:

sshpass -p donotchange ssh [email protected] Which of the following should the tester attempt to do next to take advantage of this information? (Select two).

Options

  • AUse Nmap to identify all the SSH systems active on the network.
  • BTake a screen capture of the source code repository for documentation purposes.
  • CInvestigate to find whether other files containing embedded passwords are in the code repository.
  • DConfirm whether the server 192.168.6.14 is up by sending ICMP probes.
  • ERun a password-spraying attack with Hydra against all the SSH servers.
  • FUse an external exploit through Metasploit to compromise host 192.168.6.14.

How the community answered

(22 responses)
  • A
    23% (5)
  • B
    64% (14)
  • E
    9% (2)
  • F
    5% (1)

Explanation

When a penetration tester discovers hard-coded credentials in a file within an unprotected source code repository, the next steps should focus on documentation and further investigation to identify additional security issues. Taking a Screen Capture (Option B): Documentation: It is essential to document the finding for the final report. A screen capture provides concrete evidence of the discovered hard-coded credentials. Audit Trail: This ensures that there is a record of the vulnerability and can be used to communicate the issue to stakeholders, such as the development team or the client. Investigating for Other Embedded Passwords (Option C): Thorough Search: Finding one hard-coded password suggests there might be others. A thorough investigation can reveal additional credentials, which could further compromise the security of the Automation Tools: Tools like truffleHog, git-secrets, and grep can be used to scan the repository for other instances of hard-coded secrets.

Topics

#credential discovery#source code analysis#documentation#vulnerability identification

Community Discussion

No community discussion yet for this question.

Full PT0-003 Practice