SFILL(1)

πŸ“¦
version 3.1 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– SFILL(1) β€” the secure free disk & inode space wiper πŸ’–

okay bestie, pull up a chair (or like, a beanbag) because we're gonna talk about sfill, aka the secure_deletion toolkit's most unhinged little space-scrubber. it lives in the General Commands Manual, and it is not playing games. 🧚


✨ NAME ✨

sfill β€” secure free disk and inode space wiper (secure_deletion toolkit)


🌸 SYNOPSIS 🌸

sfill [-f] [-i] [-I] [-l] [-l] [-v] [-z] directory/mountpoint

(yes, -l really is in there twice. that's not a typo, that's ✨ intentional chaos ✨ β€” keep reading, it's explained below πŸ‘€)


πŸ’… DESCRIPTION πŸ’…

so here's the vibe: sfill is designed to delete data which lies on available diskspace on mediums in a secure manner which can not be recovered by thieves, law enforcement or other threats. like, the whole point is that nobody's getting it back. not them, not a forensic lab, nobody. πŸ’€

the wipe algorithm is based on the paper "Secure Deletion of Data from Magnetic and Solid-State Memory" presented at the 6th Usenix Security Symposium by Peter Gutmann, one of the leading civilian cryptographers. we stan a peer-reviewed king πŸ‘‘

the secure data deletion process of sfill goes like this:

  • 1 pass with 0xff
  • 5 random passes. /dev/urandom is used for a secure RNG if available.
  • 27 passes with special values defined by Peter Gutmann.
  • 5 random passes. /dev/urandom is used for a secure RNG if available.

afterwards as many temporary files as possible are generated to wipe the free inode space. After no more temporary files can be created, they are removed and sfill is finished.

so yeah, it scrubs the space, then it fills your free inodes with temp files until it literally cannot make any more, then it deletes them all and dips. it's giving cleanup crew energy. 🧹✨


πŸŽ€ COMMANDLINE OPTIONS πŸŽ€

  • -f β€” fast (and insecure mode): no /dev/urandom, no synchronize mode. it's fast bc it's not safe, bestie, don't let the speed fool you πŸ™ˆ
  • -i β€” wipe only free inode space, not free disk space
  • -I β€” wipe only free disk space, not free inode space (yes, lowercase -i and uppercase -I are different things. the audacity. 😭)
  • -l β€” lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.
  • -l β€” -l for a second time lessons the security even more: only one random pass is written. (stacking -l twice = even more unhinged. do not do this if you actually need the data gone gone.)
  • -v β€” verbose mode πŸ‘€ she'll tell you everything she's doing
  • -z β€” wipes the last write with zeros instead of random data
  • directory/mountpoint β€” this is the location of the file created in your filesystem. It should lie on the partition you want to write.

🌈 LIMITATIONS 🌈

okay so this is the "manage your expectations" section. sit down, sip your drink. πŸ“

πŸ¦‹ FILESYSTEM INTELLIGENCE πŸ¦‹

Most filesystems (ext2, ffs, etc.) have several features included to enhance performance, which will result in that sfill might not receive all available free space. Sad but true. Nothing can be done about that ... 😭 like genuinely, nothing. the filesystem said no and that's final.

πŸ’œ NFS πŸ’œ

Beware of NFS. You can't ensure you really completely wiped your data from the remote disks. (especially because of caching)

πŸ”₯ Raid πŸ”₯

Raid Systems use stripped disks and have got large caches. It's hard to wipe them.

🫢 swap 🫢

Some of your data might have a copy in your swapspace. sswap is available for this task.

🌸 fat32 🌸

The size of files with fat32 filesystems is limited to 4 GB; sfill can fail to smash the complete filesystem if the free space is bigger than this limit, because this command creates the biggest possible anonymous file and securely erases its content.

To work around this limitation, the recommended package libgsecuredelete0 can be installed, and one can call the script /usr/libexec/libgsecuredelete0/gsd-sfill-helper which creates as many anonymous files as the filesystem can bare, and then smashes them all. slay. πŸ’…


😭 BUGS 😭

No bugs. There was never a bug in the secure_deletion package (in contrast to my other tools, whew, good luck ;-) Send me any that you find. Patches are nice too :)

literal icon behavior. no cap.


πŸ‘‘ AUTHOR πŸ‘‘

van Hauser / THC <vh@thc.org>


⭐ DISTRIBUTION ⭐

The newest version of the secure_deletion package can be obtained from http://www.thc.org

sfill and the secure_deletion package is (C) 1997-2003 by van Hauser / THC (vh@thc.org)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; Version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

bestie, that warranty bit is not a joke, okay? WITHOUT ANY WARRANTY means exactly what it says. it's free software, it's GPL v2, and if it eats your disk that's between you and the license. 😌

πŸ’– SEE ALSO πŸ’–

sswap (1), srm (1), sdmem (1)

wait, let me do that right: srm (1), sswap (1), sdmem (1) πŸ’–


and that's a wrap, my love 🫢 this page came to you courtesy of the General Commands Manual β€” SFILL(1), secure_deletion toolkit edition, brought to you by van Hauser / THC with all the 1997-2003 vintage copyright energy. go wipe some free space, stay safe, and remember: -f is fast bc it's insecure, so don't come crying to me. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from