Перейти к содержимому

Надежно удалить файл в Ubuntu?

2

Я читал о государственных стандартах для безопасного удаления данных, перезаписывая местоположение файла случайными данными [wikipedia: стандарты удаления данных] . Мне интересно, реализует ли Ubuntu по умолчанию Delete (shift + Delete через Nautilus) какой-либо из этих стандартов. А что если я нахожусь в каталоге eCryptFS? Существуют ли сторонние пакеты, через которые я могу apt-getдобавить безопасное удаление в контекстное меню, вызываемое правой кнопкой мыши?

965 просмотров
Mike Ounsworth спросил 11 лет назад
M 165

2 ответа

4
Принятый ответ

Shift+Delete just avoids moving the file to the trash, however it does not do any attempt to securely delete the file.

To do a secure deletion, you can install the Nautilus Wipe package. For information this is the Nautilus counterpart of the command-line wipe package.

Замечательно! Несмотря на то, что, взглянув на «wipe», читатели должны увидеть мой собственный ответ ниже для получения информации со справочной страницы «wipe», указывающей, что инструменты «безопасного удаления» не так эффективны, как нам хотелось бы верить.

Mike Ounsworth · 11 лет назад · 0
WhiteWinterWolf ответил 11 лет назад
W 181
1

Thanks to @GZBK for pointing me to the wipe package.

For future readers in this thread, I want to quote several parts of wipe's man page.

Journaling filesystems (such as Ext3 or ReiserFS) are now being used by default by most Linux distributions. No secure deletion program that does filesystem-level calls can sanitize files on such filesystems, because sensitive data and metadata can be written to the journal, which cannot be readily accessed. Per-file secure deletion is better implemented in the operating system.

So if you're using a journaled fie system, then any 3rd party secure deletion program will not be as secure as you may be lead to believe. Kernel-level secure deletion routines have more direct access to the disk and may be able to bypass some of these limitations. But even for kernels...

Be aware that harddisks are quite intelligent beasts those days. They transparently remap defective blocks. This means that the disk can keep an albeit corrupted (maybe slightly) but inaccessible and unerasable copy of some of your data. Modern disks are said to have about 100% transparent remapping capacity. You can have a look at recent discussions on Slashdot.

I hereby speculate that harddisks can use the spare remapping area to secretly make copies of your data. Rising totalitarianism makes this almost a certitude. It is quite straightforward to implement some simple filtering schemes that would copy potentially interesting data. Better, a harddisk can probably detect that a given file is being wiped, and silently make a copy of it, while wiping the original as instructed.

So if you are handling highly sensitive information then you should treat the hardware of your hard disk as malicious, and only pass data to the disk in fully encrypted form by using full disk encryption in the OS. Furthermore, when discarding a drive with sensitive data on it, you should ensure that it has been properly physically destroyed (many companies offer hard drive shredding services) rather than relying on software wipes.

Update

As pointed out by GZBK in comments below, this information appears to be out of date. In particular, it appears that the man page for wipe hasn't been updated since 2006.

Что касается ext3, эта проблема была действительно верна с первой версией ext3, где данные также были опубликованы, однако это поведение [было улучшено](http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq. html), добавив новый параметр, позволяющий определить, что должно быть занесено в журнал, и установить для него значение «data = order» по умолчанию, чтобы журналировались только метаданные, а данные записывались вместо предыдущих данных. Этот параметр является опцией монтирования, которую можно проверить с помощью 'dmesg' или в '/ var / log / messages', и можно установить с помощью '/ etc / fstab'.

WhiteWinterWolf · 11 лет назад · 1

Что касается плохого перераспределения блоков, вы можете проверить это, используя свойства SMART, которые сообщат вам, сколько блоков пришлось переназначить. Однако, если на вашем диске начинают обнаруживаться плохие блоки, он просто тихо умирает, и вы можете заменить его как можно скорее. Диски с магнитным диском интеллектуальны, но технология, лежащая в основе, делает стирание, как правило, надежным (если только АНБ не выбрало вас для прошивки, обновляющего ваш диск с «интеллектуального» до «среднего»). SSD, с другой стороны, может создавать определенные проблемы ...

WhiteWinterWolf · 11 лет назад · 1
Mike Ounsworth ответил 11 лет назад
M 165