Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 21, 2004

Access Denied: Using Log Parser to Audit Domain Logons

RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

For auditing purposes, I'd like to keep track of logons to my domain whether they are successful (event ID 528—Successful Logon) or not (event ID 529—Logon Failure). I don't need to track all event ID 540 (Successful Network Logon) events. I've tried configuring filters, but I could set up only one filter at a time. Can you help me?

First, let me say that using Audit logon events, the audit category that generates event IDs 528, 529, and 540, isn't an accurate way to track logons to your domain. The Audit logon events category captures logons to the actual physical domain controller (DC) but doesn't capture logons by workstation users who use domain accounts to log on to the domain. To capture those events, you need to enable auditing on the local workstation. With Windows 2000 and later, you should use the Audit account logon events audit category, which logs each authentication that the DC performs whether the logon is local or originates from a workstation or server on the network.

To monitor successful domain logons, check all your DCs for event IDs 672 (Authentication Ticket Granted) and 680 (Account Used for Logon by %1). To monitor for logons that failed because of a bad password, look for event ID 675 (Pre-authentication failed) with failure code 0x18 and event ID 681 (The logon to account: %2 by: %1 from workstation: %3 failed. The error code was: %4) with error code 3221225578. For more information about auditing logon events and the differences between the two audit categories, see the Windows & .NET Magazine article "Audit Account Logon Events," March 2001, InstantDoc ID 19677.

Second, you're right that Event Viewer lets you configure only one filter at a time. However, you can create a custom console that includes multiple instances of Event Viewer. See "Monitoring Security with Custom MMC Consoles," March 2004, InstantDoc ID 41574, for details about how to create a custom console that contains multiple Security log views.

The best way to filter your Security logs for logon-related events, however, is to use the Log Parser tool. Log Parser lets you use SQL-like queries to extract data from log files. You can download the tool from http://www .microsoft.com/windows2000/downloads/tools/logparser/default.asp.

Listing 1 shows a LogParser command that queries the local computer's Security log for event ID 675 with failure code 0x18 and event ID 681 with error code 0xC000006A, then sorts the results by event ID, date, and time. (If you want to run this command on Windows Server 2003, you must first change EventID = 681 to EventID = 680 because of changes in the Windows 2003 Security log.) Figure 1 shows the resulting text file. You can view the file directly or import it into Microsoft Access and format it into a report.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Microsoft, News Corp. Discuss Locking Out Google

Microsoft and Rupert Murdoch's News Corp. recently discussed an alliance that would counter Google's fledgling online news service. ...


Security Whitepapers Reducing the Costs and Risks of Branch Office Data Protection

Solving Desktop Management Challenges in Healthcare

Solving Desktop Management Challenges in Education

Related Events The Easiest Way to Save Time and Money on E-mail and SharePoint Management

Introduction to Identity Lifecycle Manager "2"

Don't Miss Windows Server 2008 Virtual Event

Check out our list of Free Email Newsletters!

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

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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 DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement