r/PowerShell • • 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

8 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/the_lazy_sysadmin Oct 20 '26

We have the script set to run every 24 hours, and it will append to a log file, not overwrite it. So it will keep writing to it overtime, and it also includes the date at which it was entered into the event log as well. That way, if you STOP seeing something being touched on ever, you can look into whether or not it was an uninstall or upgrade to a piece of software at around the last time it was seen.