home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / downloads / nt / l0phtcrack.txt < prev    next >
Text File  |  1998-03-25  |  11KB  |  244 lines

  1.  
  2.                        L0pht Security Advisory
  3.                     Advisory released April 11 1997
  4.  
  5.          Program: L0phtcrack.exe - Windows NT password insecurities
  6.  
  7.              Vulnerability Scope: Windows NT
  8.  
  9.         Severity: The L0pht is pleased to release L0phtcrack rev 1. 
  10.              This program recovers the LANMAN and/or NT Dialect
  11.              MD4 plaintext password from output derived from the
  12.              SAM registry.
  13.  
  14.                    Authors: mudge@l0pht.com
  15.                             weld@l0pht.com
  16.  
  17. Intro:
  18.   
  19.   This tool, as with many others, can be used for breaking into systems
  20.   in illegal fashions - THAT IS NOT WHAT IT IS INTENDED FOR! We had a
  21.   working version done the same day that PWDump was released in order
  22.   to audit some of our internal networks. However, as we started
  23.   researching more into it we noticed many shortcomings in how MS
  24.   security is handled and present some of these in our tool. We take
  25.   no responsibility for misuse of this information. It is our belief
  26.   that the only way to protect yourself is to fully understand your
  27.   vulnerabilities. Unfortunately, for some of these problems we still
  28.   don't see immediate solutions. Our particular solution has been to
  29.   trust our users, and not let any of our NT machines talk to the internet
  30.   (ie filtered very tightly at the perimiter). We are interested in
  31.   other solutions.
  32.   
  33. Overview:
  34.  
  35.   Recently several NT password crackers have emerged. We offer this
  36.   one with the belief that it offers some features and functionality
  37.   that the current ones do not have.
  38.  
  39.   L0phtcrack will recover passwords from Windows NT registries in a 
  40.   variety of fashions. 
  41.  
  42.   By feeding in the output from PWDump [by Jeremy Allison, jra@cygnus.com] 
  43.   and a dictionary file, L0phtcrack rev 1 will attempt to retrieve: 
  44.  
  45.     1) only the LANMAN plaintext password
  46.     2) only the NT Dialect MD4 plaintext password [see reasoning below]
  47.     3) Both the LANMAN and MD4 plaintext passwords (by deriving the
  48.        MD4 password from the LANMAN output and running through up to
  49.        2 to the Nth power permutations)
  50.  
  51.   Alternatively, L0phtcrack gives you the capability to _brute force_ the
  52.   entire key space and recover ALL USER PASSWORDS up to 14 characters in 
  53.   length. 
  54.  
  55.   By going through the entire keyspace available, this program
  56.   WILL RETURN ALL OF THE PLAINTEXT PASSWORDS (both LANMAN and MD4) up to
  57.   and including 14 characters in length (note that the User Login Dialog
  58.   box on NT machines limits the amount of characters that can be typed
  59.   to 14 for the MD4 dialect. Future releases of this software will enable
  60.   brute forcing of up to 16 characters for MD4).
  61.  
  62.   L0phtcrack comes in three flavours:
  63.  
  64.     1) A nice Windows GUI interface so you can point and click.
  65.     2) A CLI version for running in "DOS" windows.
  66.     3) Source code that is generic enough to build on most Un*x's.
  67.  
  68. Description:
  69.  
  70.   Here's how it works -
  71.  
  72.   For NT, LANMAN passwords are derived in the following fashion:
  73.  
  74.     . The user password is converted to UPPERCASE
  75.     . If the user password is less than 14 bytes, the password is padded 
  76.       with NULL characters to 14 bytes.
  77.     . If the user password is greater than 14 bytes, the password is
  78.       truncated to 14 bytes.
  79.     . The 14 byte string is split down the middle into two 7 byte strings.
  80.     . One 8 byte odd parity des key is derived from each of the 7byte
  81.       strings [note1]. 
  82.     . The constant 'magic value' [note2] is then encrypted first 
  83.       with the first odd parity des key and then with the second. The results
  84.       are concatenated. This is the LANMAN OWP [note3].
  85.  
  86.     [note1: There is a significant loss of bits in the str_to_key functions
  87.      which derive the 8 byte odd parity DES keys from the 7 byte strings.
  88.      This knocks down the possibly key space to attack DES substantially.
  89.      Thanks to Hobbit@avian.org for pointing this out to us]
  90.  
  91.     [note2: the constant 'magic value' is derived from the encryption
  92.      of 0x4B47532140232425 with a key of all 1's ]
  93.  
  94.     [note3: quickly scanning the LANMAN OWP's it is easy to see who has
  95.      passwords that are 7 characters or less. If the second half of the
  96.      LANMAN OWP is 0xAAD3B435B51404EE the value for the last seven characters
  97.      in the user password were all NULLs.]
  98.  
  99.   For NT, NT Dialect MD4 passwords are derived in the following fashion:
  100.  
  101.     . The users password is converted to Unicode [note4].
  102.     . The unicode password is run through MD4 to return a 16 byte value.
  103.       This is the MD4 OWP [note5] [note6].
  104.  
  105.     [note4: There is a large amount of confusion as to where Unicode stops.
  106.      i.e. is "ABC", which is in actuallity 'A','B','C','\0', encoded
  107.      as 'A' '\0' 'B' '\0' 'C' '\0' or 'A' '\0' 'B' '\0' 'C' '\0' '\0' '\0'.
  108.      We find that in this situation the former is the case.
  109.  
  110.     [note5: You might say "why do you even bother having an option of doing
  111.      _only md4_ when it is much quicker to derive it from the LANMAN
  112.      password". To which we would reply "this gives us the ability to
  113.      easilly roll in the ability to dictionary attack traffic that we
  114.      see on the network. This will be particularly important if the
  115.      proposed changes to the CIFS spec go into place. See our S/Key
  116.      cracker MONKEY for more of an idea on what's to come".]
  117.  
  118.     [note6: For those who were building md4 crypt-n-compare engines from
  119.      inside Microsoft's Visual C++ IDE. The VC++ does not by default
  120.      define _MSDOS_, or 8086 which are necesarry to through the byte
  121.      ordering into the correct mode in md4.c]
  122.  
  123.   What we do in rev 1 -
  124.  
  125.     In rev 1 of l0phtcrack the user must hand in a password file
  126.     in the format of Jeremy Allison's PWDump output. From this
  127.     the following actions can be taken.
  128.  
  129.     LANMAN only - 
  130.       A dictionary is fed in and each word is encrypted using the
  131.       LANMAN one round DES format as described above. The list of
  132.       users is checked against this encrypted OWP. Any that are 
  133.       found matching are flagged.
  134.  
  135.     MD4 only -
  136.       A dictionary is fed in and each word is encrypted using
  137.       md4. The list of users is checked against this encrypted OWP.
  138.       Any that are found matching are flagged. See the description
  139.       of rev 2 for why this option is important.
  140.  
  141.     LANMAN and md4 -
  142.       A dictionary is fed in and each user is first checked against
  143.       the LANMAN one round DES OWP. If a match is found, the word
  144.       is run through 2 to the power of strlen(word) case permutations 
  145.       in md4 to return the case sensitive md4 value.
  146.  
  147.     Brute force -
  148.       An input string containing the list of valid characters is 
  149.       run through sequentially in all possible combinations up to
  150.       7 characters in length. The first half and second half of the
  151.       LANMAN password are compared against these, thus returning
  152.       all passwords up to 14 characters in total length. Since the
  153.       logon screen will not allow you to enter more than 14 characters
  154.       ,even though the NT MD4 dialect will allow up to 128, this
  155.       should return all users passwords. When a match is found
  156.       the word is run through 2 to the power of strlen(word).
  157.   
  158.       By changing the default string that is processed through you
  159.       can drastically change the amount of time it takes to brute
  160.       through the entire keyspace. Keep in mind that the following
  161.       characters are not valid in passwords so they don't need to
  162.       be included: '/', '\', '[', ']', ':', ';', '|,' ,'=', ',', 
  163.       '+', '*', '?', '<', '>' [according to the MS technet information].
  164.       For example: if you just want to check all combinations of letters
  165.       all you have to run through is ABCDEFGHIJKLMNOPQRSTUVWXYZ.
  166.   
  167.       rev 2 will have this optimized a bit more, in addition to allowing
  168.       a remote querry to our tables of precomputed hashes, thus reducing
  169.       the problem to that of a table lookup.
  170.  
  171.   Why is it important to be able to attack md4 only? That is much
  172.   slower!
  173.       
  174.       The changes being made to the CIFS spec imply that in the future
  175.       a server will be able to force a client to use the NT dialect 
  176.       and not negotiate down. Based upon how the "key exchange" is
  177.       done this will be attackable via the hooks put in for md4 only
  178.       much in a similar way that our program "MONKEY" will attack
  179.       s/key sessions based upon promiscuously viewed network traffic.
  180.  
  181.   errata in rev 1 -
  182.       
  183.       Several of the routines need to be optimized a bit more but the
  184.       tool is quite usable and quite fast as it is (100 users and an
  185.       an 8 meg dictionary file took under 1 minute on a PPro 200 
  186.       with the GUI version, the CLI is by nature a bit faster  - 
  187.       the bruting with a string of 
  188.       "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789-_" took a little over 3 days
  189.       on a P133).
  190.  
  191.       There are hooks to preen through the user list and instantly kick
  192.       out whether a user has a password of 7 characters or less, or
  193.       if a users password is greater than 7 chars.
  194.  
  195.       If you specify md4 only it just does a straight dictionary 
  196.       crypt and compare, if you specify any other method that returns
  197.       md4 values it runs through all case possibilities. 
  198.  
  199.       The brute forcer is not implemented in the windows GUI version. Use
  200.       the command line version for this functionality.
  201.  
  202.   What you can expect to see in rev 2 -
  203.  
  204.     . The functionality of PWDump will be included in the l0phtcrack
  205.       program so you won't need to run seperate programs.
  206.  
  207.     . You should be able to pull down registries from remote / local
  208.       machines WITHOUT BEING ADMINISTRATOR and WITHOUT NEEDING TO
  209.       KNOW THE ADMINISTRATOR's PASSWORD [read this bullet item again!!!]
  210.       - we believe we are very close to being able to do this now.
  211.  
  212.     . You will be able to brute force the NT Dialect password up to
  213.       16 characters in length for those tricky network users that
  214.       never log in via the console.
  215.  
  216.     . The windows GUI will be multi-threaded to take advantage of 
  217.       multiple processors for dramatically improved brute forcing.
  218.  
  219.     . We should have pre-computed tables of the entire key-space 
  220.       available so all that needs to be done is a remote table look
  221.       up.
  222.  
  223.  L0phtcrack is freely available from the l0pht advisories page: 
  224.    http://www.l0pht.com/advisories.html 
  225.    screenshots should be available on the web page in the next couple
  226.    of days.
  227.  
  228.    A mirror of the packages will be available at 
  229.    ftp://dot.ishiboo.com/users/tfish/l0phtcrack.tar.gz 
  230.    and
  231.    ftp://dot.ishiboo.com/users/tfish/l0phtcrack.zip
  232.  
  233.  If anyone makes modifications / improvements please mail the diffs to
  234.  mudge@l0pht.com.
  235.  
  236.  We hope this tool is usefull,
  237.  
  238.  mudge@l0pht.com , weld@l0pht.com
  239.  
  240. --------------
  241. For other advisories check out http://www.l0pht.com/advisories.html
  242. --------------
  243.    
  244.