Lab 2.1: Windows Password Bypass
Learning Objectives
By the end of this lab, you will be able to:
- Reset a Windows password without knowing it
- Gain administrator access on a Windows system
- Understand the limitations of Windows security without encryption
- Evaluate the importance of physical security
- Apply appropriate protective measures
Estimated Duration
30 minutes
Prerequisites
- A functional Windows 10/11 VM (created in windows_vm.mdx)
- VirtualBox or VMware installed
- User account with password on the VM
Professional Context
In a professional context, it often happens that:
- An employee forgets their password
- A former administrator left without providing access
- A system needs to be recovered after an incident
This lab teaches you legitimate system access recovery techniques. These same techniques can be used maliciously, hence the importance of understanding necessary protections.
Legitimate use cases:
- Technical support and helpdesk
- System recovery
- Authorized forensic investigation
- Authorized security testing
ETHICAL AND LEGAL WARNING
IMPORTANT - READ BEFORE STARTING:
The techniques in this lab allow bypassing Windows authentication. They are taught in a system security learning context.
AUTHORIZED:
- On your own test VM
- On systems you own
- As part of an investigation mandate with written authorization
- For legitimate recovery of lost access
PROHIBITED AND ILLEGAL:
- On someone else's computer without permission
- On company systems without explicit mandate
- To access confidential data without rights
- With the intent to harm or steal information
Consequences: Unauthorized access = Crime (Canadian Criminal Code, sections 342.1 and 430)
By completing this lab, you commit to using this knowledge ethically and legally.
Preparing the Test VM
Step 0.1: Create a Security Snapshot
IMPORTANT: Before starting, create a snapshot of your VM!
In VirtualBox:
- Select your Windows VM
- Click Machine → Take Snapshot (or camera icon)
- Name: "BEFORE_LAB_BYPASS"
- Click OK
Why? If something goes wrong, you can revert to this state in 10 seconds.
Step 0.2: Create a Test Account
On your Windows VM:
- Start normally
- Open Settings → Accounts → Family & other users
- Click Add someone else to this PC
- Without a Microsoft account → Create a local account
- Name:
TestUser - Password:
Password123!
- Name:
- Note this password somewhere
Now we will "forget" this password and bypass it!
Method 1: Utilman.exe Replacement (Classic)
Step 1.1: Understand Utilman.exe
Utilman.exe is the Windows "Utility Manager" that runs:
- On the login screen (before login!)
- With SYSTEM privileges (more powerful than admin!)
- Accessible via the accessibility icon (bottom-right corner)
The trick: Replace utilman.exe with cmd.exe
- Result: Clicking on accessibility = cmd in SYSTEM!
- With cmd in SYSTEM, you can do anything!
Step 1.2: Access System Files
On your VM:
-
Shut down the Windows VM (complete shutdown)
-
Start in Recovery Mode:
- Start the VM
- As soon as the Windows logo appears, force shutdown the VM (Ctrl+C or power off button)
- Repeat 2-3 times
- Windows should display "Preparing Automatic Repair"
- Click Advanced options
OR (clean method):
- Start the VM
- At login, click Power then hold Shift and click Restart
- Choose Troubleshoot → Advanced options → Command Prompt
-
You are now in a recovery mode command prompt!
Step 1.3: Identify the Correct Drive
In the recovery command prompt:
Execute:
diskpart
list volume
exit
Observe:
- The C: drive in recovery mode is NOT necessarily your Windows!
- Look for the volume with "NTFS" and size matching your Windows disk
- Note the drive (often D: or E: in recovery mode)
To test which drive contains Windows:
dir D:\Windows\System32
If you see lots of files, it's the correct drive!
Questions:
- What is the drive of your Windows partition in recovery mode?
- Why does the drive change compared to normal mode?
Step 1.4: Backup and Replace Utilman.exe
Assuming D: is your Windows drive.
Execute:
copy D:\Windows\System32\utilman.exe D:\Windows\System32\utilman.exe.bak
copy D:\Windows\System32\cmd.exe D:\Windows\System32\utilman.exe
What you just did:
- Created a backup of utilman.exe (just in case)
- Replaced utilman.exe with cmd.exe
That's it! The "backdoor" is installed.
Step 1.5: Restart and Test
- Close the command prompt
- Click Continue (normal restart)
- The VM restarts to the login screen
On the login screen:
- Click on the Ease of Access icon (bottom-right corner)
- MAGIC! A command prompt opens!
- This command prompt is as SYSTEM!
Verify:
whoami
Should display: nt authority\system
Questions:
3. Did you get a command prompt on the login screen?
4. What is your privilege level (result of whoami)?
Step 1.6: Reset the Password
In this SYSTEM command prompt:
To see all users:
net user
To reset TestUser's password:
net user TestUser NewPassword123!
Alternative - Remove the password completely:
net user TestUser ""
Questions: 5. Did you succeed in changing the password? 6. How long did the entire operation take?
Step 1.7: Log in with the New Password
- Close the command prompt
- Click on the TestUser account
- Enter the new password (or none if removed)
- You are logged in!
CONGRATULATIONS! You just bypassed Windows authentication!
Step 1.8: Clean Up (Optional)
Once logged in, restore the original utilman.exe:
Open cmd as administrator:
copy C:\Windows\System32\utilman.exe.bak C:\Windows\System32\utilman.exe
(If you don't do this, the backdoor remains active!)
Method 2: Sticky Keys Backdoor (Alternative)
This method is similar but uses sethc.exe (Sticky Keys).
Step 2.1: Principle
Sticky Keys = Accessibility feature activated by pressing Shift 5 times
The trick: Replace sethc.exe with cmd.exe
- Pressing Shift 5x = cmd in SYSTEM!
- Works even on the login screen!
Step 2.2: Backdoor Installation
In recovery mode (like method 1):
copy D:\Windows\System32\sethc.exe D:\Windows\System32\sethc.exe.bak
copy D:\Windows\System32\cmd.exe D:\Windows\System32\sethc.exe
Step 2.3: Activation
On the login screen:
- Press Shift 5 times
- A command prompt opens!
- You are SYSTEM
- Reset the password as before
Questions: 7. Which method do you prefer (Utilman vs Sticky Keys)? 8. Why might an attacker prefer Sticky Keys?
Method 3: Safe Mode + Built-in Administrator
This method exploits the hidden Windows Administrator account.
Step 3.1: Start in Safe Mode
From the login screen:
- Click Power
- Hold Shift and click Restart
- Choose Troubleshoot → Advanced options → Startup Settings
- Click Restart
- Press 4 or F4 (Safe Mode)
Step 3.2: Built-in Administrator Account
In Safe Mode:
- Windows automatically enables the hidden "Administrator" account
- This account often has NO password by default!
- It has all rights
If the Administrator account appears:
- Click on it
- No password? Just press Enter
- You are logged in as admin!
Step 3.3: Modify Other Accounts
Once logged in as Administrator:
Open cmd:
net user TestUser NewPassword
Or via graphical interface:
- Control Panel → User Accounts
- Manage another account
- Select TestUser → Change the password
Questions: 9. Did the Administrator account have a password? 10. Does this method seem simpler or more complex to you?
Part 4: Security Implications
Step 4.1: Time Required for an Attacker
Measure the time:
From the moment you have physical access to a locked machine until gaining full admin access:
Utilman Method: ___ minutes Sticky Keys Method: ___ minutes Safe Mode Method: ___ minutes
Average: Generally less than 5 minutes for someone who knows!
Questions: 11. Are you surprised by the speed? 12. What would happen if someone had physical access to your computer for 5 minutes?
Step 4.2: Real Attack Scenarios
Scenario 1: Unlocked office
- Employee goes for coffee (2 minutes)
- Malicious colleague installs Sticky Keys backdoor
- Employee returns, nothing seems changed
- Later: Attacker presses Shift 5x, gets SYSTEM
Scenario 2: Stolen laptop
- Laptop stolen without BitLocker
- Thief boots in recovery mode
- Access to ALL files in minutes
Scenario 3: Malicious "Technician"
- Fake IT technician asks for your computer
- Installs backdoor in 2 minutes
- Returns the "repaired" computer
- Permanent backdoor installed
Questions: 13. Which of these scenarios seems most likely to you? 14. How to protect against each?
Step 4.3: Why These Methods Work
What you learned:
-
Physical access = Game Over (without encryption)
- If someone can touch your computer, they can compromise it
-
Windows stores hashed passwords
- But with SYSTEM access, you can change them without knowing them
-
Recovery mode has too much power
- Necessary for troubleshooting, but a security risk
-
System files are modifiable
- If the disk is not encrypted
Questions: 15. Why does Windows allow these recovery techniques? 16. How could Microsoft prevent these bypasses?
Part 5: Protective Measures
Step 5.1: BitLocker - Ultimate Protection
BitLocker encrypts the entire hard drive.
With BitLocker enabled:
- Impossible to access files without the decryption key
- Recovery mode cannot modify files
- Bypass methods no longer work!
Check if BitLocker is enabled:
- File Explorer
- Right-click on C:
- If you see a closed padlock = BitLocker active
Enable BitLocker (Windows Pro only):
- Settings → Update & Security → Device encryption
- Turn on BitLocker
- Save the recovery key (IMPORTANT!)
Questions: 17. Is BitLocker enabled on your VM? 18. On your personal computer?
Step 5.2: BIOS/UEFI Password
Firmware level protection:
- Restart the VM
- Press F2 or Del to enter BIOS
- Look for "Security" or "Password"
- Set:
- Supervisor Password (BIOS admin password)
- User Password (password at startup)
With BIOS password:
- Impossible to boot in recovery mode without the password
- Additional protection
CAUTION: Do not lose this password! Very difficult to recover!
Step 5.3: Secure Boot
Secure Boot ensures only signed OS boot.
Protection against:
- Bootkit
- Boot-level rootkit
- Unauthorized OS
Enable in BIOS:
- BIOS → Boot → Secure Boot
- Enabled
Limitation: May block some OS (older Linux versions)
Step 5.4: Physical Security Policy
Organizational best practices:
-
Automatic lock
- Windows + L systematically
- Lock after 1 minute of inactivity
-
Never leave a computer unattended
- Office, café, library
-
Anti-theft cables
- For laptops in the company
-
Video surveillance
- Areas with sensitive equipment
-
Access badge
- Limit physical access to servers
Questions: 19. Does your computer lock automatically? 20. After how long?
Part 6: Testing and Validation
Step 6.1: Test with Simulated BitLocker
On your VM:
- Restore original utilman.exe (if modified)
- Create a snapshot "BEFORE_BITLOCKER"
- Create a file "secret.txt" on TestUser's desktop
- Shut down the VM
Simulate encryption:
- Imagine the disk is encrypted
- In recovery mode, you couldn't access
D:\Windows\System32 - All methods fail!
Questions: 21. Without BitLocker, could you read secret.txt? How? 22. With BitLocker, is it possible?
Step 6.2: Backdoor Verification
How to detect if a backdoor is installed?
Method 1 - Manual check:
dir C:\Windows\System32\utilman.exe
dir C:\Windows\System32\sethc.exe
Check size and date. If recently modified = suspicious!
Method 2 - Check with PowerShell:
Get-FileHash C:\Windows\System32\utilman.exe
Get-FileHash C:\Windows\System32\cmd.exe
If the hashes are identical = utilman.exe has been replaced!
Questions: 23. What would be an automated check to implement? 24. How to detect these modifications in a company?
Part 7: Practical Exercises
Exercise 7.1: Helpdesk Scenario
Situation: An employee forgot their Windows password. You are IT support.
Task:
- Document the complete recovery procedure
- Include security precautions
- Indicate the time required
- List checks to perform afterward
Deliverable: Written procedure (1 page)
Exercise 7.2: Security Audit
Task: Create a PowerShell script that checks:
- If utilman.exe has been modified
- If sethc.exe has been modified
- If BitLocker is enabled
- If a BIOS password is configured (detectable via WMI)
Deliverable: Functional PowerShell script
Exercise 7.3: Time Comparison
Experiment:
- Measure the time to bypass the password (method 1)
- Enable BitLocker (if Windows Pro)
- Attempt the same method
- Document the difference
Questions: 25. Does BitLocker completely prevent the bypass? 26. What is the time difference?
Deliverables
To submit:
-
Answer document (Word/PDF) containing:
- Answers to the 26 questions
- Measured time for each method
- Screenshots of the 3 functional methods
- Helpdesk procedure (Exercise 7.1)
-
Screenshots (minimum 5):
- Command prompt via Utilman (showing
whoami) net usercommand showing users- Successful password change
- Login with new password
- Hash verification (modified utilman.exe)
- Command prompt via Utilman (showing
-
Security analysis (1-2 pages):
- Impact of these vulnerabilities in a company
- Recommended protective measures
- Comparison with/without BitLocker
-
PowerShell script (Exercise 7.2)
Evaluation Criteria
| Criterion | Points |
|---|---|
| Mastery of the 3 bypass methods | 30% |
| Understanding of security implications | 25% |
| Quality of analysis and recommendations | 20% |
| Documentation and screenshots | 15% |
| Detection script (Exercise 7.2) | 10% |
Quick Reference Commands
Recovery Mode
Access recovery mode:
shutdown /r /o /f /t 00
Identify Windows partition:
diskpart
list volume
exit
Bypass Methods
Utilman replacement:
copy D:\Windows\System32\utilman.exe D:\Windows\System32\utilman.exe.bak
copy D:\Windows\System32\cmd.exe D:\Windows\System32\utilman.exe
Sticky Keys replacement:
copy D:\Windows\System32\sethc.exe D:\Windows\System32\sethc.exe.bak
copy D:\Windows\System32\cmd.exe D:\Windows\System32\sethc.exe
Password change:
net user <username> <new_password>
net user <username> ""
Detection
Hash verification:
Get-FileHash C:\Windows\System32\utilman.exe
Get-FileHash C:\Windows\System32\sethc.exe
Get-FileHash C:\Windows\System32\cmd.exe
Restoration:
copy C:\Windows\System32\utilman.exe.bak C:\Windows\System32\utilman.exe
copy C:\Windows\System32\sethc.exe.bak C:\Windows\System32\sethc.exe
Troubleshooting
Problem: "Access Denied" in recovery mode
Solution: You are already in recovery mode with privileges, this should not happen. Ensure you are using the recovery command prompt, not the normal Windows one.
Problem: Cannot find utilman.exe
Solution: You are not on the correct drive. The Windows drive in recovery mode is not always C:. Try D:, E:, etc.
Problem: Backdoor does not work after restart
Solution:
- Ensure you copied to System32 (not SysWOW64)
- Check if the file exists:
dir C:\Windows\System32\utilman.exe
Problem: "Sticky Keys" still shows the original dialog
Solution: The copy did not work correctly. Retry from recovery mode.
Going Further (Optional)
Challenge 1: Alternative Method - Kon-Boot
Research Kon-Boot - a tool that temporarily bypasses Windows login without modifying files.
Questions:
- How does it work?
- Is it detectable?
- Advantages vs methods in this lab?
Challenge 2: Automated Detection
Create a script that:
- Runs at startup
- Checks the integrity of utilman.exe and sethc.exe
- Alerts admin if modified
- Automatically restores from backups
Challenge 3: Complete Evil Maid Attack
Document a complete "Evil Maid" attack scenario:
- Physical access (5 min)
- Backdoor installation
- Keylogger installation
- Persistence configuration
- Planned data exfiltration
Then list all possible defenses.
Additional Resources
- Microsoft: Advanced Startup Options
- BitLocker Documentation
- Windows Password Reset Methods (Official)
- NIST Guidelines - Physical Security
Conclusion
This lab taught you:
- 3 Windows password bypass methods
- The importance of physical security
- Why BitLocker is crucial
- How to detect and prevent these attacks
Key Lessons:
- Physical access = Total control (without encryption)
- BitLocker is essential on laptops
- Automatic locking protects against opportunistic access
- These techniques are legitimate for authorized recovery
- Security is multi-layered (physical + software)
Next step: Lab 2.2 where you will learn to create disposable VMs to test destructive changes without risk!
Final Note: Ethical Responsibility
You now know how to bypass Windows authentication in minutes.
This knowledge is a powerful tool:
- Use it for good (legitimate recovery, authorized testing)
- Never to harm, steal, or violate privacy
- Always obtain written authorization before any test
- Respect laws and professional ethics
Remember: With great power comes great responsibility.
Commitment: "I understand the implications of these techniques and commit to using them only in a legal and ethical framework."
Your signature: ____________________
Lab developed as part of the Operating Systems course - MODULE 2