Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


March 2006

Deflect AD Attacks

Prevent password-cracking and other common directory assaults
RSS
Subscribe to Windows IT Pro | See More Active Directory (AD) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Attack #5: DoS Attack Based on the MaxTokenSize Property

Many of today's enterprises use Active Directory (AD) either as their enterprise directory or as the network OS (NOS) directory for their Windows infrastructure. AD has become an important asset in most enterprises, and valuable things must be protected accordingly.

AD can be attacked from many directions—let's look at five common attacks and how to protect AD against them. The first three attacks can result in an elevation of the privileges of the attacker in AD. The last attack in this print article and another attack described in the Web-exclusive sidebar "Attack #5: DoS Attack Based on the MaxTokenSize Property" (http://www.windowsitpro.com, InstantDoc ID 49352) can affect the availability of the AD infrastructure. Unless stated otherwise, the information in this article applies to both the Window Server 2003 and Windows 2000 Server versions of AD.

I can't address all AD attacks in this one article. My main goal is to show AD administrators the urgent need for taking a multipronged approach toward locking down and securing AD.

ATTACK ONE
Cracking Passwords Based on the LM Hash

Password cracking is the process of hashing a number of potential passwords by using the same hashing algorithms used by an OS, then comparing the results of the cracking operation to the password hashes stored by the OS. Password cracking can be time-consuming; password crackers typically have to try many (and sometimes, all) possible passwords. However, freeware tools such as John the Ripper and LCP can help automate password cracking. You can download the latest John the Ripper version from http://www .openwall.com/john. The latest LCP version can be found at http://www.lcpsoft.com/ english/index.htm. These tools can crack passwords particularly easily in AD environments that use the plain-vanilla NT LAN Manager (NTLM) authentication protocol. NTLM is the default authentication protocol of Windows NT 4.0 and is still supported in Win2K and later OS versions for down-level compatibility reasons. NTLM is made up of two authentication protocols: LM and NTLM. The two protocol flavors use different hashing algorithms; these hashes are referred to as the LM and the NT, or Unicode, hashes, respectively.

The way Windows generates the LM hashes contains weaknesses that can significantly speed up the password cracking process. One weakness is that passwords can't be longer than 14 characters. LM also limits the character set by converting all password letters to uppercase during the LM hash calculation. In addition, the LM hash doesn't actually use a hash function but rather a symmetric cipher to generate the hash.

Figure 1 shows how the LM hash is generated for the user password hpinvent1. First, the password is converted to uppercase: HPINVENT1. Next, the uppercase password is split into two seven-character strings: HPINVEN and T1*****. The second string is padded with null characters to make it a seven-character string. The two strings are then used as the keys to encrypt a constant by using the Digital Encryption Standard (DES) symmetric cipher, rather than a hash function (as mentioned above). Finally, the resulting DES-encrypted blobs are concatenated to create the LM hash.

ATTACK ONE
Prevention

To mitigate the risks posed by LM password hashes, you can do the following: Get rid of the LM hashes in the AD database, ensure that your Windows users are using the stronger NTLMv2 authentication protocol, or ensure that your users honor specific password creation rules.

You can prevent the storage of the LM hashes in the AD on Windows 2003, Windows XP, and later platforms with the following Group Policy Object (GPO) or Local Policy setting: Network security: Do not store LAN Manager hash value on next password change. In Win2K, this setting doesn't remove LM hashes from AD or the SAM (the local security database); it only ensures that LM hashes aren't stored the next time users change their password. Thus, after you make this change, you should force all affected users to change their passwords. In Windows 2003 and XP, the Network security: Do not store LAN Manager hash value on next password change setting does clear the LM hash history entries in the security database.

On Windows 2003, XP, and Win2K Service Pack 2 (SP2) or later platforms, you can also edit the registry directly to prevent LM hash storage. To do so, set the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\nolmhash registry subkey (REG_DWORD) to value 1.

If you make this change in a domain environment, you must be sure to make it on all domain controllers (DCs). You shouldn't make this change if you have an environment in which users are still using Windows 98 or Windows 95 clients that don't have the Directory Services client (explained below) installed. These clients can use only LM authentication. The use of nolmhash is also outlined in the Microsoft article "How to prevent Windows from storing a LAN manager hash of your password in Active Directory and local SAM databases" at http://support.microsoft.com/?kbid=299656.

   Previous  [1]  2  3  4  Next 


Reader Comments
Thanks, great tips.

Consider discussing security on named pipes too.

Fyyre March 09, 2006 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...

Outlook Tips and Techniques

Read about hiding items, merging appointments, multiple windows, creating views, permissions, sending Outlook items to outside recipients, Send As permission, Inbox Assistant, tricks for rules, and tips for obtaining Microsoft Knowledge Base articles. ...


Active Directory (AD) Whitepapers Sustainable Compliance: How to reconnect compliance, security and business goals

User Provisioning and Access Control

Managing Unix/Linux with Microsoft System Center Operations Manager 2007 Cross Platform Extensions Beta

Related Events Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Windows 2003: Active Directory Administration Essentials

Related Active Directory (AD) Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Solving PST Management Problems
In this white paper, read about the top PST issues and how to administer local/network PST Files.

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Maximize Your SharePoint Investment: Get Your Data Moving
Watch this web seminar now to learn how to maximize your SharePoint investment! Join us as we take a look at the complex business of securing, accessing and managing vast amounts of information in a global network and various ways to get your data moving.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing