Skip to content

Skibit/DiskWipeAudit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

DiskWipeAudit

This tool provides a methodical, sector-level verification of disk sanitization by bypassing the operating system's file system layers to read raw hardware data. It generates empirical evidence of a successful wipe by performing dynamic spot checks across the entire span of a physical drive.

How It Works

The script utilizes the .NET System.IO.File class to open a direct handle to a physical device, bypassing standard Windows API pathing restrictions that often hinder raw disk access. It dynamically retrieves the physical geometry of the target disk to calculate an array of offsets distributed across the entire capacity.

By aligning these offsets to 512-byte sector boundaries, the tool ensures high-fidelity reads and avoids common "out of bounds" or "incorrect parameter" errors. During execution, the script evaluates each sampled buffer for non-zero data; if any residual bytes are detected, the tool provides a raw hexadecimal dump for empirical analysis.

What It Does

  • Dynamic Disk Selection: Polls the system for all connected physical disks and allows the user to select the target at runtime.
  • Hardware-First Sizing: Fetches exact byte counts from the hardware to ensure the audit covers the true span of the drive.
  • Empirical Spot-Checking: Samples 50 distinct locations across the drive to confirm a comprehensive wipe.
  • Raw Hexadecimal Output: Displays the actual contents of "dirty" sectors to identify residual partition tables or file fragments.
  • Summary Reporting: Concludes with a professional audit report including timestamps, duration, and a pass/fail status based on the zero-check results.

Requirements

  • PowerShell Environment: Compatible with Windows PowerShell 5.1 and PowerShell 7+.
  • Administrator Privileges: Raw hardware access requires an elevated execution context.
  • Execution Policy: The system must be configured to allow script execution (e.g., Set-ExecutionPolicy RemoteSigned).

Usage

  1. Open PowerShell as an Administrator.
  2. Execute the script: .\DiskWipeAudit.ps1.
  3. Select the target disk number from the provided list.
  4. Review the hexadecimal output for any non-zero data and verify the final Summary Report.

About

This tool provides a methodical, sector-level verification of disk sanitization by bypassing the operating system's file system layers to read raw hardware data. It generates empirical evidence of a successful wipe by performing dynamic spot checks across the entire span of a physical drive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors