Giter Site home page Giter Site logo

afro's Introduction

This project is not maintained any more.

Feel free to fork it. If you have an active fork and you want to be linked here you can contact me.

afro logo

afro (APFS file recovery) Build Status

afro can parse APFS volumes. It can also recover deleted files from APFS that other tools do not find.

Installation

git clone https://github.com/cugu/afro
cd afro
python3 setup.py install

Usage

AFRO needs to know the start of the APFS partition. The partition can be found out as described below.

Export partition

AFRO needs to know the start of the APFS container, you can find the start of the APFS container using mmls from the sleuthkit.

mmls test/wsdf.dmg

This results in:

GUID Partition Table (EFI)
Offset Sector: 0
Units are in 512-byte sectors

      Slot      Start        End          Length       Description
000:  Meta      0000000000   0000000000   0000000001   Safety Table
001:  -------   0000000000   0000000039   0000000040   Unallocated
002:  Meta      0000000001   0000000001   0000000001   GPT Header
003:  Meta      0000000002   0000000033   0000000032   Partition Table
004:  000       0000000040   0000195319   0000195280   disk image
005:  -------   0000195320   0000195352   0000000033   Unallocated

You have to search for the APFS partition in this list. In the example above 004 is the APFS partition which starts at offset 40. -o 40 needs to be included in the following commands. APFS is not recognized by the sleuth kit so the description is only disk image.

Export files

All files of an apfs image can be extracted using the following command:

afro -o 40 -e files test/wsdf.dmg

The exported files are saved in a folder named after the image with the suffix '.extracted'. Because APFS images can contain multiple volumes, each volume is extracted into a separate folder inside the '.extracted' folder. Each volume can contain multiple versions of the file system which are stored in separate numbered folders. Inside those folders two folders exists 'private-dir' and 'root'. Those folders are not visible to the user, but exist on every APFS file system.

Example:

wsdf.dmg.carve_apsb.extracted
├─ wsdf                  <- First volume
│  ├─ 5                  <- First version
│  │  ├─ private-dir
│  │  └─ root            <- Root directory
│  │     ├─ folder
│  │     │  └─ foo.txt
│  │     └─ bar.txt
│  └─ 6                  <- Second version
│     └─ …
└─ my_volume_name        <- Second volume
   └─ …

Create body file

To get an overview over the files a body file can be created:

afro -o 40 -e bodyfile test/wsdf.dmg

More information on the body file format can be found in the sleuthkit wiki. The body file can be further investigated using mactime and Timeline Explorer.

Documentation on APFS

Contributing

Pull requests and issues are welcome!

Licenses

The afro software is licensed as GPLv3. The ksy file (libapfs/apfs.ksy) is licensed under MIT license.

afro's People

Contributors

cugu avatar shoaloak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.