7.2 KiB
7.2 KiB
diskwiper with report creator
prereq:
wipe machine:
- apt install python3-qrcode nvme-cli smartmontools hdparm lsscsi pv iotop htop sysstat
report machine:
- apt install pandoc texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-xetex
wiping:
launch wiper.sh, you will be asked to select a disk:
➜ sudo ./wipe.sh
[1:0:0:0] disk ATA SanDisk X200 M.2 2010 /dev/sda
- - -
Disk to wipe:
then the wipe will take place and you will receive this output:
- - -
System serial: ABCDEFGH
Disk model: SanDisk X200 M.2 2280 128GB
Disk serial: 125907821590
Disk type: SSD
Disk status: Zeroed-Empty
Disk has been wiped with 1 random pass and one last zeroing
Started on: sat 12 nov 2022, 12:59:38, CET
Ended on: sat 12 nov 2022, 13:59:46, CET
- - -
Operation signature:
- - -
Validation: sat 12 nov 2022, 12:59:38, CET_sat 12 nov 2022, 13:59:46, CET_ABCDEFGH_SanDisk X200 M.2 2280 128GB_125907821590_SSD_Zeroed-Empty_8064caa5367034a80a6e97cae0e643bd863577a3
start-date _ end-date _ system-serial _ disk-model _ disk-serial _ disk-type _ disk-status _ sign
█████████████████████████████████████████████████████████████
█████████████████████████████████████████████████████████████
████ ▄▄▄▄▄ ███▀█▄▀▄▄ ██▄▀ █▄█▄ ▄▄ █▄▀█▀ ▀ ▀▄ ▀██ ▄▄▄▄▄ ████
████ █ █ █ ▄▀▀▀▀▀ ██▀█▀██▄▀▄▄▄▀▄█▄▄▀█▀▀█▀█▀▀▀▄▀█ █ █ ████
████ █▄▄▄█ █ ▀ ▄█ ▄▀██▄ ▄▄▄ ▄▄▄▄▄▀▀█▀▀ ▄ ███ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ █▄▀ █▄█▄▀ █ █ █ █▄█ █ ▀▄▀ ▀▄█▄▀▄▀▄█ █▄▄▄▄▄▄▄████
████ █ ▄▄▄▀▀█▀██▀ ▄▀ █ ▀██▄ ▄ ▀█▀█▄█▄▄▄▄ █ ▀ ▀▀▄ ▄▄▀▀████
████▀▀▄ ▄▀▄▄▀██▄▄ █ ▄▄█▀▄ ▀▀▀ █▀▀▀▄██ ▄▄█ ▄█▀▄▀▀██▄█ █▄█▀████
█████▀ ▀▀█▄▄▀ ▄ ▄▄ ▀▄ ▀▀▀ ▄█ █▀█▄ ▄███ ▄██▀ ▄ ▄▄██▄ █████
█████▀▀▄▀▄▄ ▀▄▀▄█▄▄▄▄█ █▄ ▀▀ ▄▀▀█▄ ▀▄ ▀▄█ ▄▀ ▀▀▄ ▄ ▄ █▀▄████
████▄▀▄▀▄▄▄██ ▄██ ▄█ ▄█▀█▀▀▀██ ██ █ ▄ █▄▀ █▄ ▄▄█▄█▀▀ █ ████
████▀▀▀ █▀▄ ▀ █▄▀█▀█▄▀ █▄█▀▀▀██▀▀▀▄▄ ▀▀██▄ █▀▄██▄ ▀██ ▄████
████▄ ▀█ ▄▄▀▀▀▄ ▀▄▄█▄▄ ▄█▄▀▀ ▄█▀ ▀ ▄▀ ▀█▀▄▀█▀▄ █ ▀████
████ ██▄▀▄▄█ █ █ ▀▀▄▄ █▀▀█▄ ▀▄▄█▄ ▀▀█▄█▄█▄▀█▀▄▀ ▀▄▀█▀▄█▀████
█████▄ ▄ ▄▄▄ ███▀ █ ▄▀▄ ▀▄ ▄▄▄ ▀▀█▀ ▄▄▄█▄ ▀ █ ▄▄▄ ▄▄▄▀████
██████▀█ █▄█ █▄█ █▀ ███ █ ▄█ █▄█ █▀█▄ ▄▀██ ▄▀▀ █▄█ █▄█████
████▄▄ ▄▄▄ █▄ ▄▄ ▄▄ ██▀▄▄ ▄▀▀▄ ▄▄███▄ ▀█▀█▄ ▄▄▄▀████
█████▄▀ ▀▄▄▀▀▄█ ██▄▄██▀▄█ ▀▄▀█▄▄█▀▄▄▀█▀▄▄▄▄▀█▀▀▀▀▄ █▀█▀▀████
████▀ ▄▄█▄ ▀▀▀ ▄█ ▄▄▀██▄█▀▀▄▀█▄▄▄ ▄▄▄██▄█▀ ██▀ █ ▀▄▀▀ ▀ ████
████▀▀▀▀▀ ▄▄▀█ ▀▀█ █▀██ █ ██ ▄██▄ ▄█▄ ▄▀█▄▄▄▀██ █ ▀█ ▀▄▀▀████
████ ▀ ▄ ▄█▄▀ ▀██▄▀▀ ▀▀▀█▄ █ █ █▄▄▄▀ ▀▀ ▀ ▀▄█ █▀▄▀█ ▀████
████▄▀ ▀ ▄▄▀ ▄█▀▄▄█▄ ▄█▄▀ ██▄█▄█▀██▄▄▄▀█▀ ██▄▀▄▄▀▀██ ▀▀████
████▄ ▀▀▀▀▄▀▄▀ ▄▄█▀▄██▀▄ ▀▄▀█▄█▀█ ▀▄█▀██ ▀█▀ ▀█▀█▄ █▄█▄▄█████
████▄ ▀▄▄▄▄▀▄▀▄▄ █▄▄ ▄█ ▄ █▀█▄ ▄█▀ ▀▀█ █▄▀ ███▄▀▀ ▀▀▀▀▄█▀████
███████▄██▄█ ██▄ ▀ ▄▄█ ▀▄▀▄▄ ▄▄▄ ▀ ▀█ █▄▄██▀█▀ █ ▄▄▄ ▀▄█ ████
████ ▄▄▄▄▄ █▀ ▄█▀ ▀█ ▀ ▀█▄█▀ █▄█ ███▄ ▄▀▄▄▄█▀█ █▄█ ██ █████
████ █ █ █ ▀▀ ▀▀▄▄▄█ ▀▄▄█▄▄ ▄ ▄▀▀█▀█▄▄▀▄█ ▄█ █ ▄▄▄▄▀ █████
████ █▄▄▄█ █▄▄▄▀ ▀▀█ █▀▀█▄ ▄█▄▄ █▀█▄▀▄ ▀▀▄ ▀ █▄▀▄▀▄ ▀▄▀█████
████▄▄▄▄▄▄▄█▄█▄▄█▄▄█▄█▄▄█▄█▄▄███▄██▄█▄█▄▄██▄██▄█▄▄█▄▄█▄██████
█████████████████████████████████████████████████████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
the qr (which in a terminal is way better looking) is used to easily export the data without connecting a machine to a network
reporting:
launch report.sh, you will be asked to input the wipe output:
➜ ~ ./disk_report_DEMO.sh
Input sanitization data:
just paste the content of the qr code, or the string:
sat 12 nov 2022, 12:59:38, CET_sat 12 nov 2022, 13:59:46, CET_ABCDEFGH_SanDisk X200 M.2 2280 128GB_125907821590_SSD_Zeroed-Empty_8064caa5367034a80a6e97cae0e643bd863577a3
you will recieve a pdf like:
sources:
- https://wiki.archlinux.org/title/Solid_state_drive/Memory_cell_clearing#Sanitize_command
- http://www.nicksun.fun/linux/2020/03/26/pdfs-bash-pandoc.html
- https://www.howtoforge.com/how-to-securely-destroy-wipe-data-on-hard-drives-with-shred
- https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-88r1.pdf