Filling Windows XP Security Event Log

2019-07-25 02:26发布

问题:

I am in need of filling the Windows Security Event Log to a near full state. Since write access to this log is not possible, could anybody please advise as to an action that could be programatically performed which would add an entry to this log? It does not need to be of any significance as long as it gives an entry (one with the least overhead would be desired as it will need to be executed thousands of times).

This is needed purely for testing purposes on a testing rig, any dirty solution will do. Only requirement is that it's .NET 2.0 (C#).

回答1:

You can enable all the security auditing categories in local security policy (secpol.msc | Local Policies | Audit Policy). Object access tends to give plenty of events. Enabling file access auditing, then set audit for everyone on some frequently accesses files and folders will also generate lots of events.

And that's normal usage, and that includes any programmatic access to those resources being audited (its all programmatic in the end, just someone else's program).



回答2:

  1. Enable Login Auditing as Richard mentioned above. Success or Failure is dependent upon how you handle step 2:
  2. Use LoginUser to impersonate a local user on the system - or FAIL to impersonate that local user on the system. Tons of samples via good for viable C# implementations.
  3. Call in a tight loop, repeatedly.

Another approach you can take involves engaging object access, and doing a large number of file or register I/O operations. This will also cause the log to fill out completely in an extremely short period of time.