Пометить удаленные файлы как удаленные

2637
Elmo

Емкость моего жесткого диска составляет 500 ГиБ. 150 ГБ данных были удалены случайно. После этого инцидента я не записал ни одного байта на диск, поэтому мои данные гарантированно будут там. Я пробовал такие приложения, как Recuva, все приложения показывают, что данные есть, и позволяют мне сохранять данные в другом месте, но проблема в том, что я не хочу этого делать.

Я просто хочу, чтобы файлы снова были помечены как не удаленные в MFT. Есть ли какое-либо приложение для этой цели? Я много искал, но ничего не нашел, можно ли пометить файлы как удаленные в MFT или я что-то упустил? Я мог бы написать приложение для этого, если бы знал, как сделать это вручную.

11
На самом деле, в старые времена DOS «undelete» и «unerase» делали именно это, но программы Windows, как правило, «копируют» файлы. Я не думаю, что видел какие-либо файлы, которые буквально удаляют файлы. «Я не записывал ни одного байта на диск после этого инцидента, поэтому мои данные гарантированно будут там». Может быть, но это не значит, что их можно восстановить; любые фрагментированные файлы, вероятно, позволят вам вернуть только первый фрагмент файла. Synetech 10 лет назад 2
AFAIK, обычно запись для папки / файла удаляется из MFT при удалении файла. Это может быть не так просто, как включить или выключить немного. Ganesh R. 10 лет назад 0
@GaneshR. Это то, что я хочу сделать, я хочу добавить запись в MFT, разве это не возможно? Данные уже находятся на жестком диске, их нужно только зарегистрировать в файловой системе. Elmo 10 лет назад 0
Recuva показывает мне имя файла и папку, в которой он находился. Elmo 10 лет назад 0
@ Don'tForgettoUpvote Просто рекомендация, если вы можете восстановить файлы с помощью инструмента восстановления файлов, начните делать это. Ваш подход интересен, но я сначала лично получу файлы, а затем поэкспериментирую :) Ganesh R. 10 лет назад 0
@GaneshR. На самом деле, это был мой резервный диск, и у меня нет лишних свободных дисков. Elmo 10 лет назад 0
@ Don'tForgettoUpvote См. Http://www.ntfs.com/recovery-toolkit.htm#diskscan. Ganesh R. 10 лет назад 0
@GaneshR. Ты это видел? «Наиболее важной информацией для нас в этом блоке является состояние файла: удален или используется. Если в поле« Флаги »(красного цвета) установлен бит 1, это означает, что файл используется. В нашем примере это ноль, т.е. файл удален. " Означает ли это, что изменение немного может восстановить любой файл? Elmo 10 лет назад 0
@ Don'tForgettoUpvote Может быть. Но вы собираетесь сделать это для всех файлов вручную? Также прямое редактирование метаданных NTFS рискованно. Следовательно, я бы предложил как-то сделать резервную копию удаленных данных и затем поэкспериментировать. Кроме того, я попробовал их инструмент метаданных, и я не мог разобраться в этом. Может быть, это слишком сложно для меня Ganesh R. 10 лет назад 0
@GaneshR. У меня есть резервная копия данных, и, очевидно, я не буду делать это вручную, просто хочу, чтобы был простой инструмент для этой цели. Elmo 10 лет назад 0
Советы и решения по восстановлению данных: Windows, Linux и BSD: http://www.amazon.com/Data-Recovery-Tips-Solutions-Windows/dp/8183331971/ref=sr_1_5/190-4250863-2306501?s=books&ie = UTF-8 & QID = 1388857995 & SR = 1-5 STTR 10 лет назад 0
Вы можете попробовать запросить разработчиков некоторых инструментов восстановления данных, добавив эту опцию. Вот форумы обратной связи для пары самых популярных: [Recuva] (http://forum.piriform.com/index.php?showforum=18), [Photorec] (http://forum.cgsecurity.org/phpBB3 /file-recovery-f7.html?sid=1679d342f967fa752f5c52641a67697e) Synetech 10 лет назад 1
Вы всегда можете попробовать сделать это вручную, если есть только несколько файлов, но я, конечно, не рекомендовал бы это. После нескольких минут исследования и проверки мне удалось пометить файл как не удаленный в `$ MFT`, но проблема в том, что этого недостаточно, вы также должны пометить использованные кластеры как используемые в` $ Файл BITMAP`, который оказался слишком сложным и слишком много работы, чтобы найти и сделать. Synetech 10 лет назад 0

2 ответа на вопрос

5
harrymc

Undeleting files on an NTFS volume is not as simple as flipping one bit. It is true that the difference between a deleted and non-deleted file is just one bit in the MFT, but one needs also to recover the file's contents, which are stored as streams, as well as re-flag the deleted sectors as used in the $Bitmap pseudo-file which contains one bit per sector, each bit indicates whether its corresponding cluster is used (allocated) or free (available for allocation).

The complexity of the job is such that all recovery tools prefer not to write to the damaged volume. For example, marking a sector in $Bitmap as used may cause cross-chaining if that sector was already used by another file.

This article demonstrated the problem very well with hex dumps :
Windows ‘File Recovery’ series : Part 5 Manually Recover a Deleted File From an NTFS File System.

Another article even contains the source code of a program that could be modified to unflip the "deleted" bit : Undelete a file in NTFS.

There are quite a few NTFS disk editors that can edit the MFT to flip that bit. Some that I found via Google (but luckily never needed to use) are :
WinHex
NTFS Data Recovery Toolkit
DMDE
Freeware Active Disk Editor

A possible solution which might even work would be to undo the deleted bit in the MFT, then use the chkdsk utility to try to recover the contents. This utility can recover the sectors-chains of files whose sectors were wrongly marked as available for reallocation and will fix up $Bitmap.

However, there is always the chance that this procedure may destroy your disk.

This is why you and all the commentators above (including myself) have not found any product that does in-place recovery. The possibilities for screwing up your disk are simply too much for anybody who is not a Microsoft employee working on NTFS.

My best recommendation for you is to get a second hard disk and recover the files on it. I believe you have found out that one backup disk is not enough. I have already had several cases of friends asking me to recover their only backup, and I always counsel them (sometimes too late) to have two backup disks.

In addition, at least one of the two backup disks should be disconnected from the computer. I advise this after hearing of a case where a computer has fried itself and every connected USB device, leaving the owner with no data and no backup in one hit.

2
Synetech

Like I said yesterday, you could always try doing it manually with a hex/disk-editor if there’s only a few files to recover, but I certainly wouldn’t recommend it.

After several minutes of research and testing, I eventually managed to mark a file as not-deleted in the $MFT, but the problem is that is not enough, you also have to mark clusters it uses in-use in the $BITMAP. This task proved too difficult and too much work to find and do so I eventually gave up. I considered running chkdsk /f to see if it would detect the discrepancy and mark the clusters correctly, but that felt too risky to do because the NTFS partition I tested on had a few other files I did not want to lose.

(Also, note that while unlike FAT*, NTFS stores the cluster chain for a file in the $MFT, that does not guarantee that you will have access to the whole cluster chain at the time of recovery, so a fragmented file could end up being unrecoverable. Even if you didn’t write anything to the drive after the accidental erasure, it doesn’t meant that Windows didn’t. For example, it may have written to \System Volume Information, especially if the Shadow Copy/Previous Versions service is running.)

Obviously manual recovery isn’t really a solution, nor an answer to your question, which is why I had posted it only as a comment. Sadly, all the searching I have done has come up empty and the short answer to your question is: no, there are no public programs that can simply mark a file as not-deleted on an NTFS volume.

(There are—expensive—forensic programs that can do fancy things with drives and recover files and present raw data through a filter to show structures and such, but even those aren’t going to be of help because they specifically make a point of not modifying the original drive.)

Похожие вопросы