eventlog performance

eventlog performance

Secure Home | Search | About
 Microsoft Applications Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
eventlog performance kevin 03-22-2007
Posted by kevin on March 22, 2007, 8:00 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
Hi,

Does anyone here know whether high volume logging (e.g., to the
Security eventlog under brute-force password attack) can result in
events being lost?

I understand that events may be overwritten etc, but I am not
interested in those.

Any info or links very welcome.

Thanks,
Kevin


Posted by on March 23, 2007, 6:26 am
If you were  Registered and logged in, you could reply and use other advanced thread options
> Does anyone here know whether high volume logging (e.g., to the
> Security eventlog under brute-force password attack) can result in
> events being lost?

The answer depends upon how the event log is configured. There are
three options by default: overwrite as needed, overwrite after so many
days, and do not overwrite. If you are using the first option, then
events most certainly will be lost. If the second, well, events may be
lost if they are older. No events will be lost if you are not
overwriting.

Now, when to overwrite also depends upon the event logs filling up.
The maximum size for a log is 4 GB. The default for the Security Log
in Windows 2003 is 16 MB. If you are concerned about the logs being
overwritten, expand this log file so that there is more room.

There is also the option to shut down the system when the security log
fills. This is useful in situations such as brute force attacks, where
you want to take the computer offline to protect itself. The downside
here is that this allows for a denial of service.

The policy option is: Security Settings > Audit: Shut down system
immediately if unable to log security audits. If you choose to use
this, set the Security log to not overwrite, expand the log size, and
keep a close eye on it.

Regards,

J Wolfgang Goerlich


Posted by Roger Abell [MVP] on March 23, 2007, 2:46 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
I see where you are coming from Kevin, and it sounds like a
valid potential. All I have to say is that I have never heard
of anyone reporting "lost" events due to loading.

> Hi,
>
> Does anyone here know whether high volume logging (e.g., to the Security
> eventlog under brute-force password attack) can result in events being
> lost?
>
> I understand that events may be overwritten etc, but I am not interested
> in those.
>
> Any info or links very welcome.
>
> Thanks,
> Kevin
>



Posted by on March 26, 2007, 8:01 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Roger Abell [MVP] wrote:
> I see where you are coming from Kevin, and it sounds like a
> valid potential. All I have to say is that I have never heard
> of anyone reporting "lost" events due to loading.


Will Windows' logging miss events under high load situations? I
thought about this and performed the following test:

I created a test folder on a Windows 2003 server. On the NTFS folder,
I set full permissions and set an SACL that records any failure.
Within the folder, I created three test files. I set explicit
permissions such that I could read but not modify the files. I then
created a CIFS share wherein I had full access.

On this same server, I created an Example user and set the password. I
made sure the Example user was a member of the same groups as I, and
that it had the same permissions to the shared files.

I used four Windows clients. On the first three, I ran a script that
opened the test file and attempted to write data. Each client had its
own test file and I modified the script accordingly. This script was
"testwrite.vbs" and I have listed it below. It attempts to write 1000
times.

On the forth Windows client, I ran a script that attempts to map a
network drive to the Server using the Example user's credentials. I
put in the wrong password, thus in part simulating a brute-force
password attack.

Back on the Windows server, I cleared the security log. I then
executed all four scripts simultaneously. This generates some 5,000
events in a couple of minutes. Would the Windows server drop any of
these events?

I validated the number of events using the testresults.vbs script.
This counts the events by Event ID and gives a report. There were
3,000 failed file access events. There were 2 bad password events,
followed by 998 account locked out events, with a total of 1,000
failed logon messages. All 5,000 events were captured.

I ran this test several times and never saw an event drop. I am
including the scripts below so that you can test this in your own
environment.

Regards,

J Wolfgang Goerlich

--------------------------------------------------------------------------------
' testwrite.vbs

On Error Resume Next

' Constants

Const ForWriting = 2
Const UncTestPath = "\Server\Testshare"
Const MapTestFile = "testfile1.txt" ' Client 1 uses Test 1, Client 2
uses Test 2, etc


' Dimension Variables

Dim oLog ' Log text file
Dim oNet ' Network
Dim oNTFS ' File System


' Instantiate the objects

Set oNet = CreateObject("WScript.Network")
Set oNTFS = CreateObject("Scripting.FileSystemObject")


For X = 1 to 1000

' Map a network drive

oNet.RemoveNetworkDrive "X:"
oNet.MapNetworkDrive "X:", UncTestPath


' Open the file

Set oLog = oNTFS.OpenTextFile("X:\" & MapTestFile, ForWriting, True)
oLog.WriteLine "Depending on this file's ACL, this write will
generate an error." + VbCrlf


' Done, clean up

oLog.Close
Set oLog = Nothing
oNet.RemoveNetworkDrive "X:"

Next

MsgBox "Done!"

--------------------------------------------------------------------------------
' testlogin.vbs

On Error Resume Next

' Constants

Const ForWriting = 2
Const UncTestPath = "\Server\Testshare"
Const Username = "Server\Example"
Const Password = "NoSecretNow"

' Dimension Variables

Dim oNet ' Network

' Instantiate the objects

Set oNet = CreateObject("WScript.Network")
Set oNTFS = CreateObject("Scripting.FileSystemObject")


For X = 1 to 1000

' Map a network drive

' Using the wrong password will throw:
' Error: Logon failure: unknown user name or bad password.
' Code: 8007052E
' Source: WSHNetwork.MapNetworkDrive

oNet.MapNetworkDrive "X:", UncTestPath, , Username, Password
oNet.RemoveNetworkDrive "X:"

Next

MsgBox "Done!"

--------------------------------------------------------------------------------
' testresults.vbs

Const Computer = "."
Const FailedFileAccess = 560
Const FailedLogon = 680
Const AccountLockedOut = 539
Const BadPassword = 529

' Event Type: Failure Audit
' Event Source: Security
' Event Category: Object Access
' Event ID: 560
' Description:
' Object Open:
' Object Server: Security
' Object Type: File

' Event Type: Failure Audit
' Event Source: Security
' Event Category: Account Logon
' Event ID: 680
' Description:
' Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0

' Event Type: Failure Audit
' Event Source: Security
' Event Category: Logon/Logoff
' Event ID: 539
' Description:
' Logon Failure:
' Reason: Account locked out

' Event Type: Failure Audit
' Event Source: Security
' Event Category: Logon/Logoff
' Event ID: 529
' Description:
' Logon Failure:
' Reason: Unknown user name or bad password

FailedFileAccessCount = 0
FailedLogonCount = 0
AcountLockedOutCount = 0
BadPasswordCount = 0

Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate,
(Security)}!\" & Computer & "\root\cimv2")
Set oEvents= oWMI.ExecQuery("Select * from Win32_NTLogEvent Where
Logfile = 'Security'",,48)

On Error Resume Next
For Each oRecord in oEvents

Select Case oRecord.EventIdentifier
Case FailedFileAccess
        FailedFileAccessCount = FailedFileAccessCount + 1

Case FailedLogon
        FailedLogonCount = FailedLogonCount +1

Case AccountLockedOut
        AcountLockedOutCount = AcountLockedOutCount + 1

Case BadPassword
        BadPasswordCount = BadPasswordCount + 1

Case Else

End Select

Next

Results = _
"Failed File Access (" & FailedFileAccess &") = " _
& FailedFileAccessCount & Vbcrlf & _
"Failed Logon (" & FailedLogon & ") = " _
& FailedLogonCount & Vbcrlf & _
"Account Locked Out (" & AccountLockedOut & ") = " _
& AcountLockedOutCount & Vbcrlf & _
"Bad Password (" & BadPassword & ") = " _
& BadPasswordCount

MsgBox Results

--------------------------------------------------------------------------------


Posted by Roger Abell [MVP] on March 26, 2007, 10:54 am
If you were  Registered and logged in, you could reply and use other advanced thread options

Interesting Wolfgang.

I believe that a much higher load would be needed in order
to really stress the logging process. Filesystem access logging
is however probably the most likely to cause issues as this does
load the I/O subsystem doubly hard.

My own feeling is that if dropping of events were an issue, then
there surely would have been some noise about this. In fact, this
post is the first time I have ever seen the potential even discussed.

Roger

> Roger Abell [MVP] wrote:
>> I see where you are coming from Kevin, and it sounds like a
>> valid potential. All I have to say is that I have never heard
>> of anyone reporting "lost" events due to loading.
>
>
> Will Windows' logging miss events under high load situations? I
> thought about this and performed the following test:
>
> I created a test folder on a Windows 2003 server. On the NTFS folder,
> I set full permissions and set an SACL that records any failure.
> Within the folder, I created three test files. I set explicit
> permissions such that I could read but not modify the files. I then
> created a CIFS share wherein I had full access.
>
> On this same server, I created an Example user and set the password. I
> made sure the Example user was a member of the same groups as I, and
> that it had the same permissions to the shared files.
>
> I used four Windows clients. On the first three, I ran a script that
> opened the test file and attempted to write data. Each client had its
> own test file and I modified the script accordingly. This script was
> "testwrite.vbs" and I have listed it below. It attempts to write 1000
> times.
>
> On the forth Windows client, I ran a script that attempts to map a
> network drive to the Server using the Example user's credentials. I
> put in the wrong password, thus in part simulating a brute-force
> password attack.
>
> Back on the Windows server, I cleared the security log. I then
> executed all four scripts simultaneously. This generates some 5,000
> events in a couple of minutes. Would the Windows server drop any of
> these events?
>
> I validated the number of events using the testresults.vbs script.
> This counts the events by Event ID and gives a report. There were
> 3,000 failed file access events. There were 2 bad password events,
> followed by 998 account locked out events, with a total of 1,000
> failed logon messages. All 5,000 events were captured.
>
> I ran this test several times and never saw an event drop. I am
> including the scripts below so that you can test this in your own
> environment.
>
> Regards,
>
> J Wolfgang Goerlich
>
>
--------------------------------------------------------------------------------
> ' testwrite.vbs
>
> On Error Resume Next
>
> ' Constants
>
> Const ForWriting = 2
> Const UncTestPath = "\Server\Testshare"
> Const MapTestFile = "testfile1.txt" ' Client 1 uses Test 1, Client 2
> uses Test 2, etc
>
>
> ' Dimension Variables
>
> Dim oLog ' Log text file
> Dim oNet ' Network
> Dim oNTFS ' File System
>
>
> ' Instantiate the objects
>
> Set oNet = CreateObject("WScript.Network")
> Set oNTFS = CreateObject("Scripting.FileSystemObject")
>
>
> For X = 1 to 1000
>
> ' Map a network drive
>
> oNet.RemoveNetworkDrive "X:"
> oNet.MapNetworkDrive "X:", UncTestPath
>
>
> ' Open the file
>
> Set oLog = oNTFS.OpenTextFile("X:\" & MapTestFile, ForWriting, True)
> oLog.WriteLine "Depending on this file's ACL, this write will
> generate an error." + VbCrlf
>
>
> ' Done, clean up
>
> oLog.Close
> Set oLog = Nothing
> oNet.RemoveNetworkDrive "X:"
>
> Next
>
> MsgBox "Done!"
>
>
--------------------------------------------------------------------------------
> ' testlogin.vbs
>
> On Error Resume Next
>
> ' Constants
>
> Const ForWriting = 2
> Const UncTestPath = "\Server\Testshare"
> Const Username = "Server\Example"
> Const Password = "NoSecretNow"
>
> ' Dimension Variables
>
> Dim oNet ' Network
>
> ' Instantiate the objects
>
> Set oNet = CreateObject("WScript.Network")
> Set oNTFS = CreateObject("Scripting.FileSystemObject")
>
>
> For X = 1 to 1000
>
> ' Map a network drive
>
> ' Using the wrong password will throw:
> ' Error: Logon failure: unknown user name or bad password.
> ' Code: 8007052E
> ' Source: WSHNetwork.MapNetworkDrive
>
> oNet.MapNetworkDrive "X:", UncTestPath, , Username, Password
> oNet.RemoveNetworkDrive "X:"
>
> Next
>
> MsgBox "Done!"
>
>
--------------------------------------------------------------------------------
> ' testresults.vbs
>
> Const Computer = "."
> Const FailedFileAccess = 560
> Const FailedLogon = 680
> Const AccountLockedOut = 539
> Const BadPassword = 529
>
> ' Event Type: Failure Audit
> ' Event Source: Security
> ' Event Category: Object Access
> ' Event ID: 560
> ' Description:
> ' Object Open:
> ' Object Server: Security
> ' Object Type: File
>
> ' Event Type: Failure Audit
> ' Event Source: Security
> ' Event Category: Account Logon
> ' Event ID: 680
> ' Description:
> ' Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
>
> ' Event Type: Failure Audit
> ' Event Source: Security
> ' Event Category: Logon/Logoff
> ' Event ID: 539
> ' Description:
> ' Logon Failure:
> ' Reason: Account locked out
>
> ' Event Type: Failure Audit
> ' Event Source: Security
> ' Event Category: Logon/Logoff
> ' Event ID: 529
> ' Description:
> ' Logon Failure:
> ' Reason: Unknown user name or bad password
>
> FailedFileAccessCount = 0
> FailedLogonCount = 0
> AcountLockedOutCount = 0
> BadPasswordCount = 0
>
> Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate,
> (Security)}!\" & Computer & "\root\cimv2")
> Set oEvents= oWMI.ExecQuery("Select * from Win32_NTLogEvent Where
> Logfile = 'Security'",,48)
>
> On Error Resume Next
> For Each oRecord in oEvents
>
> Select Case oRecord.EventIdentifier
> Case FailedFileAccess
> FailedFileAccessCount = FailedFileAccessCount + 1
>
> Case FailedLogon
> FailedLogonCount = FailedLogonCount +1
>
> Case AccountLockedOut
> AcountLockedOutCount = AcountLockedOutCount + 1
>
> Case BadPassword
> BadPasswordCount = BadPasswordCount + 1
>
> Case Else
>
> End Select
>
> Next
>
> Results = _
> "Failed File Access (" & FailedFileAccess &") = " _
> & FailedFileAccessCount & Vbcrlf & _
> "Failed Logon (" & FailedLogon & ") = " _
> & FailedLogonCount & Vbcrlf & _
> "Account Locked Out (" & AccountLockedOut & ") = " _
> & AcountLockedOutCount & Vbcrlf & _
> "Bad Password (" & BadPassword & ") = " _
> & BadPasswordCount
>
> MsgBox Results
>
>
--------------------------------------------------------------------------------
>



Similar ThreadsPosted
Eventlog Warning !!! October 31, 2006, 9:59 am
Eventlog showing unsuccesfull Login but not which user is trying October 29, 2008, 6:31 am
Measuring performance October 25, 2005, 11:15 pm
Problems with the efs performance June 19, 2006, 9:42 pm
Slow performance September 12, 2008, 10:38 am
Certificate Services Performance --- August 1, 2005, 10:24 am
Antigen slow performance July 14, 2008, 12:00 pm
Windows XP Pro x64 Performance Monitoring Permissions July 23, 2007, 11:27 am
SSL VPN:Poor performance & memory resources August 9, 2007, 1:44 am
Md5 vs. Sha1 Performance - Upgrade Cryptographic Provider? March 30, 2007, 9:22 am

The site map in XML format XML site map

Contact Us | Privacy Policy