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

Ability to stop processing certain files #262

Closed
martonilles opened this issue Feb 22, 2022 · 1 comment · Fixed by #301
Closed

Ability to stop processing certain files #262

martonilles opened this issue Feb 22, 2022 · 1 comment · Fixed by #301
Assignees

Comments

@martonilles
Copy link
Contributor

martonilles commented Feb 22, 2022

It would be important for the user to be able to stop processing at the “right” level, extracting too much details would just result in garbage, too little might not extract an important part of the firmware. Ideally we want to guess the right level otherwise it would require lot of automated work.

Unfortunately just specifying depth is not enough as different firmware could contain different level of packaging.

We want to be able to stop processing based on the file types, especially the following types should not be processed further as most likely that would result in some false-positive detection:

  • media files (pictures, video content)
  • office documents
  • executable (ELF binaries & libraries)

We still want to extract other packaged contents:

  • tar.gz/bz/etc.
  • cab
  • jar
  • apk
  • deb
  • etc.

Preferably it should be configurable what file types to stop processing with a default specified above.

We can use file-magic to determine the file type. (We just want to detect if the whole file is a given type so file magic is probably a good enough option for us.

  • polyglot files could be a problem (eg: gif/rar or firmware images starting with a logo.png, but we can take care of those once see more examples)
@martonilles
Copy link
Contributor Author

  • libmagic is for skipping from processing
  • record magic/mime into metadata
    • make sure that "deepest" depth has metadata recorded even for files that are not processed
    • we can also run libmagic detection on carved out files as well, even though those are not processed, just extracted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant