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


August 2000

Archiving and Analyzing the NT Security Log


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

Analyzing Event Logs
Now that you know how to collect and merge many event logs into one file, how do you efficiently analyze this file to find suspicious activity patterns? Several available reporting utilities can analyze output files for specific types of activity.

R528. R528 helps you monitor users' logon sessions to determine who accessed a system during an incident, determine normal usage trends, and recognize anomalous logons that might indicate a security breach or unauthorized account use. The utility searches for occurrences of event ID 528 (successful logon) and corresponding event ID 538 (user logoff) in one or more .evt files. (For more information about logon events, see "Monitoring Privileges and Administrators in the NT Security Log," June 2000.) R528 lets you choose from several report sections, which Figure 2 shows.

The first section details each logon session, showing the user who logged on, which computer the user logged on to, the logon type, the logon date and time, and the logoff date and time. One problem with NT's auditing is that NT doesn't always record event ID 538; consequently, R528 will probably find more records with event ID 528 than event ID 538.

The utility's second report section lists the unmatched logon events. Note that R528 reports show the system that a user logged on to, not the system the user logged on from. (For example, when a user logs on to a local workstation with a domain account, NT records the logon in the local workstation's log. When the same user accesses a shared directory on another server, NT records that logon in the other server's log.)

You can use R528 to search multiple .evt files simultaneously and produce one comma-, tab-, or semicolon-delimited report. R528 has a host of options to control the reported information and level of detail, so you might need to experiment to find the right reporting combination for your needs.

R529. R529 helps you monitor event ID 529 (failed logon). The utility's report (which Figure 3, page 85, shows) lists failed logon attempts, detailing the user account, the system the user attempted to log on to, and whether the logon originated locally or over the network. R529 also tries to distinguish between innocent mistakes and attacks by looking for two or more failed logons that involve the same account and computer and that occur within 5 minutes of one another. When R529 finds a successful logon that immediately follows a failed logon, the utility reports the pattern as a mistake. When a successful logon follows a string of failed logons, R529 reports a successful attack. For all other situations, the utility reports a failed attack. The utility's simplistic pattern recognition can't dependably recognize all attacks, but the tool's mistake recognition helps you weed out failed logons that were likely the result of user error. Two optional summary sections help you identify the computers and user accounts that intruders attack most frequently.

NTLast 1.6. NT OBJECTives' NTLast 1.6 is another free tool that you can use to analyze logon activity. (The company also offers NTLast 2.85 for purchase; for a review of NTLast, see Mark Joseph Edwards, "NTLast v2.6," September 1999.) Similar to the UNIX last command, NTLast offers several reporting options to help you analyze logon and logoff events. You can use the /n switch to specify the number of logon and logoff events that you want NTLast to report. You can use the /s and /f switches to report successful or failed logons, respectively; you can use the /r and /I switches to specify remote network or interactive (i.e., local) logons, respectively. When you select successful logons (i.e., when you use the /s switch), NTLast tries to find the corresponding logoff event for each logon, as Figure 4 shows. In this capacity, NTLast functions similarly to R528.

NTLast doesn't read archived .evt files, so you must use the tool's /m switch to run the utility against each remote system that you're monitoring. For example, to report the past 20 failed remote logons, type

ntlast /m oraclesvr /f /r /n 20

R592. In "Interpreting the NT Security Log," April 2000, I explain how to use the process tracking audit event category to audit programs that run on your workstations and servers. Security event ID 592 identifies a started process, as well as the process name, the user who started the process, and the date and time that the process started. Event ID 593 identifies an ended process. Event ID 592 and event ID 593 correspond in a manner similar to the complementary logon and logoff security event IDs 528 and 538. R592, another tool for purchase from Frank Heyne Software, searches one or more event logs for each event ID 592 and corresponding event ID 593 and produces a useful report showing who ran each process and how long the process ran. The source file and output file options are similar to R528's options. Although process tracking is valuable (especially on workstations), it has limits: Users can copy and change program names, and NT reports only the executable name rather than the full pathname.

System-log tools. When you use a RAS server, attackers can easily target this important entry to your network. Frank Heyne Software's R20050 provides RAS connection reports (RAS connections trigger System event ID 20048 and System event ID 20050). Cut from the same mold as R528 and R592, this utility offers the same options for source and output formatting.

Creating Custom Reports
Although the tools I've described can help you analyze the event logs and generate specialized reports, these tools deal with only certain activities. When you want to monitor other activities (e.g., file and object access, use of user rights, account management), you can use ELDump and Access to import the necessary event logs from all your systems into one Access database, then create custom reports that draw information from all the event logs. By using ELDump in combination with Access, you can overcome the inherent problems that arise from the different number of strings in each event ID's free-form description.

First, create an Access table that has columns for all the standard description data (e.g., date, time, event ID, username, source, type, category, computer name). Then, add 20 more text columns and label them with generic names (e.g., string1, string2) for the message strings. These extra columns will provide room for events with large descriptions. Create a batch file that uses ELDump to dump the Security logs for all your relevant systems into one text file. Use ELDump's -A parameter to specify output for only the past 24 hours of activity (i.e., -A 24). Use the -s parameter to specify each computer from which you want to dump the logs. For example,

eldump -s oraclesvr -s docsvr1 -s docsvr2 -A 24 -t -l sec > events.txt 

Other Articles in This Series
This article is the fifth and final installment in Randy Franklin Smith's series about the Windows NT Security log. You can obtain other articles in the series from Windows 2000 Magazine's Web site at http://www.win2000mag.com/.

"Protecting the NT Security Log," July 2000, InstantDoc ID 8785
"Monitoring Privileges and Administrators in the NT Security Log," June 2000, InstantDoc ID 8696
"Interpreting the NT Security Log," April 2000, InstantDoc ID 8288
"Introducing the NT Security Log," March 2000, InstantDoc ID 8056
will dump the past 24 hours of activity from the Security logs for the servers OracleSvr, DocSvr1, and DocSvr2 into a tab-delimited file called events.txt.

Next, create a macro that automatically imports the text file into your Access table. Add a command to the batch file to execute the macro after ELDump runs. Configure the batch file to delete the text file after importing it into the Access table. Finally, schedule the batch file to run each day at the same time. Now you have a master database of all security events for your network, and you can write custom reports from this database. For example, you can write a Daily High Risk Events report that lists all the highly suspicious events that I described in "Protecting the NT Security Log," July 2000. You can sort the events by event ID, then by computer. You can also use this database for ad hoc queries when you need to research trends or investigate other situations. With this method, you might miss or duplicate some events depending on how exact your job scheduler is and how quickly the dump executes. If this possibility concerns you, you can insert a step in the batch file to first use EventSave to dump the logs, then use ELDump to read the archived .evt files rather than pull the events directly from your systems' logs.

In the Know
You'll need to dedicate time to set up regular automated archiving and reporting processes, but you'll save time in the long run by eliminating the need to manually peruse each event log. And after you've initiated these processes, the sky is the limit for your archiving and analyzing options. Take the time now to implement automated processes, and you can sleep easier knowing what is happening on your network.

End of Article

   Previous  1  [2]  Next  


Reader Comments
Where can I get hold of the R528 and R529 utils?

Rob Williams August 04, 2000


Have a look at http://www.heysoft.de/index.htm. The utilities are posted there, plus some similar tools for reporting on other event codes in the EVT files.

Phil Spencley August 08, 2000


<i>The first tool that comes to mind is auditpol.exe, a Microsoft Windows NT Server 4.0 Resource Kit utility that lets you set audit policy on remote computers from the command line. Assuming that you have Domain Administrators authority and that the Server service is running on the workstations (it does by default), you can write a simple script that calls Auditpol once for each workstation. If the Server service isn't running, you can call Auditpol from the logon script if your users are members of the local Administrators group on their workstations (which isn't a good idea, by the way). Like any other program that sets audit policy, Auditpol requires you to be running with local Administrator privileges. Bear in mind that you might be able to use Tivoli if the Tivoli agent has Administrator authority on the workstations. (Windows 2000 completely solves this problem with Group Policy.) <br><br>
--Randy Franklin Smith</i>

Randy Franklin Smith August 10, 2000


I've enjoyed reading Randy Franklin Smith's articles about the Windows NT Security log (March through August 2000), but I have a question that I haven't been able to find an answer to. My network policy is not to audit workstations (i.e., auditing isn't turned on through User Manager). I want to turn on auditing, and I need to accomplish this task remotely. I have the ability to use a KiXtart script during logon, or I can use Tivoli to send a software package. Is there a way to handle this task remotely? I have more than 3600 workstations in a four-state area. Obviously, sneaker net isn't an option.

Fred Montney August 10, 2000


<i>I found the auditcat.hlp file in the Microsoft Windows NT Server 4.0 Resource Kit to be very informative. You also can learn a lot from searching the Microsoft Knowledge Base (http://support
.microsoft.com) and experimenting on your own. <br><br>
--­Randy Franklin Smith<i/>

Randy Franklin Smith September 14, 2000


I've been searching for books, articles, and vendor information about the Windows NT event logs. Randy Franklin Smith's articles about the NT Security log (March through August 2000) are especially useful in clarifying the meaning of a lot of the events I see every day in the Security log. Can you tell me other sources I can get my hands on to dive more deeply into this subject?<br><br>

Ed Ziots September 14, 2000


<br><br><i>Unfortunately, the user account doesn't maintain this information. Your only option is to catch all occurrences of event ID 624 in each domain controller's Security log. Event ID 624 identifies newly created user accounts.<br><br>
­--Randy Franklin Smith</i>

Randy Franklin Smith December 01, 2000


I'm trying to find a couple of thing. 1) what event number will tell me when a users has entered a bad password? I know 529 will but it also shows up under other actions. What about 675? 2) What is a good tool to report on the Security log? I need a could of all bad password by user and then a listing of each. Something automated.

morgandoyle June 15, 2007 (Article Rating: )


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
Command Prompt Tricks

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

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


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 WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

7 Ways To Get More From Your SharePoint Deployment Now

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