Reminders

Windows Event Log - Rules Expression Editor Help

13 months ago
OfflineLuke Draper
Luke Draper

I am struggling with the Rules Expression Editor and Windows Event Logs

I can't seem to get the syntax right to log ONLY RDP Logon/Logoff events

I have the event IDs correct, when I apply my passive monitor it works, but I want I only want to get events with the words "Logon Type: 10" in the event, this means that it is a RDP session.

Conditions are Event ID = 4624 Or Event ID = 4634, this works fine, as soon as I add (Logon Type:10) to the expression editor I get no events, my expression is obviously wrong

I have scoured the Internet looking for examples, the only one I found on the WUG FAW was this

http://whatsupgold.force.com/kb/articles/FAQ/How-To-Create-a-Passive-Monitor-that-ignores-Windows-Event-Log-events-with-specific-Description-text-strings-1307717774177?retURL=%2Fapex%2FknowledgeSearch&popup=false

but I can't make it work

 

Any help is greatly appreciated

 

Luke

-----
You liked this too0 people like this discussion.
 
Concluded

1 Conclusion:

OfflineJason Alberino Jason Alberino said 13 months ago

Oh okay. I believe I see the problem. After Logon Type: there are a number of space, you need this to match the amount shown in the event. So, you will need to use something like what I attached -- just copy and paste the event into notepad, then copy and paste the "Logon Type:                              10" (or however many spaces) into the Rules Expression editor. Since it doesn't see those spaces, it's not processing the event properly.

21 Replies

OfflineJason Alberino Jason Alberino said 13 months ago

Luke,

Try using just Logon Type:10 with the ( ) and then test the experssion with an example from the event log. Example:

rules_expression.jpg


OfflineLuke Draper Luke Draper said 13 months ago

Jason, thanks for the reply however I have tried this. In fact I made some progress but only on server 2k3. The above event IDs are for Server 2k8.

The logon event for 2k3 is 528, and RDP is Logon Type:10 in the description. If I do a Description = Logon Type:10 without using an expression it works perfectly. However using the same method with the Server 2008 Event IDs doesn't work. I think it's because in Server 2008 there is no longer a "Description". I have tried various expressions like

Logon Type:10, LogonType (10), (Logon Type:)(10), etc. When I do an express test some of them seem to resolve properly but the events never come through. Also, if I use the expressions "Logon Type:" without the quotes all logon types come through, if I put a number at the end like Logon Type:3, which is most of the events I don;t want to see, the events stop coming through. It must have something to do with Server 2008 and how it passes events?

I appreciate the help Jason


OfflineJason Alberino Jason Alberino said 13 months ago

Luke,

Most of my servers are Windows Server 2008 R2 and I get the descriptions just fine. So, that should not be a problem. Would you be able to paste an example of the event you're trying to match the experssion on? (Omit any text for security reasons as you see fit)


OfflineLuke Draper Luke Draper said 13 months ago

Event 4624

 

An account was successfully logged on.

Subject:  Security ID:  SYSTEM  Account Name:  NOC-XX$  Account Domain:  XXXXXXX  Logon ID:  0x3e7

Logon Type:   10

New Logon:  Security ID:  xxxxxxx\xxxxxxx  Account Name:  XXXXXX  Account Domain:  XXXXXXXX  Logon ID:  0xbd25d20  Logon GUID:  {98762a3d-a8b0-a3d8-6ef2-3c9f113da824}

Process Information:  Process ID:  0x1808  Process Name:  C:\Windows\System32\winlogon.exe

Network Information:  Workstation Name: NOC-XX  Source Network Address: 10.0.0.10  Source Port:  16753

Detailed Authentication Information:  Logon Process:  User32  Authentication Package: Negotiate  Transited Services: -  Package Name (NTLM only): -  Key Length:  0


OfflineJason Alberino Jason Alberino said 13 months ago

Oh okay. I believe I see the problem. After Logon Type: there are a number of space, you need this to match the amount shown in the event. So, you will need to use something like what I attached -- just copy and paste the event into notepad, then copy and paste the "Logon Type:                              10" (or however many spaces) into the Rules Expression editor. Since it doesn't see those spaces, it's not processing the event properly.

Attachments

 

OfflineLuke Draper Luke Draper said 13 months ago

I just tried this as an expression and as a condition after Event ID = 4624, no luck, as soon as I remove the number 10 within the expression then all 4624 events come through


OfflineLuke Draper Luke Draper said 13 months ago

So if I replace the 10 with a 3 then all the Logon Type:3 events come through but only if there are the spaces. If I put in a 10 with spaces, nothing


OfflineJason Alberino Jason Alberino said 13 months ago

Would you kindly post a screenshot of your config for this?


OfflineLuke Draper Luke Draper said 13 months ago

seems to be working now, no idea why, however the spaces are needed, thanks for the help Jason, greatly appreciated


OfflineJason Alberino Jason Alberino said 13 months ago

Good to hear. I was just going to give you these: http://technet.microsoft.com/en-us/library/cc787567(v=ws.10).aspx

Leave it to Microsoft to put in a ridiculous amount of spaces between those two things :-)


OfflinePaul Byers Paul Byers said 13 months ago

@Luke what did you do to get it working.  I was testing it as well trying to figure it out.  I seem to be having the same problem, it never triggers.  even cut and pasted thelogon type: .. 10 from the event log itself and it still does not trigger.


OfflineLuke Draper Luke Draper said 13 months ago

4-16-2012 9-14-55 AM.png

4-16-2012 9-15-17 AM.png

Hi Paul, all I did was copy and paste the Logon Type: 10 with all the spaces


OfflinePaul Byers Paul Byers said 13 months ago

Yep I did the exact same thing but set it for Event ID 4624 for Windows 2008.  And I have yet to have it trigger


OfflineJason Alberino Jason Alberino said 13 months ago

For Windows 2008, this worked for me:

logontype.JPG


OfflineJason Alberino Jason Alberino said 13 months ago

Example e-mail I received:

Event Type: Audit Success
Event Source: Microsoft-Windows-Security-Auditing
Event Category: Logon
Event ID: 4624
User: Not specified
Computer: <hostname>
Description:An account was successfully logged on.

Subject:
Security ID: <SID>
Account Name: hostname$
Account Domain: domain

Logon ID: 0x3e7

Logon Type: 10

New Logon:
Security ID: <SID>
Account Name: <username>
Account Domain: <domain>
Logon ID: <loginID>
Logon GUID: <GUID>

Process Information:
Process ID: <PID>
Process Name: C:\Windows\System32\winlogon.exe

Network Information:
Workstation Name: <hostname>
Source Network Address: <Source IP>
Source Port: <Source Port>

Detailed Authentication Information:
Logon Process: User32
Authentication Package: Negotiate
Transited Services: -
Package Name (NTLM only): -
Key Length: 0

This event is generated when a logon session is created. It is generated on the computer that was accessed.

The subject fields indicate the account on the local system which requested the logon. This is most commonly a service such as the Server service, or a local process such as Winlogon.exe or Services.exe.

The logon type field indicates the kind of logon that occurred. The most common types are 2 (interactive) and 3 (network).

The New Logon fields indicate the account for whom the new logon was created, i.e. the account that was logged on.

The network fields indicate where a remote logon request originated. Workstation name is not always available and may be left blank in some cases.

The authentication information fields provide detailed information about this specific logon request.
- Logon GUID is a unique identifier that can be used to correlate this event with a KDC event.
- Transited services indicate which intermediate services have participated in this logon request.
- Package name indicates which sub-protocol was used among the NTLM protocols.
- Key length indicates the length of the generated session key. This will be 0 if no session key was requested.


OfflinePaul Byers Paul Byers said 13 months ago

I think I figured out why the event is not triggering in WUG.  WUG looks to not recieve any log events from the 2008 server even with the firewall turned off.  Now to troubleshoot that issue.


OfflinePaul Byers Paul Byers said 13 months ago

Strange.  Even the the firewall was turned off on the WUG server the service was still running.  This caused the problem.  Stopped the firewall service and the event logs started triggering.


Would you like to comment?

You must be a member. Sign In if you are already a member.

  • 1,053 views
  • 1 version
  • 21 replies
  • 4 followers
     
Post Date:
April 9, 2012
Posted By:
Luke Draper

Related Content

Search this area

About this forum

  • 142k views
  • 2222 topics
  • 55 followers
     

Post questions and find answers for all things related to the Standard and Premium Editions of WhatsUp gold.


Viewed 1,053 times