Coder Social home page Coder Social logo

FR: Extract deleted files about ubidump HOT 5 CLOSED

nlitsme avatar nlitsme commented on August 19, 2024
FR: Extract deleted files

from ubidump.

Comments (5)

nlitsme avatar nlitsme commented on August 19, 2024

Do you have a sample file which shows such behaviour?

from ubidump.

mefistotelis avatar mefistotelis commented on August 19, 2024

Sure, here it is:
https://mega.nz/#!kMNG0aZJ!4BUpubhBGvQsFkAyVTGSoH-haQSiwmHY1BljSHPkYwA

It is a raw image dd'ed from NAND. If you grep it, you will find directory entry with files like "gs_ofdm.bin" and "usbupdate.tar.gz". These files do not exist in extracted tree.

from ubidump.

nlitsme avatar nlitsme commented on August 19, 2024

in an ubifs image you can sort of go back in time by starting from an older master block.
I will think of a way to implement this.

The find_most_recent_master function is there to find the most recent masterblock.

from ubidump.

nlitsme avatar nlitsme commented on August 19, 2024

I investigated, using older master blocks works only up to a point where essential blocks got overwritten. There are obviously several unreachable directory trees present in your image. This would require more extensive analysis of unused blocks to be able to recover those. And i think you would be able to extract only partial data, since parts would already be overwritten by newer data.

from ubidump.

mefistotelis avatar mefistotelis commented on August 19, 2024

Yes, that's what most recovery tools allow (there's no tool for UbiFS though) - scanning the surface for directory entries, then removing duplicates and cutting files which blocks are now reused, then allowing to write the remaining structure. Directories without parent have some replacement name given, ie. "foundNNN".

This way some recovered files end abruptly, other have invalid content as it was overwritten and freed more times; but many files can be recovered.

There are even tools which go as far as scanning for known file types, to recover files which are no longer pointed by any directory entry. I don't think we need this here, but there is a possibility - ie. search for "RIFF" to find WAVes and AVIs, or for "JFIF"/"PNG" to find images - or just use linux 'file' utility to find the known types for you.

from ubidump.

Related Issues (17)

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.