-
-
Save avoidik/fd661646e41239a465d8d37109159d7a to your computer and use it in GitHub Desktop.
A quick script to check for vulnerable drivers. Compares drivers on system with list from loldrivers.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple script to check drivers in C:\windows\system32\drivers against the loldrivers list | |
# Author: Oddvar Moe - @oddvar.moe | |
$drivers = get-childitem -Path c:\windows\system32\drivers | |
$web_client = new-object system.net.webclient | |
$loldrivers = $web_client.DownloadString(" https://www.loldrivers.io/api/drivers.json") | ConvertFrom-Json | |
Write-output("Checking {0} drivers in C:\windows\system32\drivers against loldrivers.io json file" -f $drivers.Count) | |
foreach ($lol in $loldrivers.KnownVulnerableSamples) | |
{ | |
# Check for matching driver name | |
if($drivers.Name -contains $lol.Filename) | |
{ | |
#CHECK HASH | |
$Hash = Get-FileHash -Path "c:\windows\system32\drivers\$($lol.Filename)" | |
if($lol.Sha256 -eq $Hash.Hash) | |
{ | |
write-output("The drivername {0} is vulnerable with a matching SHA256 hash of {1}" -f $lol.Filename, $lol.SHA256) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment