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?

Answer options
A: Configuration files
B: Permissions
C: Virtual hosts
D: Secrets Correct answer
Correct Answer:
D. Secrets
Explanation

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.

Why Incorrect

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.

References

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.

Scroll to Top