Last active
November 13, 2023 11:12
-
-
Save p4yl0ad/2fa54d80f9055b68306acf0bfa0c147a to your computer and use it in GitHub Desktop.
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
$searchterm = "IID_IWSCProductList" | |
$dumpbinpath = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\Hostx64\x64\dumpbin.exe" | |
$x64_pathtosearch = "C:\Windows\System32\" | |
$x86_pathtosearch = "C:\Windows\SysWOW64\" | |
$stamp = (Get-Date).ToString("yyyy-mm-dd_HH-mm-ss") | |
$logpath = "C:\Users\user\Desktop\Initialize_hunt-$stamp.log" | |
foreach ($dllfullpath in (Get-ChildItem -Path $x64_pathtosearch -Recurse -ErrorAction SilentlyContinue -Include '*.dll' | select fullname)) { | |
$fullnamepath = $dllfullpath.Fullname; | |
echo "[i] x64 $fullnamepath" >> $logpath; | |
& "$dumpbinpath" /exports $fullnamepath | findstr /i $searchterm >> $logpath; | |
} | |
foreach ($dllfullpath in (Get-ChildItem -Path $x86_pathtosearch -Recurse -ErrorAction SilentlyContinue -Include '*.dll' | select fullname)) { | |
$fullnamepath = $dllfullpath.Fullname; | |
echo "[i] x86 $fullnamepath" >> $logpath; | |
& "$dumpbinpath" /exports $fullnamepath | findstr /i $searchterm >> $logpath; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment