The answer is the logon.bat script, as it is the file most likely to contain passwords on a workstation. In Windows environments, administrators often embed plaintext credentials directly into logon.bat scripts to automate network drive mappings or startup tasks, making these batch files a prime target for an attacker who gains local access. On the Certified Ethical Hacker CEH exam, this question tests your understanding of common credential storage pitfalls beyond the typical SAM or LSASS memory dumps—many candidates mistakenly focus on password managers or registry hives, but the real-world trap is that automation scripts like logon.bat are often left unprotected and readable. Remember the memory tip: “Batch files batch credentials,” meaning if you see a .bat or .cmd script in startup folders, always check for hardcoded passwords.
CEH Social Engineering and Physical Security Practice Question
This CEH practice question tests your understanding of social engineering and physical security. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
Exhibit:
C:\Users\jdoe> net user jdoe /domain
The request will be processed at a domain controller for domain corp.xyz.com.
User name jdoe
Full Name John Doe
Comment
User's comment
Country code 001 (United States)
Account active Yes
Account expires Never
Password last set 6/15/2024 9:30:00 AM
Password expires 9/13/2024 9:30:00 AM
Password changeable 6/16/2024 9:30:00 AM
Password required Yes
User may change password Yes
Workstations allowed All
Logon script logon.bat
User profile
Home directory \\fileserver\home\jdoe
Last logon 7/10/2024 2:15:00 PM
Logon hours allowed All
Local Group Memberships *Domain Users
Global Group memberships *Domain Users
The command completed successfully.
Refer to the exhibit. An attacker gains access to the user's workstation and wants to find a file containing passwords. Which file is most likely to contain credentials?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Refer to the exhibit.
Exhibit:
C:\Users\jdoe> net user jdoe /domain
The request will be processed at a domain controller for domain corp.xyz.com.
User name jdoe
Full Name John Doe
Comment
User's comment
Country code 001 (United States)
Account active Yes
Account expires Never
Password last set 6/15/2024 9:30:00 AM
Password expires 9/13/2024 9:30:00 AM
Password changeable 6/16/2024 9:30:00 AM
Password required Yes
User may change password Yes
Workstations allowed All
Logon script logon.bat
User profile
Home directory \\fileserver\home\jdoe
Last logon 7/10/2024 2:15:00 PM
Logon hours allowed All
Local Group Memberships *Domain Users
Global Group memberships *Domain Users
The command completed successfully.
A
User profile (C:\Users\jdoe)
Why wrong: User profile is a folder, not a specific file.
B
Home directory on \\fileserver\home\jdoe
Why wrong: Home directory is a network share, not a specific file.
C
logon.bat script
Logon scripts may contain credentials for network resources.
D
Active Directory database (NTDS.dit)
Why wrong: NTDS.dit is on the domain controller, not the workstation.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
logon.bat script
Option C is correct because logon.bat scripts are commonly used in Windows environments to map network drives or perform startup tasks, and administrators often embed plaintext credentials in such scripts for automation. An attacker who compromises the workstation can read this batch file to extract stored passwords, making it a high-value target for credential theft.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
User profile (C:\Users\jdoe)
Why it's wrong here
User profile is a folder, not a specific file.
✗
Home directory on \\fileserver\home\jdoe
Why it's wrong here
Home directory is a network share, not a specific file.
✓
logon.bat script
Why this is correct
Logon scripts may contain credentials for network resources.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
Active Directory database (NTDS.dit)
Why it's wrong here
NTDS.dit is on the domain controller, not the workstation.
Common exam traps
Common exam trap: answer the scenario, not the keyword
EC-Council often tests the misconception that credentials are always stored in system databases like NTDS.dit or SAM, but the trap here is that attackers target easily accessible, plaintext files like logon scripts that users or administrators create for convenience.
Detailed technical explanation
How to think about this question
Logon scripts like logon.bat are executed via Group Policy or local startup settings, and they often include net use commands with embedded passwords for drive mappings. Under the hood, these scripts are stored in locations such as C:\Windows\System32\GroupPolicy\Machine\Scripts or the user's startup folder, and they can be read by any user with local access. In real-world attacks, penetration testers frequently find domain admin credentials in such scripts, leading to full domain compromise.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the CEH exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this CEH question in full detail.
Social Engineering and Physical Security — This question tests Social Engineering and Physical Security — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: logon.bat script — Option C is correct because logon.bat scripts are commonly used in Windows environments to map network drives or perform startup tasks, and administrators often embed plaintext credentials in such scripts for automation. An attacker who compromises the workstation can read this batch file to extract stored passwords, making it a high-value target for credential theft.
What should I do if I get this CEH question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.