SearchAvailableExe is a comprehensive security research tool designed to identify and analyze DLL hijacking vulnerabilities in Windows executable files. This tool systematically scans signed executables to find potential DLL hijacking opportunities, making it valuable for security researchers, penetration testers, and system administrators.
- Automated Scanning: Recursively scans directories or entire drives for signed executable files
- DLL Dependency Analysis: Analyzes import tables to identify DLL loading patterns
- Vulnerability Testing: Tests executables for actual DLL hijacking vulnerabilities
- Comprehensive Filtering: Advanced filtering options based on various criteria
- Digital signature verification for legitimate executables
- Static and dynamic DLL loading detection
- Write permission analysis for hijacking feasibility
- System DLL identification and filtering
- Comprehensive section scanning for dynamic loading patterns
- GUI/Console application classification
- Windows operating system
- Visual Studio 2022
- Administrator privileges (recommended for comprehensive scanning)
- Clone or download the repository
- Open
SearchAvailableExe.slnin Visual Studio - Select your target configuration (Debug/Release, x86/x64)
- Build the solution (Ctrl+Shift+B)
# Scan current directory
SearchAvailableExe.exe -i "C:\Program Files"
# Scan with output to file
SearchAvailableExe.exe -i "C:\Windows\System32" -o results.txt
# Scan all drives (requires administrator privileges)
SearchAvailableExe.exe| Option | Long Form | Description | Default |
|---|---|---|---|
-h |
--help |
Display help message and exit | - |
-i |
--input <path> |
Input directory to scan | All drives |
-o |
--output <path> |
Output file for results | Console output |
-w |
--write |
Only include writable directories | Disabled |
-c |
--count <number> |
Maximum DLL count to consider | 1 |
-b |
--bit <arch> |
Target architecture (32, 64, or 96 for both) | 96 |
-s |
--save |
Save exploitable files to disk | Disabled |
-l |
--load <type> |
DLL loading method (1=static, 2=dynamic, 3=both) | 3 |
-p |
--pass |
Skip system DLLs in results | Disabled |
-a |
--search <mode> |
Enable comprehensive section scanning | Disabled |
-g |
--guiwindow |
Only include GUI applications | Disabled |
# Scan for 64-bit executables with writable directories
SearchAvailableExe.exe -i "C:\Program Files" -b 64 -w -o x64_results.txt
# Find executables with static DLL loading only
SearchAvailableExe.exe -i "C:\Windows" -l 1 -c 2
# Comprehensive scan with all options
SearchAvailableExe.exe -i "C:\" -w -g -p -a 1 -s -o comprehensive_scan.txtThe tool generates detailed reports including:
=== DLL Hijacking Vulnerability Scan Results ===
Found 15 exploitable executables:
Exploitable Executable: C:\Program Files\Example\app.exe
Architecture: 64-bit | Writable Directory: Yes | DLL Loading: Static | Subsystem: GUI
Exploitable DLL: example.dll
Additional DLLs required:
helper.dll
utility.dll
---------------------------------------------------
- Exploitable Executable: Full path to the vulnerable executable
- Architecture: 32-bit or 64-bit executable
- Writable Directory: Whether the directory has write permissions
- DLL Loading: Static (import table) or Dynamic (LoadLibrary calls)
- Subsystem: GUI (windowed) or Console application
- Exploitable DLL: The DLL that can be hijacked
- Additional DLLs: Other DLLs that may need to be present
- File Discovery: Recursively scans directories for
.exefiles - Signature Verification: Validates digital signatures using Windows Crypto API
- PE Analysis: Parses Portable Executable headers and import tables
- DLL Enumeration: Identifies imported DLLs and dynamic loading patterns
- Vulnerability Testing: Creates test environment and attempts DLL hijacking
- Result Filtering: Applies user-specified filters and criteria
The tool identifies two types of DLL loading:
- Analyzes PE import table for DLL dependencies
- Checks for DLL files in the same directory as the executable
- Identifies missing DLLs that could be hijacked
- Scans executable sections for LoadLibrary calls
- Searches for DLL name strings in
.rdataand.rsrcsections - Supports comprehensive section scanning for thorough analysis
Access Denied Errors
- Run as Administrator for system directory scanning
- Ensure antivirus software isn't blocking the tool
No Results Found
- Verify target directory contains signed executables
- Check filtering criteria (architecture, DLL count, etc.)
- Try scanning with less restrictive filters
For troubleshooting, the tool provides:
- Progress indicators during scanning
- Error messages for file access issues
- Detailed filtering information in verbose mode
This tool is provided "as is" without warranty of any kind. The authors are not responsible for any damage or legal issues that may arise from the use of this software. Use at your own risk and responsibility.
- Complete rewrite with improved code structure
- Better error handling and user feedback
- Improved command line interface
- Comprehensive filtering options
- Initial release with basic functionality
- Basic DLL hijacking detection