Hacking Windows XP: IP IP
Hacking Windows XP: IP IP
Hacking Windows XP: IP IP
CHAPTER
18
Hacking Windows XP
I
n this chapter you’ll find the answers to the following questions:
• Is it possible to back up or recover Windows XP passwords?
• I want to make my password hard to guess. What are some guidelines?
• I can’t remember the Administrator password for my computer. Can I change it?
• What programs are available to help me recover lost passwords?
• My computer won’t boot. Are there any special programs that will let me boot the
computer to access files or fix the computer?
• I’m interested in seeing what information is stored on my computer. Are there any
tools that will show me that information?
• Is it possible to see what traffic is coming and going through my network?
• I’ve lost my CD key and need to reinstall Windows XP. How do I recover the key?
• Is it possible to change the CD key in an existing Windows XP installation?
If you’ve turned to this chapter in hopes of learning how to be a hacker, you’ll have
to look elsewhere. However, there are several issues that can crop up when using any
computer system, and being able to work around the operating system can save the day.
In this chapter I explore some of the most common problems you might face and how
to use built-in capabilities or third-party tools to work around those problems. For example,
there are a couple of techniques you can use either to recover a lost administrator password
or to essentially clear out the password and start fresh. These techniques can help you regain
full access to the system. This chapter also covers other topics that will help you work around
problems with the operating system and troubleshoot network problems.
This chapter isn’t intended for network administrators, most of whom have an even
bigger arsenal of weapons to lay siege to any computer problem. Nor is this chapter targeted
at users who work in a large enterprise—doing some of the things in this chapter could well
get you fired! Instead, this chapter is geared toward individual users and people who need
to manage computers for others in a small network.
TIP Don’t go surfing the Internet looking for hacking or cracking sites. Invariably, you will run
into one that will infect your system or pull a nasty trick like disabling Internet Explorer. If you
disregard my advice, make sure you have several restore points available from which to restore
your system.
411
Reproduced from the book Windows XP Answers from the Experts. Copyright 2005, The McGraw-Hill
Companies, Inc.. Reproduced by permission of The McGraw-Hill Companies, Two Penn Plaza, NY, NY
10121-2298. Written permission from The McGraw-Hill Companies, Inc. is required for all other uses.
412 Part II: Customizing, Controlling, and Using Windows
• Use a mix of characters and case Use letters, numbers, and special characters such
as ! and #. Example: MyPass2W0rd!9
• Don’t use any real words Many brute-force applications rely on the fact that many
people use words they can remember as their passwords. Example: pe845jd#65!
• Use a mnemonic to help you remember the password Remember Every Good
Boy Does Fine for the lines on the treble cleft in music class? Come up with your
own mnemonic and throw in some special characters. Example: Joe eats 2 bananas
with 7 grapes, or je2bw7g!
1. Open the Users Accounts applet from the Control Panel (Figure 18-1).
2. If you logged on with an account that is a member of the Administrators group,
click the account for which you want to create a password recovery disk. If you
are logged on with a limited account, your account is selected automatically.
3. In the Related Tasks area of the left pane, click Prevent A Forgotten Password to
start the Forgotten Password Wizard.
4. Click Next, insert a blank, formatted disk in drive A, and click Next.
5. When prompted (Figure 18-2), enter the current account password and click Next.
6. Click Next when the wizard indicates it has created the disk, then click Finish.
7. Label the diskette with the account name and store the diskette in a safe place.
Chapter 18: Hacking Windows XP 413
PART II
FIGURE 18-1 The Users Accounts applet lets you create a password recovery diskette.
NOTE The password recovery disk can be used only on the computer where it was created. You
should place the recovery disk in a secure location to prevent someone else from using it to break
into your computer.
FIGURE 18-3 Use the Change Password dialog box to launch the Forgotten Password Wizard.
Chapter 18: Hacking Windows XP 415
NOTE Windows XP offers the options to reset the password only if you have previously created a
password recovery diskette for the specified user account.
1. Boot the system and at the Welcome screen, click the account you want to use; then
click the green arrow button beside it and click the Use Your Password Reset Disk
in the message balloon that pops up (Figure 18-4). If your computer is configured to
PART II
display the Logon dialog box rather than the Welcome screen, enter the user name
but leave the password blank, and then click OK. Windows displays the Logon Failed
dialog box (Figure 18-5). Click Reset to start the wizard.
2. After the wizard starts, click Next, insert the password recovery diskette for this
account in drive A, and click Next.
FIGURE 18-4 Click the link in the message balloon to access the reset disk.
416 Part II: Customizing, Controlling, and Using Windows
FIGURE 18-5 You can also access the reset disk from the Logon Failed dialog box
3. The wizard prompts for a new password and password hint (Figure 18-6). Enter the
new password and hint and click Next. Click Finish after the password is reset by
the wizard.
4. Enter the new password in the Welcome screen or Logon dialog box and log on as
you normally would.
PART II
Administrator account password. Although accounts are deleted, user profiles and
their corresponding documents are not lost. However, you might have to reassociate
the profile directory with the user account after re-creating the account. This method
also requires access to the file system so that you can delete the SAM file.
• Use a third-party recovery tool There are a handful of recovery tools available
for recovering passwords and failed systems. One I like is ERD Commander, from
http://www.winternals.com.
TIP The SAM file is the portion of the registry that stores user accounts.
If you choose to go the route of deleting the SAM, you’ll need to gain access to
the %systemroot%\System32\Config folder, which is where the registry hive files are
located. Using one of the methods described in the preceding section, navigate to the
%systemroot%\System32\Config folder and rename the SAM file:
C:\Windows\System32\Config>rename sam sam.old
Then, reboot the system. The Administrator account will now have a blank password.
PART II
traffic can be a real lifesaver sometimes, whether you’re trying to determine if a computer on
your network is spitting out excessive packets or you want to know what sites your computer
is trying to access on the Internet on its own (a sure sign of adware infection).
NOTE I won’t go into detail about Netcap.exe here because you need Windows 2000 Server or
Windows Server 2003 (or SMS) with the GUI-based Network Monitor application to view the
captured packets. Instead, I include this section so that you’ll know that a capture driver for
Network Monitor is available with Windows XP.
You can install the support tools by running Setup.exe from the \Support\Tools folder,
but if Netcap.exe is all you want, just copy it from the cabinet file to your system. Insert the
Windows XP CD, open a command console, use CD to change to the \Support\Tools folder
on the CD, and then issue the following command, replacing <dest> with the path to the
folder where you want to store Netcap.exe:
The first time you run Netcap.exe, it installs itself on all network interfaces automatically.
Rather than explore the command syntax or parameters for Netcap here, however, I’ll point
you instead to the online help. Just use the command netcap /? at a console prompt to view
syntax and parameters.
FIGURE 18-7 Ethereal is a freeware sniffer available for Windows and Linux.
In its default configuration, Ethereal will capture all packets. You can configure
capture filters to capture specific types of packets. For example, suppose you are trying to
diagnose a problem with a particular host and want to capture everything except port 80. To
configure port filters, choose Capture | Capture Filters to open the Capture Filter dialog box
(Figure 18-8). Click New, click the newly created filter in the list, and enter a filter name and
filter string in the Filter Name and Filter String fields. The following filter string would cause
Ethereal to capture all traffic for 192.138.0.2 except TCP port 80:
host 192.168.0.2 and not tcp port 80
To begin using the filter, click Save and then click Close. Choose Capture | Start to open
the Capture Options dialog box (Figure 18-9). Click Capture Filter, choose the filter you just
created, and click OK to start the capture.
After you’ve captured what you feel are enough packets, click Stop. The packets appear
in the main Ethereal window, as shown previously in Figure 18-7. You can create a display
filter to display only certain information. To create a display filter, choose Analyze | Display
Filters to show the Display Filter dialog box (Figure 18-10). Click New, click the newly
added filter, and enter a name and filter string for it. You can click Expression to build a
Chapter 18: Hacking Windows XP 421
PART II
FIGURE 18-8 Create filters with the Capture Filter dialog box.
filter expression with the Filter Expression dialog box (Figure 18-11). If the filter is correct,
the Filter String field in the Display Filter dialog box will appear in green. If the string is
incorrect, the field displays red. When you have the filter string you need, click Apply to
apply it and then click Close.
FIGURE 18-9 Use the Capture Options dialog box to set options for capturing packets.
422 Part II: Customizing, Controlling, and Using Windows
FIGURE 18-10 Use the Display Filters dialog box to create a filter for displaying captured packets.
FIGURE 18-11 Create a filter expression with the Filter Expression dialog box.
Chapter 18: Hacking Windows XP 423
PART II
FIGURE 18-12 Use EtherApe to view network traffic in graphical format.
TIP To find other sniffer applications, run a search at your favorite search site using the keyphrase
“network sniffer software.”
PART II
FIGURE 18-13 Cain and Abel, without doing any sniffing, can display an amazing amount of information
from your own computer.
TIP Windows XP obtained under an open license does not require activation.
TIP Keyfinder also can recover the CD key for Office 97 and Office XP. The release version (it is
currently beta as I write this) will add several new features, including support for Office 2003
and the capability to change the user information stored for your installation of Windows XP.
The new version also makes it possible to retrieve the CD key from a remote computer.
Viewing the CD key with Keyfinder is easy. When you start the program, it searches for
and displays the key as shown in Figure 18-14. You can copy the key to the Clipboard, save
it to a text file, or print it through the File menu.
TIP Microsoft offers its own method for changing the CD key on an existing Windows XP installation.
See http://support.microsoft.com/default.aspx?scid=kb;en-us;Q328874 to learn how to use Windows
Product Activation to change the key.
FIGURE 18-14 Keyfinder will extract the CD key from your local Windows XP installation.
Reproduced from the book Windows XP Answers from the Experts. Copyright 2005, The McGraw-Hill
Companies, Inc.. Reproduced by permission of The McGraw-Hill Companies, Two Penn Plaza, NY, NY
10121-2298. Written permission from The McGraw-Hill Companies, Inc. is required for all other uses.