All Projects → Gregwar → Fatcat

Gregwar / Fatcat

Licence: mit
FAT filesystems explore, extract, repair, and forensic tool

Projects that are alternatives of or similar to Fatcat

Imm2Virtual
This is a GUI (for Windows 64 bit) for a procedure to virtualize your EWF(E01), DD (raw), AFF disk image file without converting it, directly with VirtualBox, forensically proof.
Stars: ✭ 40 (-80.1%)
Mutual labels:  disk, filesystem, forensics
toolkit
some useful library of the php
Stars: ✭ 15 (-92.54%)
Mutual labels:  system, filesystem
btrfscue
Recover files from damaged BTRFS filesystems
Stars: ✭ 28 (-86.07%)
Mutual labels:  forensics, recovery
findlargedir
find all "blackhole" directories with a huge amount of filesystem entries in a flat structure
Stars: ✭ 15 (-92.54%)
Mutual labels:  system, filesystem
paragon apfs sdk ce
Paragon APFS SDK Free
Stars: ✭ 97 (-51.74%)
Mutual labels:  filesystem, forensics
Aqeous
(Inactive, Checkout AvanaOS, Rewrite of this) This is a New Operating System (Kernel right now). Made completely from scratch, We aim to make a complete OS for Learning purpose
Stars: ✭ 23 (-88.56%)
Mutual labels:  system, filesystem
watcher
The file system watcher that strives for perfection, with no native dependencies and optional rename detection support.
Stars: ✭ 37 (-81.59%)
Mutual labels:  system, filesystem
sqbrite
SQBrite is a data recovery tool for SQLite databases
Stars: ✭ 27 (-86.57%)
Mutual labels:  forensics, recovery
Discutils
Utility libraries to interact with discs, filesystem formats and more
Stars: ✭ 417 (+107.46%)
Mutual labels:  filesystem, disk
Seqbox
A single file container/archive that can be reconstructed even after total loss of file system structures
Stars: ✭ 480 (+138.81%)
Mutual labels:  recovery, forensics
Testdisk
TestDisk & PhotoRec
Stars: ✭ 511 (+154.23%)
Mutual labels:  filesystem, disk
BlockHashLoc
Recover files using lists of blocks hashes, bypassing the File System entirely
Stars: ✭ 45 (-77.61%)
Mutual labels:  forensics, recovery
Advanced-xv6
Modern improvements for MIT's xv6 OS
Stars: ✭ 26 (-87.06%)
Mutual labels:  disk, filesystem
Backup And Recovery Howtos
Guides to setting up a media storage system, backing it up, and recovering from failures
Stars: ✭ 235 (+16.92%)
Mutual labels:  recovery, filesystem
Node Ntfs
Windows NT File System (NTFS) file system driver
Stars: ✭ 18 (-91.04%)
Mutual labels:  filesystem, disk
Recuperabit
A tool for forensic file system reconstruction.
Stars: ✭ 280 (+39.3%)
Mutual labels:  disk, forensics
Heim
Cross-platform async library for system information fetching 🦀
Stars: ✭ 572 (+184.58%)
Mutual labels:  disk, system
Filesystem
FileSystem is an application that allows you to browse the content of your iPhone disk, displaying file and folders, files contents, and detailed informations about file and folder permissions.
Stars: ✭ 148 (-26.37%)
Mutual labels:  filesystem, disk
Chubaofs
ChubaoFS (abbrev. CBFS) is a cloud native distributed file system and object store.
Stars: ✭ 2,482 (+1134.83%)
Mutual labels:  filesystem
Pypowershellxray
Python script to decode common encoded PowerShell scripts
Stars: ✭ 192 (-4.48%)
Mutual labels:  forensics

fatcat

fatcat

This tool is designed to manipulate FAT filesystems, in order to explore, extract, repair, recover and forensic them. It currently supports FAT12, FAT16 and FAT32.

Tutorials & examples

Building and installing

You can build fatcat this way:

mkdir build
cd build
cmake ..
make

And then install it:

make install

Exploring

Using fatcat

Fatcat takes an image as argument:

fatcat disk.img [options]

NOTE: according to your build, you might have to specify options before disk.img, i.e fatcat [options] disk.img

You can specify an offset in the file with -O, this could be useful if there is multiple partitions on a block devices, for instance:

fatcat disk.img -O 1048576 [options]

This will tell fatcat to begin on the 1048576th byte. Have a look to the partition tutorial.

Listing

You can explore the FAT partition using -l option like this:

$ fatcat disk.img -l /
Listing path /
Cluster: 2
d 24/10/2013 12:06:00  some_directory/                c=4661
d 24/10/2013 12:06:02  other_directory/               c=4662
f 24/10/2013 12:06:40  picture.jpg                    c=4672 s=532480 (520K)
f 24/10/2013 12:06:06  hello.txt                      c=4671 s=13 (13B)

You can also provide a path like -l /some/directory.

Using -L, you can provide a cluster number instead of a path, this may be useful sometime.

If you add -d, you will also see deleted files.

In the listing, the prefix is f or d to tell if the line concerns a file or a directory.

The c= indicates the cluster number, s= indicates the site in bytes (which should be the same as the pretty size just after).

The h letter at the end indicates that the file is supposed to be hidden.

The d letter at the end indicates that the file was deleted.

Reading a file

You can read a file using -r, the file will be wrote on the standard output:

$ fatcat disk.img -r /hello.txt
Hello world!
$ fatcat disk.img -r /picture.jpg > save.jpg

Using -R, you can provide a cluster number instead of a path, but the file size information will be lost and the file will be rounded to the number of clusters it fits, unless you provide the -s option to specify the file size to read.

You can use -x to extract the FAT filesystem directories to a directory:

fatcat disk.img -x output/

If you want to extract from a certain cluster, provide it with -c.

If you provide -d to extract, deleted files will be extracted too.

Undelete

Browsing deleted files & directories

As explaines above, deleted files can be found in listing by providing -d:

$ fatcat disk.img -l / -d
f 24/10/2013 12:13:24  delete_me.txt                  c=5764 s=16 (16B) d

You can explore and spot a file or an interesting deleted directory.

Retrieving deleted file

To retrieve a deleted file, simply use -r to read it. Note that the produced file will be read contiguously from the original FAT system and may be broken.

Retreiving deleted directory

To retrieve a deleted directory, note its cluster number and extract it like above:

# If your deleted directory cluster is 71829
fatcat disk.img -x output/ -c 71829

See also: undelete tutorial

Recover

Damaged file system

Assuming your disk has broken sectors, you may want to do recovering on it.

The first advice is to make a copy of your data using ddrescue, and save your disk to another one or into a sane file.

When sectors are broken, their bytes will be replaced with 0s in the ddrescue image.

A first way to go is trying to explore your image using -l as above and check -i to find out if fatcat recognizes the disk as a FAT system.

Then, you can try to have a look at -2, to check if the file allocation tables differs, and if it looks mergeable. It is very likely that is will be mergeable, in this case, you can try -m to merge the FAT tables, don't forget to backup it before (see below).

Orphan files

When your filesystem is broken, there are files and lost files and lost directories that we call "orphaned", because you can't reach them from the normal system.

fatcat provides you an option to find those nodes, it will do an automated analysis of your system and explore allocated sectors of your filesystem, this is done with -o.

You will get a list of directories and files, like this:

There is 2 orphaned elements:
Directory clusters 4592 to 4592: 2 elements, 49B
File clusters 4611 to 4611: ~512B

You can then use directly -L and -R to have a look into those files and directories:

$ fatcat disk.img -L 4592
Listing cluster 4592
Cluster: 4592
d 23/10/2013 17:45:06  ./                             c=4592
d 23/10/2013 17:45:06  ../                            c=0
f 23/10/2013 17:45:22  poor_orphan.txt                c=4601 s=49 (49B)

Note that orphan files have an unknown size, this mean that if you read it, you will get a file that is a multiple of the cluster sizes.

See also: orphaned files tutorial

Hacking

You can use fatcat to hack your FAT filesystem

Informations

The -i flag will provide you a lot of information about the filesystem:

fatcat disk.img -i

This will give you headers data like sectors sizes, fats sites, disk label etc. It will also read the FAT table to estimate the usage of the disk.

You can also get information about a specific cluster by using [email protected]:

fatcat disk.img [email protected] 1384

This will give you the cluster address (offset of the cluster in the filesystem) and the value of the next cluster in the two FAT tables.

Backuping & restoring FAT

You can use -b to backup your FAT tables:

fatcat disk.img -b backup.fats

And use -p to write it back:

fatcat disk.img -p backup.fats

Writing to the FATs

You can write to the FAT tables with -w and -v:

fatcat disk.img -w 123 -v 124

This will write 124 as value of the next cluster of 123.

You can also choose the table with -t, 0 is both tables, 1 is the first and 2 the second.

Diff & merge the FATs

You can have a look at the diff of the two FATs by using -2:

# Watching the diff
$ fatcat disk.img -2
Comparing the FATs

FATs are exactly equals

# Writing 123 in the 500th cluster only in FAT1
$ fatcat disk.img -w 500 -v 123 -t 1
Writing next cluster of 500 from 0 to 123
Writing on FAT1

# Watching the diff
$ fatcat disk.img -2
Comparing the FATs
[000001f4] 1:0000007b 2:00000000

FATs differs
It seems mergeable

You can merge two FATs using -m. For each different entries in the table, if one is zero and not the other, the non-zero file will be choosen:

$ fatcat disk.img -m
Begining the merge...
Merging cluster 500
Merge complete, 1 clusters merged

See also: fixing fat tutorial

Directories fixing

Fatcat can fix directories having broken FAT chaining.

To do this, use -f. All the filesystem tree will be walked and the directories that are unallocated in the FAT but that fatcat can read will be fixed in the FAT.

Entries hacking

You can have information about an entry with -e:

fatcat disk.img -e /hello.txt

This will display the address of the entry (not the file itself), the cluster reference and the file size (if not a directory).

You can add the flag -c [cluster] to change the cluster of the entry and the flag -s [size] to change the entry size.

See also: fun with fat tutorial

You can use -k to search for a cluster reference.

Erasing unallocated files

You can erase unallocated sectors data, with zeroes using -z, or using random data using -S.

For instance, deleted files will then become unreadables.

LICENSE

This is under MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].