Showing posts with label crack. Show all posts
Showing posts with label crack. Show all posts

Password-Cracking Countermeasures



The strongest passwords possible should be implemented to protect against password cracking. Systems should enforce 8–12-character alphanumeric passwords. The length of time the same password should be used is discussed in the next section.
To protect against cracking of the hashing algorithm for passwords stored on the server, you must take care to physically isolate and protect the server. The system administrator can use the SYSKEY utility in Windows to further protect hashes stored on the server's hard disk. The server logs should also be monitored for brute-force attacks on user accounts.
A system administrator can implement the following security precautions to decrease the effectiveness of a brute-force password-cracking attempt:
  • Never leave a default password.
  • Never use a password that can be found in a dictionary.
  • Never use a password related to the hostname, domain name, or anything else that can be found with Whois.
  • Never use a password related to your hobbies, pets, relatives, or date of birth.
  • As a last resort, use a word that has more than 21 characters from a dictionary as a password.
Note 
This subject is discussed further in the section "Monitoring Event Viewer Logs," later in this chapter.
In the following sections, we'll look at two measures you can take to strengthen passwords and prevent password-cracking.

Password Change Interval

Passwords should expire after a certain amount of time so that users are forced to change them. If the password interval is set too low, users will forget their current passwords; as a result, a system administrator will have to reset users' passwords frequently. On the other hand, if passwords are allowed to be used for too long, security may be compromised. The recommended password-change interval is every 30 days. In addition, most security professionals recommended that users not be allowed to reuse the last three passwords.
Note 
You cannot completely block brute-force password attacks if the hacker switches the proxy server where the source packet is generated. A system administrator can only add security features to decrease the likelihood that brute-force password attacks will be useful.

Monitoring Event Viewer Logs

Administrators should monitor Event Viewer logs to recognize any intrusion attempts either before they take place or while they're occurring. Generally, several failed attempts are logged in the system logs before a successful intrusion or password attack. The security logs are only as good as the system administrators who monitor them.
Tools such as VisualLast aid a network administrator in deciphering and analyzing the security log files. VisualLast provides greater insight into the NT event logs so the administrator can assess the activity of the network more accurately and efficiently. The program is designed to allow network administrators to view and report individual users' logon and logoff times; these events may be searched according to time frame, which is invaluable to security analysts who are looking for intrusion details.
The event log located at c:\\windows\system32\config\Sec.Event.Evt contains the trace of an attacker's brute-force attempts.

Cracking Windows 2000 Passwords



The SAM file in Windows contains the usernames and hashed passwords. It's located in the Windows\system32\config directory. The file is locked when the operating system is running so that a hacker can't attempt to copy the file while the machine is booted to Windows.
One option for copying the SAM file is to boot to an alternate operating system such as DOS or Linux with a boot CD. Alternately, the file can be copied from the repairdirectory. If a system administrator uses the RDISK feature of Windows to back up the system, then a compressed copy of the SAM file called SAM._ is created inC:\windows\repair. To expand this file, use the following command at the command prompt:
  C:\>expand sam._ sam
After the file is uncompressed, a dictionary, hybrid, or brute-force attack can be run against the SAM file using a tool like L0phtCrack. A similar tool to L0phtcrack is Ophcrack. Exercise 1 illustrates how to use Ophcrack to crack passwords.
Exercise 1: Use Ophcrack to Crack Passwords

  1. Download and install ophcrack from http://ophcrack.sourceforge.net/.
  2. Run the ophcrack program and set the number of threads under the Preferences tab to the number of cores of the computer running ophcrack plus one. If you change this value, you have to exit ophcrack and restart it in order to save the change.
    Note 
    This step is optional but will speed up the cracking process.
  3. Click the Load button to add hashes. There are numerous ways to add the hashes:
    • Enter the hash manually (Single Hash option)
    • Import a text file containing hashes you created with pwdump, fgdump, or similar third-party tools (PWDUMP File option)
    • Extract the hashes from the SYSTEM and SAM files (Encrypted SAM option)
    • Dump the SAM from the computer ophcrack is running on (Local SAM option)
    • Dump the SAM from a remote computer (Remote SAM option)
    Note 
    For the Encrypted SAM option, the SAM is located under the Windows system32/config directory and can only be accessed for a Windows partition that is not running. For the Local SAM and Remote SAM options, you must be logged in with the administrator rights on the computer you want to dump the SAM.
  4. Click the Tables button.
  5. Click the enable (green and yellow) buttons.
  6. Using the up and down arrows, sort the rainbow tables you are going to use. Keep in mind that storing the rainbow tables on a fast medium like a hard disk will significantly speed up the cracking process.
  7. Click the Crack button to start the cracking process. You'll see the progress of the cracking process in the bottom boxes of the ophcrack window. When a password is found, it will be displayed in the NT Pwd field. You can save the results of a cracking session at any time by clicking the Save button.

Cracking a Password



Manual password cracking involves attempting to log on with different passwords. The hacker follows these steps:
  1. Find a valid user account (such as Administrator or Guest).
  2. Create a list of possible passwords.
  3. Rank the passwords from high to low probability.
  4. Key in each password.
  5. Try again until a successful password is found.
A hacker can also create a script file that tries each password in a list. This is still considered manual cracking, but it's time consuming and not usually effective.
A more efficient way of cracking a password is to gain access to the password file on a system. Most systems hash (one-way encrypt) a password for storage on a system. During the logon process, the password entered by the user is hashed using the same algorithm and then compared to the hashed passwords stored in the file. A hacker can attempt to gain access to the hashing algorithm stored on the server instead of trying to guess or otherwise identify the password. If the hacker is successful, they can decrypt the passwords stored on the server.
Note 
Passwords are stored in the Security Accounts Manager (SAM) file on a Windows system and in a password shadow file on a Linux system.

Popular Posts