r/PowerShell • u/the_lazy_sysadmin • Oct 20 '26
Script Sharing EoL Dependency Auditing Script For Vulnerability Remediation Work
I've been doing a bit of vulnerability remediation work this past year or so, and I got tired of 'scream tests' across multiple environments, and was unable to affectively find a way to use something like Dependency Walker in a set-it-and-forget-it kind of way, so I built out the following:
https://github.com/cmcalgher/EoL-Dependency-Auditing
This will set the auditing-side of ACL's on specified .DLL files (configured in the CSV's), and will then allow you to parse through the last 24 hours of the security event log to pull instances of processes that touched/acted on those .DLLs.
When ran on individual machines, it will spit out a CSV with a handful of columns, that can be fed into whatever formatting/reporting you see fit.
Internally at the org I work for, we were pretty much immediately able to write off Visual C++ 2012 as accepted risk on our fully up to date on-prem Exchange SE servers, for example. Would Exchange keep working if we had ripped that off? Would we have to restore corrupted DBs? Not sure, but with how many Exchange processes were using those Visual C++ 2012 .DLL's, I'm glad I didn't have to find out.
The above was inspired by the following Microsoft article, detailing how to audit VC++ usage in coding projects:
https://learn.microsoft.com/en-us/cpp/windows/redist-version-auditing?view=msvc-170
View all comments
Show parent comment
1
u/the_lazy_sysadmin Oct 20 '26
Thank you for the feedback! Suggestions #1 and #2 are ones that I had already planned to go for when time permits. For suggestion #3 though, that is something I hadn't considered, as I assumed it would just see that the same ACE's were there, and just not apply them, or overwrite them I guess. I will look into all of these though, for sure!