| Crates.io | pdbwalker |
| lib.rs | pdbwalker |
| version | 1.0.0 |
| created_at | 2025-11-04 15:13:43.032132+00 |
| updated_at | 2025-11-04 15:13:43.032132+00 |
| description | Advanced PE binary scanner with PDB debug symbol detection and download capabilities |
| homepage | |
| repository | https://github.com/19h/pdbwalker |
| max_upload_size | |
| id | 1916380 |
| size | 110,461 |
pdbwalker is a command-line utility that recursively scans directories for Windows PE executables (.exe and .dll files) and provides detailed information about their debug symbols (PDB files). It parses PE debug directories to extract CodeView information (GUID, age, and PDB filename), checks for local PDB files, and optionally queries Microsoft's public symbol server to determine if symbols can be downloaded.
cargo install pdbwalker
Or build from source:
git clone https://github.com/19h/pdbwalker
cd pdbwalker
cargo build --release
# Scan a directory (shows all PE files with PDB info)
pdbwalker C:\Windows\System32
# Verbose output with detailed PE information
pdbwalker -v C:\Windows\System32
# Check remote PDB availability (requires network)
pdbwalker --check-remote C:\Windows\System32
# Filter to show only files with local PDBs
pdbwalker --local-only C:\MyProject\bin\Release
# Filter to show only files with remote PDB info
pdbwalker --remote-only C:\Windows\System32
# Download remote PDBs to output directory
pdbwalker --check-remote --download-remote -o ./symbols C:\Windows\System32
# Copy binaries AND download their PDBs
pdbwalker --check-remote --copy-binaries --download-remote -o ./analysis C:\Program Files\MyApp
# JSON output for scripting
pdbwalker --json C:\Windows\System32 > results.json
# Limit recursion depth
pdbwalker --max-depth 2 C:\Windows
# Follow symbolic links
pdbwalker --follow-symlinks C:\MyLinkedDirs
PDB Walker - PE Binary Scanner
==============================
Scanning directory: C:\Windows\System32
Found 3 PE binarie(s)
● Binary #1 (DLL)
Path: C:\Windows\System32\kernel32.dll
Size: 1.05 MB
Architecture: x64
Modified: 2024-03-15 14:32:10 UTC
Local PDB: ✓ Found
Path: C:\Windows\System32\kernel32.pdb
Remote PDB: ? Not checked
● Binary #2 (DLL)
Path: C:\Windows\System32\ntdll.dll
Size: 2.10 MB
Architecture: x64
Modified: 2024-03-15 14:32:10 UTC
Local PDB: ✗ Not found
Remote PDB: ✓ Available
File: ntdll.pdb
GUID: {1A2B3C4D-5E6F-7A8B-9C0D-1E2F3A4B5C6D}
Age: 1
Signature: 1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D1
URL: https://msdl.microsoft.com/download/symbols/ntdll.pdb/...
────────────────────────────────────────────────────────────
Summary
Total binaries: 3
With local PDB: 1
With PDB info: 2
Remote available: 1
Add -v or --verbose to see additional PE details:
pdbwalker --json C:\Windows\System32
{
"file_path": "C:\\Windows\\System32\\kernel32.dll",
"file_size": 1048576,
"file_modified": "2024-03-15T14:32:10Z",
"architecture": "x64",
"image_base": "0x180000000",
"entry_point": "0x1000",
"timestamp": "2024-03-15T14:30:00Z",
"subsystem": "Windows GUI",
"is_dll": true,
"local_pdb": {
"available": true,
"path": "C:\\Windows\\System32\\kernel32.pdb"
},
"remote_pdb": {
"has_info": true,
"available": true,
"info": {
"file_name": "kernel32.pdb",
"guid": "{1A2B3C4D-5E6F-7A8B-9C0D-1E2F3A4B5C6D}",
"age": 1,
"signature": "1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D1",
"url": "https://msdl.microsoft.com/download/symbols/kernel32.pdb/..."
}
}
}
PE binary scanner with PDB symbol file detection and download capabilities
Usage: pdbwalker [OPTIONS] <DIRECTORY>
Arguments:
<DIRECTORY> Directory to scan for PE binaries
Options:
-v, --verbose Show detailed information about each binary
--local-only Only show binaries with local PDB files
--remote-only Only show binaries with remote PDB files available
--check-remote Check if remote PDB files exist (requires network requests)
-o, --output <DIR> Copy binaries and PDB files to output directory
--copy-binaries Copy binaries in addition to PDB files (requires --output)
--download-remote Download remote PDB files (requires --output)
-f, --force Overwrite existing files in output directory
--json Output results as JSON
--max-depth <N> Maximum recursion depth (default: unlimited)
--follow-symlinks Follow symbolic links
-h, --help Print help
-V, --version Print version
# Find which system DLLs have public symbols
pdbwalker --check-remote --remote-only C:\Windows\System32 > available_symbols.txt
# Download all available symbols for analysis
pdbwalker --check-remote --download-remote -o ./symbols C:\Windows\System32
# Check if debugging symbols are available for an application
pdbwalker --check-remote "C:\Program Files\SomeApp"
# Download symbols for offline debugging
pdbwalker --check-remote --download-remote -o ./app_symbols "C:\Program Files\SomeApp"
# Identify which drivers have symbols (useful for kernel debugging)
pdbwalker --check-remote --remote-only C:\Windows\System32\drivers
# Create a local symbol cache with binaries
pdbwalker --check-remote --copy-binaries --download-remote -o ./research C:\Windows\System32
# Verify that your build output has matching PDB files
pdbwalker --local-only C:\MyProject\bin\Release
# Verbose check of all PE details
pdbwalker -v --local-only C:\MyProject\bin\Release
# Copy suspicious binaries and try to download their symbols
pdbwalker --check-remote --copy-binaries --download-remote -o ./malware_analysis C:\Suspicious\Path
# Export all binary information as JSON for further analysis
pdbwalker --check-remote --json C:\Suspicious\Path > malware_info.json
PDB files contain debug information for Windows executables, including:
These files are essential for debugging, profiling, and reverse engineering Windows applications.
Windows PE files contain an optional Debug Directory that stores debug information. The most common format is CodeView, specifically the RSDS signature format introduced with Visual Studio .NET.
CodeView RSDS Structure:
+0x00: "RSDS" signature (4 bytes)
+0x04: GUID (16 bytes) - unique identifier for the PDB
+0x14: Age (4 bytes) - incremental counter for PDB updates
+0x18: PDB path (null-terminated UTF-8 string)
Microsoft hosts public symbols for Windows system files at https://msdl.microsoft.com/download/symbols.
URL Format:
https://msdl.microsoft.com/download/symbols/<filename>/<GUID><Age>/<filename>
Example:
https://msdl.microsoft.com/download/symbols/ntdll.pdb/1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D1/ntdll.pdb
Where:
<filename> is the PDB filename extracted from the PE debug directory<GUID> is the 32-character hex GUID (no hyphens) with the age appended as lowercase hex{Data1:08X}{Data2:04X}{Data3:04X}{Data4[0..8]:02X}Local PDB Check:
.exe or .dll, check if a .pdb with the same base name exists in the same directoryRemote PDB Check:
IMAGE_DEBUG_TYPE_CODEVIEWRSDS signature--check-remote is specified, send an HTTP HEAD request to verify the file exists (status 200 OK)Download Logic:
--output and --download-remote are specified, download PDB files that aren't available locally--copy-binariesmanifest.json file documenting all copied/downloaded filespdbwalker is optimized for speed:
walkdir for efficient recursive directory traversalTypical performance:
Colors are automatically enabled when outputting to a terminal. To disable colors:
NO_COLOR=1 pdbwalker C:\Windows\System32
Or redirect output to a file (colors are automatically disabled):
pdbwalker C:\Windows\System32 > output.txt
When using --output to copy/download files, the following structure is created:
output_directory/
├── binary1.exe
├── binary1.pdb
├── binary2.dll
├── binary2.pdb
└── manifest.json
The manifest.json contains metadata about all processed files:
{
"files": [
{
"binary": "C:\\Windows\\System32\\kernel32.dll",
"binary_copied": "output_directory/kernel32.dll",
"pdb_copied": "output_directory/kernel32.pdb",
"pdb_downloaded": null
}
],
"count": 1
}
.exe and .dll) are scanned; other file types are ignored.symchk or expand to decompress if needed.MIT License
Copyright (c) 2025 Kenan Sulayman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.