Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse MFT records based on segment numbers #665

Open
Zawadidone opened this issue Apr 4, 2024 · 5 comments · May be fixed by #672
Open

Parse MFT records based on segment numbers #665

Zawadidone opened this issue Apr 4, 2024 · 5 comments · May be fixed by #672
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Zawadidone
Copy link
Contributor

Zawadidone commented Apr 4, 2024

I would like to select which MFT records the MFT plugin outputs based on segment numbers. For example, target-query TARGET -f mft --fs 1 --segments 0-9 executes the MFT plugin to output the first ten MFT records of the first NTFS filesystem of a target.

We use Dissect Target as part of an automated processing pipeline that has 15 CPU's available to execute plugins on a target using xargs. Of all the plugins the MFT plugin takes the longest of all plugins, this varies from a few minutes to a few hours. Because of that we would like to speed up the processing of MFT records.

I don't know if this should be part of Dissect Target or that we will just use a custom MFT plugin with some BASH commands.

@Schamper Schamper added the enhancement New feature or request label Apr 5, 2024
@Schamper
Copy link
Member

Schamper commented Apr 5, 2024

This will also require a small change in dissect.ntfs: https://github.com/fox-it/dissect.ntfs/blob/d6c039c6b4959a5d1ea5b012673813d2ce91693a/dissect/ntfs/mft.py#L123-L134

Overall should be a pretty easy and good addition!

@Zawadidone
Copy link
Contributor Author

@Schamper is the order in which filesystems are loaded into a target always the same?

@Schamper
Copy link
Member

Schamper commented Apr 8, 2024

That should be deterministic, yes.

@Zawadidone
Copy link
Contributor Author

Zawadidone commented Apr 9, 2024

@Schamper what would be the most wise way to do this by modifying the MFT plugin or by creating a new custom MFT plugin, outside of Dissect Target.

  1. Open the target and list the NTFS filesystems and the amount of segments these have, e.g. {0: 100, 1:50}.
  2. Execute the mft function with the arguments, e.g. --fs 0 --start 0 --end 50 - Yield MFT segments in specified range #672.
  3. Repeat these steps for the childrens of the target.

@Zawadidone Zawadidone linked a pull request Apr 9, 2024 that will close this issue
@Zawadidone
Copy link
Contributor Author

Nevermind forget about the last step, it should only support a single target just like the ICat plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants