MultiDrive – free backup, clone & wipe disk utility from Atola Technology

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 28th, 2011, 8:24 
Offline
User avatar

Joined: September 29th, 2005, 12:02
Posts: 3577
Location: Chicago
rcube wrote:
Well, I do not think TrueCrypt's headers are damaged. From what I understand, if they were, TrueCrypt wouldn't mount the volume in the first place.

So TrueCrypt does accept the password for hidden volume?
in this case you may want to use utilities like R-Studio or GetDataBack to extract data from hidden volume in full scan mode

The hidden volume is not located at the beginning of the drive, so utilities which try to fix file system may not recognize it however if it mounts to a drive letter then it makes your life easier
Again, use file system extraction tools to get your data off the damaged volume

_________________
SAN, NAS, RAID, Server, and HDD Data Recovery.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 1:02 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
Doomer wrote:
1. the MBR aka Partition Table is not necessary for Windows to recognize the volume if Boot sector located at sector 0
MBR is only needed if you want to boot from this drive

TestDisk is complaining about a partition table, not Windows. Without seeing TestDisk's log, my idea was to create a partition table that would make TestDisk happy, to allow it proceed to analyse the file system.
Doomer wrote:
2. True Crypt hidden volume should have its own header. If this header is damage then TrueCrypt won't see the hidden volume.

If TestDisk can see the unencrypted Boot Parameter Block in the FAT32 boot sector, then doesn't this mean that the volume has been recognised and mounted by TrueCrypt? Or are these structures normally unencrypted?
Doomer wrote:
3. If you keep running chkdsk then your chances to get your data will be very low

I suggested that the OP run CHKDSK in readonly mode, not repair mode. It was purely an investigatory measure, as were all my other suggestions.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 2:34 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
rcube wrote:
I do have an image of the corrupted volume. I do not know what precautions to take beyond that.

The way I see it is this: any suggestions are better than no suggestions. I obviously tried the TrueCrypt forum first, where nobody even replied. That's okay - it's freeware and they don't *have* to support a user. I appreciate that users here are at least giving it a thought. There are many like me who are not IT folks - there's no way we can fix problems of this nature unless you guys help us. So any suggestions are welcome. I'd rather try something than to hope the volume will automagically spring to life.

I would first examine the fundamental components of the file system with a disc editor. These include the boot sector (logical sector 0), backup boot sector (sector 6), first sector of FAT#1, first sector of FAT#2, and first sector of root directory. I would not automatically throw all manner of data recovery software at the problem. I suggest you take your time, get an understanding of the problem if possible, and then decide on the best approach.

Could you take snapshots of the abovementioned sectors, excluding those you have already uploaded?

As for CHKDSK, I wouldn't allow it to "fix" anything.

One other thing to try would be to create a small Truecrypt volume for test purposes and examine its structure. Then see how CHKDSK and TestDisk behave with this known good volume.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 2:45 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
Doomer wrote:
There are some people here who may look very confident with their suggestions but actually not experienced in what they suggesting and have no moral problems to gamble with your data
You may want to consider that before following their suggestions

If you are referring to me, I have not suggested that the OP write anything to the volume other than a dummy partition table.

As for morality, I have only the OP's best interests at heart. I have no financial interest in his data. To this end I offer DIY solutions wherever possible.

Furthermore, before offering suggestions, I suggest that people pay attention to what the OP has written. ;-)

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 15:17 
Offline

Joined: January 8th, 2011, 4:34
Posts: 11
Location: India
I did try GetDataBack for good measure. While I did not go through the entire recovery process, I reached a point where the product identified some FAT clusters and asked for the quality of recovered files to be checked. I observed two things -

1) Only part of the data was identified (perhaps 25% of it)
2) From many hundreds of "recovered" files, not one was readable (including ones from FAT clusters highlighted in green)

This run was done under default settings. I might try again after enabling all RAW / FAT options available in the product. Given that not one recovered file was readable, I really don't know if this will be useful in any way.

I'm also uploading dumps of sectors 6, 32, 51276 and 360944120, if they can help in any way. Thanks for the help.


Attachments:
Dumps.rar [17.6 KiB]
Downloaded 328 times
Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 16:00 
Offline
User avatar

Joined: September 29th, 2005, 12:02
Posts: 3577
Location: Chicago
FAT tables are corrupted or not decrypted
Sector 360944120 has part of FAT directory
So we back to the point where your volume is either corrupted or not properly mounted because of hidden volume header damage

Those sectors you provided their number calculated from the beginning of what? Outer volume, hidden volume or physical drive?

_________________
SAN, NAS, RAID, Server, and HDD Data Recovery.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 21:39 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
I notice that Sec360944120.bin has a size of 513 bytes rather than 512. The directory structure appears to have a one-byte offset somewhere before 0x140. I suspect that there is a bug in your disc editor involving the handling of <CRLF> characters, ie 0x0D and 0x0A. It appears that your editor software adds an LF character whenever it sees a CR, or vice versa.

Code:
120  42 54 35 35 32 32 7E 33-4A 50 47 20 00 2B 2A B0   BT5522~3JPG .+*.
130  2D 3B 39 3B 2B 00 ED 54-C1 3A 0D 0A 04 53 42 01   -;9;+..T.:...SB.
140  00 43 30 00 35 00 31 00-35 00 2E 00 0F 00 02 6A   .C0.5.1.5......j
150  00 70 00 67 00 00 00 FF-FF FF FF 00 00 FF FF FF   .p.g............
160  FF 02 2D 00 4E 00 69 00-67 00 65 00 0F 00 02 72   ..-.N.i.g.e....r
170  00 5F 00 44 00 65 00 6C-00 74 00 00 00 61 00 2D   ._.D.e.l.t...a.-
180  00 01 33 00 35 00 30 00-44 00 2D 00 0F 00 02 32   ..3.5.0.D.-....2
190  00 30 00 30 00 38 00 30-00 32 00 00 00 30 00 35   .0.0.8.0.2...0.5
1A0  00 42 54 35 35 32 36 7E-33 4A 50 47 20 00 2B 2A   .BT5526~3JPG .+*
1B0  B0 2D 3B 39 3B 2B 00 ED-54 C1 3A 0C 04 5D 51 01   .-;9;+..T.:..]Q.
1C0  00 43 30 00 35 00 31 00-36 00 2E 00 0F 00 E9 6A   .C0.5.1.6......j
1D0  00 70 00 67 00 00 00 FF-FF FF FF 00 00 FF FF FF   .p.g............
1E0  FF 02 2D 00 4E 00 69 00-67 00 65 00 0F 00 E9 72   ..-.N.i.g.e....r
1F0  00 5F 00 44 00 65 00 6C-00 74 00 00 00 61 00 2D   ._.D.e.l.t...a.-


Furthermore, although the sector contains a directory structure, it looks like it is the middle section of a directory, not a root. I say this because there are incomplete long filenames at both top and bottom. IMO it is definitely not a root directory.

Here is a snapshot of the root directory of my Win98SE FAT32 volume:

Code:
00  46 55 4A 5F 57 49 4E 39-38 53 45 28 00 01 EE 45   FUJ_WIN98SE(...E
10  25 3D 25 3D 00 00 EF 45-25 3D 00 00 00 00 00 00   %=%=...E%=......
20  49 4F 20 20 20 20 20 20-53 59 53 00 00 00 00 00   IO      SYS.....
30  00 00 34 3B 00 00 C0 B2-97 26 03 00 B6 64 03 00   ..4;.....&...d..
40  44 52 56 53 50 41 43 45-42 49 4E 00 00 00 00 00   DRVSPACEBIN.....
50  00 00 34 3B 00 00 C0 B2-97 26 41 00 07 0D 01 00   ..4;.....&A.....
60  4D 53 44 4F 53 20 20 20-53 59 53 20 00 00 00 00   MSDOS   SYS ....
70  00 00 56 3D 00 00 06 40-6C 36 95 05 B8 06 00 00   ..V=...@l6......
80  43 4F 4D 4D 41 4E 44 20-43 4F 4D 00 00 00 00 00   COMMAND COM.....
90  00 00 3C 3E 00 00 C0 B2-97 26 53 00 C2 6E 01 00   ..<>.....&S..n..


Notice that the first entry is the volume name, "FUJ_WIN98SE".

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 21:53 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
I notice that there is difference between your boot sector and backup, at byte offset 0x41.

D:\Temp>FC /B sector0.bin sec6.bin
Comparing files Sector0.bin and sec6.bin
00000041: 01 00

Code:
000  EB 3C 90 4D 53 57 49 4E-34 2E 31 00 02 80 20 00   .<.MSWIN4.1... .
010  02 00 00 00 00 F8 00 00-01 00 01 00 00 00 00 00   ................
020  00 80 0C 32 2C C8 00 00-00 00 00 00 05 04 2B 00   ...2,.........+.
030  01 00 06 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
040  80 01 29 AC 22 C0 74 00-56 B4 0E BB 07 00 CD 10   ..).".t.V.......
050  5E EB 46 41 54 33 32 20-20 20 FE 54 68 69 73 20   ^.FAT32   .This
060  69 73 20 6E 6F 74 20 61-20 62 6F 6F 74 61 62 6C   is not a bootabl

In my case, offset 0x41 has a value of 0 in both the boot sector and backup. It appears that TrueCrypt may use this byte for its own purposes.

FWIW, Starman's web site refers to this byte as "Reserved for NT":
http://mirror.href.com/thestarman/asm/mbr/MSWIN41.htm

My Win98SE boot sector looks like this:

Code:
000  EB 58 90 4D 53 57 49 4E-34 2E 31 00 02 08 20 00   .X.MSWIN4.1... .
010  02 00 00 00 00 F8 00 00-3F 00 FF 00 3F 00 00 00   ........?...?...
020  70 B7 98 00 25 26 00 00-00 00 00 00 02 00 00 00   p...%&..........
030  01 00 06 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
040  80 00 29 3A 16 E8 11 46-55 4A 5F 57 49 4E 39 38   ..):...FUJ_WIN98
050  53 45 46 41 54 33 32 20-20 20 FA 33 C9 8E D1 BC   SEFAT32   .3....

I notice that the volume name in your case appears to be encrypted, yet the text strings and Boot Parameter Block are not. That's why I suggested that you examine a known good TrueCrypt volume for comparison purposes.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 29th, 2011, 22:09 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
According to the BPB, sectors 32 and 51276 should be the first sectors of FAT #1 and FAT #2, respectively.

In your case, sectors 32 and 51276 are identical, but the following sectors are completely different.

Here is the beginning of sector 32:

Code:
000  0B AA C0 C6 FF FF FF 7F-C8 75 28 0B E5 B7 1D 99
010  02 AD 6D FB 2D EA 4F 06-60 73 C7 FB 57 D8 A5 35
020  EE 75 B5 82 17 BA F4 96-81 0D 25 9F 23 EC 97 4C
030  D1 99 0A AF 30 8E 74 D7-63 A1 2D DA 58 4B 12 26

IMO, the above does not look like a FAT structure, unless it is encrypted.

Sector 32 of my Win98SE FAT32 file system is as follows:

Code:
000  F8 FF FF 0F FF FF FF 07-18 CC 0A 00 04 00 00 00
010  05 00 00 00 06 00 00 00-07 00 00 00 08 00 00 00
020  09 00 00 00 0A 00 00 00-0B 00 00 00 0C 00 00 00
030  0D 00 00 00 0E 00 00 00-0F 00 00 00 10 00 00 00

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 30th, 2011, 1:11 
Offline

Joined: January 8th, 2011, 4:34
Posts: 11
Location: India
Quote:
So we back to the point where your volume is either corrupted or not properly mounted because of hidden volume header damage

Those sectors you provided their number calculated from the beginning of what? Outer volume, hidden volume or physical drive?


TrueCrypt mounts the hidden volume. It is Windows that cannot recognize the file system. Is this scenario possible if the header is damaged?

These sectors belong to the logical drive created by TrueCrypt for the hidden volume.

Quote:
I suspect that there is a bug in your disc editor involving the handling of <CRLF> characters, ie 0x0D and 0x0A. It appears that your editor software adds an LF character whenever it sees a CR, or vice versa.


I started with WinHex. It wouldn't let me write without a licence. So I switched to Roadkil's Sector Editor.

Quote:
IMO it is definitely not a root directory.


Well, TestDisk says it is. Possibly the product has only damaged the volume further.

Quote:
I notice that there is difference between your boot sector and backup, at byte offset 0x41.


The dump for Sector 0 is from WinHex. Maybe that's why you see a difference. I compared the two sectors - they are identical.

Quote:
I notice that the volume name in your case appears to be encrypted, yet the text strings and Boot Parameter Block are not. That's why I suggested that you examine a known good TrueCrypt volume for comparison purposes.


Here's a dump of Sector 0 from a working volume. The offset 0x41 is 00. Does it mean the boot sector of the damaged volume is actually not ok (although TestDisk may say otherwise).
Attachment:
Sec0_WorkingVolume.rar [181 Bytes]
Downloaded 280 times


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 30th, 2011, 1:58 
Offline
User avatar

Joined: September 29th, 2005, 12:02
Posts: 3577
Location: Chicago
rcube wrote:
TrueCrypt mounts the hidden volume. It is Windows that cannot recognize the file system. Is this scenario possible if the header is damaged?
These sectors belong to the logical drive created by TrueCrypt for the hidden volume.

So far FAT tables look either filled with the same pattern (zeros, for example) or not decrypted (because they identical)

I can suggest you to try one thing to test the hidden volume header but it may be dangerous, so make sure you have full copy of the physical drive before trying

If passwords for outer volume and hidden volume are the same - stop right here and do not proceed

In TrueCrypt choose you drive, press Volume Tools and select Restore Volume header. Choose - restore from backup embedded in volume. Provide password for hidden volume (make sure you providing password for hidden volume and not for outer volume)
This should grab backup copy of hidden volume header, decrypt it, encrypt it with new salt and write to working copy of hidden volume header

Try to mount hidden volume again

_________________
SAN, NAS, RAID, Server, and HDD Data Recovery.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 30th, 2011, 4:16 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 16960
Location: Australia
Your test volume has a standard looking FAT32 boot sector, although it has a different signature (MSDOS5.0). I don't know if this difference is significant.

Code:
000  EB 3C 90 4D 53 44 4F 53-35 2E 30 00 02 08 20 00   .<.MSDOS5.0... .
010  02 00 00 00 00 F8 00 00-01 00 01 00 00 00 00 00   ................
020  00 FE 9F 00 00 28 00 00-00 00 00 00 02 00 00 00   .....(..........
030  01 00 06 00 00 00 00 00-00 00 00 00 00 00 00 00   ................
040  00 00 29 73 54 8D 21 4E-4F 20 4E 41 4D 45 20 20   ..)sT.!NO NAME
050  20 20 46 41 54 33 32 20-20 20 00 00 00 00 00 00     FAT32   ......

There is no partition table, as is to be expected.

The number of heads is 1, and there are 8 sectors per cluster and 1 sector per track as before.

The backup boot sector is at sector 6.

There are two FATs, each consisting of 10240 sectors. FAT #1 begins at sector 32.

The root directory begins at the end of FAT #2, ie at sector 20512.

The volume has no name, but this time it is in plain text.

I believe byte offset 0x41 is probably a red herring, ie it probably has a genuine function that we are unaware of. I'm betting that its value changes while the volume is in use. I merely mentioned the difference because it was there.

You may like to examine sectors 32 and 20512 of your test volume just to verify that they are not encrypted.

As for the patient, if the real root directory is located at the end of FAT #2, then it should be at sector 102520 (= 0xc82c x 2 + 0x20). You may like to examine this as well.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Recovery of Damaged Filesystem
PostPosted: January 30th, 2011, 5:25 
Offline

Joined: January 8th, 2011, 4:34
Posts: 11
Location: India
Doomer wrote:
I can suggest you to try one thing to test the hidden volume header but it may be dangerous, so make sure you have full copy of the physical drive before trying

Well, I can try this out. It might take a while since I'll need to find 500 GB of free space first. I only have the logical drive imaged as of now.

fzakbar wrote:
You may like to examine sectors 32 and 20512 of your test volume just to verify that they are not encrypted.

As for the patient, if the real root directory is located at the end of FAT #2, then it should be at sector 102520 (= 0xc82c x 2 + 0x20). You may like to examine this as well.


Sectors 32 and 20512 of the test volume are not encrypted. Sector 102520 of the damaged volume again appears to be encrypted.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 65 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group