1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Crack pdf

33 327 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

1 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 1 Crack Is a password cracker that will take encrypted Unix passwords and compute the plain text password. Thank you, and welcome to SANS LevelOne. We will be covering Crack. Hello, my name is Eric Cole and I will be explaining Crack to you. If you have any question or comments regarding this program please contact me at eric7095@aol.com. 2 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 2 Password Cracker Details •Name: Crack • Operating System: Unix • Brief Description: Crack is a password guessing program that is designed to quickly locate insecurities in Unix (or other) password files by scanning the contents of a password file Crack is a freely available program designed to find standard Unix DES-encrypted passwords by standard guessing techniques. It is written to be flexible, configurable and fast, and to be able to make use of several networked hosts via the Berkeley rsh program (or similar), where possible. This program checks your users' passwords for "guessable" values. It works by encrypting a list of likely passwords and seeing if the result matches any of your user's encrypted passwords (which must be provided to it). It is surprisingly effective and easy to use. 3 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 3 Checklist • The following are the objectives for this course. After completion a user should understand the following: – what password cracking is – why it is important – methods of password cracking –what Crack is – how to install and run Crack – how to view the results of Crack – how to protect against password cracking on Unix – features of a strong password – what is a shadow password file 4 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 4 Why are passwords so important? • First line of defense • Control access • Get additional access • Create back door for future access Passwords are very important because they are the first line of defense against interactive attacks on your system. Since it is fairly easy for someone to figure out a user ID, the only thing that is protecting access to your system is a user’s password. Based on this, if an attacker cannot interact with your system(s), and they have no access to read or write the information contained in the password file, then they have almost no avenues of attack left open to break your system. This is why, if an attacker can at least read your password file (and if you are on a vanilla modern Unix, you should assume this) it is so important that an attacker is not able to break any of the passwords contained therein. If they can, then it is also fair to assume that they can log on to your system and can then break into "root" via an operating system hole. 5 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 5 How are passwords stored on a system? • User passwords must be protected against: – unauthorized disclosure – unauthorized modification – unauthorized removal • Solution: store only the encrypted password In most companies, passwords are the first and only line of defense to protecting their information and servers. Since most user IDs consist of the first initial/last name of an employee (or some combination), it is fairly easy to find out valid user IDs for individuals at a company. Based on this, the only other piece of information you need to gain access is a user password. Therefore they need to be protected and very hard to guess. The key things passwords need to be protected against are unauthorized disclosure, unauthorized modification and unauthorized removal. If users write down their passwords or share them with other people, then the user’s password is compromised and can be used as an entry point into the system. Being able to modify a password is just as risky, because as long as an attacker knows what password is associated with a user ID, they can use it to gain access. It does not matter if the real user knows it or not. This is potentially dangerous because if the user tries to get in and cannot, they might be suspicious of foul play. In order to protect passwords, operating systems use encryption, which basically hides the originally content so if someone gets the encrypted password they will not be able to determine what the original password was. 6 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 6 Encryption 101 • Encryption is the process of converting plaintext into ciphertext. • The goal is the make the original text unreadable. • Three basic methods: –symmetric -single key – asymmetric - two keys (public and private) – hash – one-way algorithm, no key This section will cover a brief overview of encryption so that you can understand why and how password cracking works. For additional details, there are several good cryptography books on the market. In its most basic form, cryptography is the process of converting plaintext into ciphertext, with the goal of making the original text unreadable. Basically, plaintext is the original, human-readable message and ciphertext is the unreadable message in its encrypted form. Therefore, since the goal of passwords is to make them unreadable, they are stored in encrypted form. There are three basic types of encryption. Symmetric encryption uses a single key to encrypt and decrypt the message. If two people wanted to communicate, they would both have to have the same key. One person would use it to encrypt the message, and the other person would use the same key to decrypt it. (Editor’s note: Symmetric encryption is also known as private key encryption because a single, private key is used for encryption and decryption. – JEK) Asymmetric encryption uses two keys, a public and a private key. The public key is given to everyone and is used to only encrypt. The private key is known by only the owner and is used to decrypt messages. (Editor’s note: Asymmetric encryption is also known as public key cryptography because it uses both a private key and a public key to encrypt and decrypt information. – JEK) Hash functions are considered one-way functions because they perform a one-way transformation of information that is irreversible. Basically, given an input string, the hash function would produce a fixed- length output string, and from the output string there is no way to determine the original input string. CRYPT is a DES variant found on Unix systems to secure passwords. It is primarily used as a one-way function for passwords, but can also be used for encryption. 7 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 7 What is password cracking? • Guessing someone's plain text password when you only have the encrypted password. • General method number one: • find a valid user ID • create a list of possible passwords • try typing in each password • if system allows you in - success • if not - try again Password cracking is the process of trying to guess or determine someone’s plaintext password, when you only have their encrypted password. The general method for this is the following: • find a valid user ID. • create a list of possible passwords. • try typing in each password. • if system allows you in – success! • if not, try again. (Editor’s note: A distinction is sometimes drawn between password guessing, where the attacker actually tries to log in with various passwords; and password cracking (discussed in the next slide), where the attacker obtains a copy of the encrypted password file or database and attempts to derive passwords from their encrypted form (i.e., “crack” the encryption, generally by taking a group of passwords, generating the hash values, and comparing the generated hashes to those in the password database to see if there is a match). – JEK) 8 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 8 What is password cracking? (2) • General method number two: • find a valid user ID • find the encryption algorithm used • obtain the encrypted password • create list of possible passwords • encrypt each password • see if there is a match •Tips • pre-compute dictionary • pre-compute encrypted passwords •automate Another method is to: • find a valid user ID. • find the encryption algorithm used. • obtain the encrypted password. • create a list of possible passwords. • encrypt each password. • see if there is a match. So, tips to speeding this process up include: • pre-compute the dictionary. • pre-compute the encrypted passwords. • automate. 9 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 9 Methods of Password Cracking • Dictionary attack • Hybrid attack • Brute force attack The fastest method for cracking passwords is a dictionary attack. This is done by testing all the words in a dictionary or word file against the password hashes. When it finds the correct password it displays the result. There are lots of sites that have downloadable dictionaries you can use. The second method to crack passwords is called a hybrid attack. This builds upon the dictionary method by adding numeric and symbol characters to dictionary words. Many users choose passwords such as "bogus11" or ”he11o!!” (where the letter L’s are replaced by numeric ones). These passwords are just dictionary words slightly modified with additional numbers and symbols. The hybrid attack rapidly computes these passwords. These are the types of passwords that will pass through many password filters and policies, yet still are easily crackable. The final and most powerful cracking method is the brute force method. This method will always recover the password no matter how complex. It is just a matter of time. Really complex passwords that use characters that are not directly available on the keyboard may take so much time that is not feasible to crack them on a single machine using today's hardware. But most complex passwords can be cracked in a matter of days. This is usually much shorter than the time most administrators set their password policy expiration time to. Using a real-world cracking tool is the only good way to know what time one should set for password expirations. 10 Unix/Linux Password Management - SANS GIAC LevelOne ©2000 10 Why is password cracking useful? • Auditing strength of passwords • Recovering forgotten password • Recovering unknown password •Migrating users • Checks and balances There are many uses for computing user passwords. First and foremost is for a system administrator to audit the strength of the passwords that their users are using. There are password filters for Unix, but how do you know how well you have chosen a filter? Without testing the passwords generated by users against a real-world password cracker, you are guessing at the time it will take an external attacker or malicious insider to uncover the passwords. Other uses include recovering a forgotten password, retrieving the password of a user in order to impersonate them, or migrating Windows NT users to another platform such as Unix. [...]... which passwords were cracked 21 Effectiveness of Crack • • • • • • • • • • • • User Eric password eric - CRACKED User John password john1234 User Mike password 5369421 User Mary password #57adm7# User Sue password sue - CRACKED User lucy password 12345 - CRACKED User pat no password - CRACKED User tim password password - CRACKED User cathy password 55555 - CRACKED User frank abcde - CRACKED User tom password... ftp://ftp.cerias.purdue.edu/pub/tools/unix/pwdutils /crack Additional information on Crack can be found on Alec Muffet’s site at http://www.users.dircon.co.uk/~crypto/ – JEK) 14 Configuring Crack • Download crack file • Unzip the file using gzip – gunzip -r crack5 .0.tar.Z • Untar the file – tar -xvf crack5 .0.tar • Read manual.txt • Edit the script file • Compile program – Crack -makeonly – Crack -makedict Unix/Linux Password... commands Crack -makeonly and then Crack -makedict After these two steps, a binary executable Crack file is generated You should view the output of these commands to make sure no errors were generated If errors were generated, you will have to go back and configure the Crack script files for your specific environment If no errors are generated, you are ready to start using Crack 15 Running Crack • Run crack. .. Run crack with a passwd file – Crack [options] [-fmt format] [file ] – Crack /etc/passwd • Pipe output to a file – Crack /etc/passwd > output • Run Reporter script to see results – /Reporter [-quiet] [-html] Unix/Linux Password Management - SANS GIAC LevelOne ©2000 16 To run Crack, run the Crack file using any password file that you have The simplest syntax of Crack is Crack followed by the path and... sees if there is a match If there is, then Crack has just guessed the correct password Crack s main function is to crack passwords on a Unix machine There are some versions that have been ported to other operating systems, but the original program works only on Unix Crack also has a modular approach where Crack is used only to crack user passwords But what makes Crack so useful is that it comes with various... Running Crack • • • • • • Crack 5.0a: The Password Cracker (c) Alec Muffett, 1991, 1992, 1993, 1994, 1995, 1996 System: SunOS 5.6 Generic sun4u sparc SUNW,Ultra-2 Home: /home/ Invoked: Crack npasswd Stamp: sunos-5-sparc Unix/Linux Password Management - SANS GIAC LevelOne ©2000 18 When you run Crack, this slide shows the first part of the output that is displayed It basically tells you which version or Crack, ... /run/bin/sunos-5-sparc/libc5.a' is up to date all made in util Crack: The dictionaries seem up to date Crack: Sorting out and merging feedback, please be patient Crack: Merging password files Crack: Creating gecos-derived dictionaries mkgecosd: making non-permuted words dictionary mkgecosd: making permuted words dictionary Crack: launching: cracker -kill run/sun.16095 Done Unix/Linux Password Management... because you could cause Crack to stop working since these are the files it uses to crack passwords To check results of the Crack program, run the Reporter script This script outputs the results of which passwords were cracked This can also be piped to a file If you used an earlier version of Crack, it no longer generates human-readable output directly; instead, to see the results of a Crack run, the user.. .Crack • Available from ftp://ftp.cerias.purdue.edu/pub/tools /unix/pwdutils /crack • Features – Password cracking – Modular approach with various scripts – Combining and extracting password files Unix/Linux Password Management - SANS GIAC LevelOne ©2000 11 Crack is a program written by Alec Muffett to crack passwords on Unix systems It basically uses... the temporary file used to store the password cracker's input -mail: email a warning message to anyone whose password is cracked See "scripts/nastygram" -network: runs the password cracker in "network" mode -nice N: runs the password cracker at a reduced priority, so that other jobs can take priority over the CPU -makeonly, -makedict: Used for building Crack binaries and dictionaries See above -kill . password cracking is – why it is important – methods of password cracking –what Crack is – how to install and run Crack – how to view the results of Crack. ©2000 16 Running Crack • Run crack with a passwd file – Crack [options] [-fmt format] [file .] – Crack /etc/passwd • Pipe output to a file – Crack /etc/passwd

Ngày đăng: 21/12/2013, 05:17

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w