PT0-003 practice question 3 of 30
[Attacks and Exploits] During an assessment, a penetration tester gains a low-privilege shell and then runs the following command: findstr /SIM…
Full set: 351 questions[Attacks and Exploits] During an assessment, a penetration tester gains a low-privilege shell and then runs the following command:
findstr /SIM /C:"pass" *.txt *.cfg *.xml
Which of the following is the penetration tester trying to enumerate?
The command findstr /SIM /C:"pass" .txt .cfg .xml is a classic post-exploitation technique used to hunt for credentials and other sensitive information. The findstr utility searches for the string "pass" (case-insensitively) within common file types known to store configuration data and notes (.txt, .cfg, .xml). The goal is to locate hardcoded passwords, API keys, connection strings, or other confidential data, which are collectively referred to as "secrets." Discovering these secrets can enable privilege escalation or lateral movement within the target network.
A. Configuration files: The command searches within these files; its primary goal is to find the sensitive content ("pass"), not just to enumerate the files themselves.
B. Permissions: This command reads file content and does not enumerate file system access control lists (ACLs) or user permissions. Tools like icacls are used for that.
C. Virtual hosts: While virtual host configurations may reside in these files, searching for "pass" is not a direct or effective method for enumerating them.
1. Microsoft Corporation. (n.d.). findstr. Microsoft Learn. Retrieved from https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/findstr.
Reference Detail: The official documentation confirms that findstr is a tool to "search for patterns of text in files
" and it details the functions of the switches used: /S (search subdirectories)
/I (case-insensitive)
/M (print filename only)
and /C:string (use string as a literal search).
2. MITRE. (2023). Unsecured Credentials: Credentials in Files. MITRE ATT&CK®. Technique T1552.001. Retrieved from https://attack.mitre.org/techniques/T1552/001/.
Reference Detail: This technique describes how adversaries search for plaintext credentials stored in files. It explicitly mentions searching for keywords like "password" in configuration files
scripts
or text files
which directly aligns with the command shown in the question.
3. Evans
D. (2021). Lecture 18: Web Security: Post-Exploitation. CS 4630: Defense Against the Dark Arts
University of Virginia.
Reference Detail: University courseware on computer security frequently covers post-exploitation. This phase includes "Pillaging
" which involves searching the compromised file system for sensitive information such as password files
SSH keys
and configuration files containing credentials
mirroring the intent of the findstr command.
Keep practicing
Take the free PT0-003 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PT0-003 practice questions
- Question 1[Attacks and Exploits] A penetration tester is trying to get unauthorized access to a web…
- Question 2[Attacks and Exploits] During an internal penetration test, a tester compromises a Window…
- Question 4A penetration tester cannot complete a full vulnerability scan because the client's WAF i…
- Question 5[Tools and Code Analysis] Which of the following techniques is the best way to avoid dete…
- Question 6[Attacks and Exploits] A penetration tester finishes a security scan and uncovers numerou…
- Question 7[Attacks and Exploits] A penetration tester finds that an application responds with the c…
