Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

January 17, 2001 12:00 AM

Tracking Logon and Logoff Activity in Win2K

Windows IT Pro
InstantDoc ID #16430
Rating: (0)
What's new and what's not in the Security log

My series about the Windows NT Security log generated more feedback than any other articles I've written. (For a list of the articles in that series, see "Related Articles in Previous Issues," page 84.) I received many requests to write a similar series about the Windows 2000 Security log. Although Win2K retains most of NT's audit-policy and Security-log functionality, the new OS introduces several changes and many new capabilities, including some exciting developments in one of the Security log's most important areas: tracking logon and logoff activity.

Accessing the Security Log
To access the Security log and determine a system's current log settings, use Event Viewer: Click Start, Programs, Administrative Tools, Event Viewer. The interface has changed a little from the NT interface because Win2K's Event Viewer, which Figure 1, page 84, shows, is a Microsoft Management Console (MMC) snap-in. Therefore, you can create custom consoles—for example, you can add a copy of the Event Viewer snap-in for each system you need to monitor. (For information about customizing Win2K MMC snap-ins, see Kathy Ivens, Getting Started with Windows 2000, "The Mighty Win2K Microsoft Management Console, Part 1," September 2000.)

To filter, save, sort, or clear a system's Security log, open the Event Viewer snap-in, right-click the desired log, and choose an action from the context menu. You can configure an event log's maximum size and retention settings through the log's Properties dialog box, but I recommend against configuring your event logs this way if your system is a member of an Active Directory (AD) domain. Instead, use domain- or organizational unit- (OU-) level Group Policy Objects (GPOs) in the MMC Active Directory Users and Computers snap-in.

In Win2K, Group Policy centrally controls event-log settings—as it does most areas of Win2K. This arrangement fixes NT's inconvenient requirement to configure each system separately. To help you centralize settings configuration, Group Policy offers a variety of options, including GPOs that link to OUs. Using Group Policy, you can configure multiple systems simultaneously with the same event-log settings. For example, to configure all the systems in your domain to have a maximum Security-log size of 1024KB, open the Active Directory Users and Computers snap-in, open your domain's Properties dialog box, and go to the Group Policy tab. Select the Default Domain Policy GPO, and click Edit. In the resulting window's left pane, go to Computer Configuration, Windows Settings, Security Settings, Event Log, Settings for Event Log, as you can see in Figure 2. Right click Maximum security log size, select Security, define a log size of 1024KB, and then click OK. (For more information about Win2K Group Policy and GPOs, see "Controlling Group Policy, Part 1," November 2000, and "Controlling Group Policy, Part 2," Winter 2000.)

Activating Audit Policy
You won't see Security-log events until you activate the system's audit policy, which Group Policy also controls in Win2K. To specify a standard audit policy for every system in your domain, you can again edit the Default Domain Policy GPO. Open the edit window for the Default Domain Policy GPO, but this time maneuver to Computer Configuration, Windows Settings, Security Settings, Local Policies, Audit Policy. Right-click an audit category and select Security, then define the policy setting to audit for the success or failure of that category's event.

When Win2K applies Group Policy, Win2K creates a composite of all the GPOs that link to a computer's site, domain, and OUs. When you use the Active Directory Users and Computers snap-in to browse GPOs, you can easily miss settings. To accurately determine a system's current audit policy, open the MMC Local Security Policy snap-in and go to Security Settings, Local Policies, Audit Policy, which Figure 3 shows. This snap-in's Local Setting column shows you the system's local GPO settings, which are the least influential GPOs. More important, the Effective Setting column shows you the system's current settings after Win2K applies all relevant GPOs. Win2K includes three new categories: Audit logon events, Audit account logon events, and Audit directory service access. (For information about these new categories, see the sidebar "New Audit Categories.") You can use the Audit logon events category to track local logon events in the same way you use NT's Logon and Logoff category; the other new categories apply to domain controllers (DCs).

Successful Logons
Win2K uses the Audit logon events category when a user logs on interactively (i.e., at the local keyboard and screen) or remotely (i.e., from over the network). The Logon Type field in the event's description contains a number that specifies the logon's nature: interactive (2), network (3), batch (4), service (5), unlocked workstation (7), network logon using a cleartext password (8), or impersonated logons (9).

As in NT, event ID 528, which Figure 4, page 86, shows, describes a successful logon. However, whereas NT used event ID 528 for every type of logon, Win2K uses a different event ID for network logons. When you map a drive to a server, connect to the server's registry, or otherwise perform a network logon, Win2K logs the new event ID 540, which Figure 5, page 86, shows. This new event is useful because it lets you separate network logons from other logon types. (I'd like Microsoft to create a separate event for the other important logon type: interactive logons.)

Win2K logs a lot of irrelevant event ID 540 occurrences. To distinguish these events from relevant events, look at the event's User Name field, which will be either a normal user account, SYSTEM, or a computer name ending with the dollar sign ($) character. A normal user account notifies you that a user logged on to the system from over the network; you want to pay attention to these events. You can ignore events in which the User Name is SYSTEM, which indicates that one system service was connecting to another service on the same system. You can also discount events in which the User Name is a computer followed by the $ character, which means that the system services on a remote system are connected to the system services on this system. (For example, when a Win2K Professional workstation starts up, it connects to the DC for AD information and other domain services. To access these domain services, the workstation must first authenticate itself to the DC.)

The Domain field in event ID 528 and event ID 540 identifies the domain on which the user's account resides. This field uses the pre-Win2K NetBIOS domain name rather than the DNS version of the domain name. If a user uses a local account in a system's local SAM to log on to that system, the event's Domain field will reflect the computer's NetBIOS name. You won't often see local user account logons in a domain environment; however, attackers like to target local SAM accounts—especially the Administrator account—so keep an eye out for event ID 528 or event ID 540 occurrences in which the Domain field matches the Computer field.

Event ID 540's Logon Process and Authentication Package fields let you determine which authentication protocol Win2K used when the user connected to the system. When a user connects to a Win2K system from over the network, Win2K negotiates the use of one of two possible authentication protocols: NT LAN Manager—NTLM—or Kerberos. Identifying systems that aren't using Kerberos is important: Those systems are more vulnerable to attack because NTLM is weaker than Kerberos.

Related Content:

ARTICLE TOOLS

Comments
  • Jason Bennett
    9 years ago
    Jan 10, 2003

    "If you find some NTLM logons, you can look at the event's Workstation Name field to determine the client computer's NetBIOS name. (This field is blank when Windows 2000 uses Kerberos.)"

    My question is, what if you want to be able to see what workstation a user logs on at on the network, when they authenticate via Kerberos? (a very important piece of information if a system gets hacked or damaged by a successfully authenticated user SOMEWHERE on your network)

    How can we restore the functionality in 2000 of seeing the source workstation name of succesful and failed logon/logoff events that we are so used to in NT4!?

    Our auditors required this functionality.

    I think it is ironic how Microsoft says they made it easier to track security info without looking at event logs all over your network by implementing "Account Logon Events", but then BREAK the source workstation information of Logon/Logoff events.

  • Matt Brainerd
    10 years ago
    Dec 05, 2002

    Auditing...it's for security and accountibility (obviously NOT for spelling) NOT to track an employees time-on-the-job. The add-on that does do this is call a Time Clock.

    ...cheap shot, I know. But I've often heard clients, once they've gotten an overview (regarding GPOs, Auditing , or some other feature) try to wrangle one element/feature into a complete solution for which a NOS isn't intended. Saving money is good, no doubt. But it is always wise to use "[...the right tool for the job.]"

  • tom baumgratz
    10 years ago
    Aug 08, 2002

    An interesting article. What about something that really works though? Looking to track logon and logoff activity and Win2K just doesnt cut it. I need something that will generate a report when a user comes in in the morning and logs off at night. All of these audit features track way to much background authentication and the log itself gets so big that we end up losing info. This is going to be huge for someone who can make this foolproof for hr departments.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.