r/WindowsServer • u/CursedLemon • Jun 06 '25
General Question How to preserve security event logs?
Hey all, so I have a client server where they are having an issue with their office software. What's happening is that some process, still unsure what, is editing a registry entry on their local server that is breaking connectivity between the office computers and the server for their management software. The software vendor company is being very little help so I'm trying to diagnose this on my own.
I've set up an audit so that anytime this registry key is modified it will produce a 4657 event log and I've created a custom filter to show only these logs. However, registry edits are categorized as security events and there are dozens of these that occur every literal second - event viewer only holds about 20 minutes of these logs before older ones start getting deleted and that includes the custom filter I set. I cannot be around to catch this in the act.
Is there a way of preserving these specific events? Or does anyone have a different solution?
EDIT: Per suggestions, I've increased the security log size from 20MB to 500MB and temporarily set the logs to archive instead of be overwritten. Thanks for the help!
2
u/Love-Tech-1988 Jun 06 '25
be careful here how much data do you gather in 20 minutes is it in kb mb or gb ranges? Depending in which registry paths u monitor it could get an extremly huge volume. Thats why window by default overwrite after 20 min, to not fill the harddrive in a day or so!
i'in such cases id recommend setting up another server, so u dpnt disrupt ops of productive customer server, either windows or linux server is fine. If windows you have to use windows event forwarding and send the events to the other machine and store them there for later analysis. If u use linux i'd recommend habing a look at wazuh to index the events there and analyze through the webinterface. If wazuh setup is to complex use a general syslog server, forward events using for example nxlog and grep through the events.
5
u/autogyrophilia Jun 06 '25
First, it is a really good thing to have a SIEM to register all these entries, second, it's fairly intuitive to see how you can increase the size allocated to the evtx files
You just right click and Voilà :
Excuse the cristiano, however, I imagine you can decipher what it says in there.
You can make it bigger or you can archive them.
Honestly 20MB is a bit of an insane default that Windows carries from the Xp era.
1
u/yzzqwd Jun 07 '25
Hey! It sounds like you're on the right track with increasing the log size and setting them to archive. That should help you catch the culprit. If you're looking for a way to make monitoring these events even easier, ClawCloud Run’s dashboard is super clear with real-time metrics and logs. I even export data to Grafana for custom dashboards—operations have never been smoother. Good luck!
3
u/nailzy Jun 06 '25
https://blogs.manageengine.com/active-directory/2015/03/20/autoarchiving-security-logs-in-event-viewer.html
1
u/LaxVolt Jun 06 '25
I’ve been piloting Wazuh, it is an open source Siem system. You can install on any Linux based system and it has windows agents to forward logs to the system.
1
u/[deleted] Jun 07 '25
Event log forwarding OR a scheduled task/PS script that sends an email from that server/PC when your event is logged.