A comprehensive Windows Digital Forensics and Incident Response (DFIR) evidence collection script with enhanced memory analysis capabilities.
- System Information: Complete system details, OS version, and installed programs
- Network Information: Network configuration, connections, DNS cache, and ARP tables
- User & Authentication: Logged-on users and login history
- Processes & Services: Running processes with detailed information and SHA256 hashes
- Persistence Mechanisms: Startup items, scheduled tasks, and registry run keys
- Event Logs: Complete Security, System, and Application event logs (.evtx format)
- Registry Hives: Full backup of all major registry hives (SYSTEM, SOFTWARE, SAM, SECURITY, NTUSER.DAT)
- Browser Artifacts: Data from Chrome, Edge, Firefox, Opera, Brave, and IE/Edge WebCache
- File System: Recently modified files and System32 directory hashes
- Shortcuts: Collection of .lnk files from various system locations
- Flexible Memory Collection: Three modes for different scenarios
- Procdump Integration: Automatic download and local caching of Procdump tool
- Hash Verification: SHA256 hashing of memory dump files
- Smart Caching: Reuses previously downloaded Procdump for faster execution
- Windows PowerShell 5.0 or later
- Administrative privileges (required for registry access and memory dumps)
- Internet connection (only for initial Procdump download)
- Download the
DFIR_Windows_Collector.ps1script - Place it in your desired directory
- Ensure you have administrative privileges
.\DFIR_Windows_Collector.ps1 -EvidenceID <CaseID> [-DumpMem] [-OnlyMem]| Parameter | Type | Required | Description |
|---|---|---|---|
-EvidenceID |
String | Yes | Unique identifier for the evidence collection case |
-DumpMem |
Switch | No | Enable memory dump collection in addition to standard evidence |
-OnlyMem |
Switch | No | Collect only memory dump without other forensic evidence |
.\DFIR_Windows_Collector.ps1 -EvidenceID "CASE001"Collects all standard forensic evidence without memory analysis.
.\DFIR_Windows_Collector.ps1 -EvidenceID "CASE001" -DumpMemCollects all forensic evidence including full memory dump.
.\DFIR_Windows_Collector.ps1 -EvidenceID "CASE001" -OnlyMemCollects only memory dump for quick memory analysis.
{EvidenceID}_{Hostname}_{YYYYMMDD_HHMMSS}.zip
{EvidenceID}_{Hostname}_{YYYYMMDD_HHMMSS}/
βββ systeminfo.txt # System information
βββ os_version.txt # OS version details
βββ installed_programs.txt # Installed software list
βββ network_config.txt # Network configuration
βββ dns_cache.txt # DNS cache
βββ netstat_anob.txt # Network connections
βββ Get-NetTCPConnection.txt # PowerShell network connections
βββ arp_table.txt # ARP table
βββ loggedon_users.txt # Currently logged users
βββ login_history.txt # Login history (Security events)
βββ tasklist.txt # Process list
βββ Get-Process.txt # PowerShell process list
βββ process_hashes.csv # Process SHA256 hashes
βββ process_hash_errors.csv # Process hash errors
βββ services.txt # Service list
βββ scheduled_tasks.txt # Scheduled tasks
βββ startup_hklm.txt # HKLM startup items
βββ startup_hkcu.txt # HKCU startup items
βββ Security.evtx # Security event log
βββ System.evtx # System event log
βββ Application.evtx # Application event log
βββ SYSTEM.hiv # Registry SYSTEM hive
βββ SOFTWARE.hiv # Registry SOFTWARE hive
βββ SAM.hiv # Registry SAM hive
βββ SECURITY.hiv # Registry SECURITY hive
βββ NTUSER.DAT # Current user registry
βββ Shortcuts/ # Shortcut files
βββ Browsers/ # Browser artifacts
βββ modified_files_last7days.csv # Recently modified files
βββ system32_hashes.csv # System32 file hashes
βββ system32_unreadable_files.txt # Unreadable files
βββ Memory/ # Memory analysis (if enabled)
βββ {Hostname}_{Timestamp}.dmp # Memory dump file
βββ dump_info.csv # Dump file information
- Local Priority: Script first checks for
DFIR_tools\procdump.zipin the script directory - Automatic Download: Downloads Procdump from Sysinternals if not found locally
- Local Caching: Saves downloaded Procdump for future use
- Version: Uses the latest version from Microsoft Sysinternals
- Format: Full memory dump (.dmp)
- Hash: SHA256 hash of the dump file
- Metadata: File size, creation time, and hash stored in CSV format
- Compression: Included in the final ZIP archive
- Standard Mode: 5-15 minutes (depending on system size)
- Memory Mode: Additional 10-30 minutes (depending on RAM size)
- Memory-Only Mode: 10-30 minutes (memory dump only)
- Standard Evidence: 50-500 MB (depending on system)
- Memory Dump: 1-8 GB (depending on installed RAM)
- Compression: Reduces total size by 20-50%
- All collected files include SHA256 hashes
- Process executables are hashed for integrity verification
- Memory dump files include hash verification
- System32 files are hashed for baseline comparison
- Junction point avoidance to prevent infinite loops
- Error handling for locked files
- Timestamp normalization for ZIP compatibility
- Automatic cleanup of temporary files
Error: Access denied
Solution: Run PowerShell as Administrator
Error: Procdump.exe not found
Solution: Check internet connection for initial download
Error: Cannot access registry hive
Solution: Ensure administrative privileges
- All errors are logged to respective error files
- Process hash errors:
process_hash_errors.csv - System32 errors:
system32_unreadable_files.txt - Memory analysis errors:
Memory\memory_error.txt
process_hashes.csv: Analyze running processes and their integritylogin_history.txt: Review authentication eventsmodified_files_last7days.csv: Identify recent file system changessystem32_hashes.csv: Baseline for system file integrity- Memory dump: For advanced memory forensics
- Registry Analysis: Registry Explorer, RegRipper
- Memory Analysis: Volatility, Rekall
- Log Analysis: Event Log Explorer, Splunk
- Hash Verification: HashMyFiles, HashCalc
- v2.0: Enhanced with memory analysis and flexible collection modes
- v1.0: Initial release with standard evidence collection
- Additional browser support
- Cloud storage integration
- Automated analysis reports
- Network artifact collection
For issues, questions, or feature requests:
- Check the troubleshooting section
- Review error logs in the output
- Ensure all requirements are met
- Verify administrative privileges
This tool is designed for authorized digital forensics and incident response activities only. Users are responsible for ensuring compliance with applicable laws and regulations. Always obtain proper authorization before collecting evidence from any system.
This script is provided as-is for educational and professional use in digital forensics and incident response. Use at your own risk and ensure compliance with applicable laws and regulations.
Version: 2.0 Enhanced Edition
Last Updated: December 2024
Compatibility: Windows PowerShell 5.0+