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

p60 running, no deep extraction set #391

Closed
jblu42 opened this issue Nov 14, 2022 · 4 comments
Closed

p60 running, no deep extraction set #391

jblu42 opened this issue Nov 14, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request Extractor (Pxx) some extractor thing (Pxx modules) question Further information is requested

Comments

@jblu42
Copy link
Contributor

jblu42 commented Nov 14, 2022

Hi. I am trying to analyse parts of a firmware that I have packed into a single tar file. The tar file does include only parts the filesystem of a device because I have several tar files for different partitions on the device.

P59 correctly extracts the filesystem, but then p60_firmware_bin_extractor tries to extract linux library files and ends up with some 10k files that are no longer intact.

I use the default emba settings with full scan profile, which should not do deep extraction.

Edit: While writing this I noticed in the logs, that probably because no root filesystem is found, emba tries to deep extract the files.

Any suggestion how to disable this behaviour or a hint how emba detects if there is a root filesystem present?

@m-1-k-3 m-1-k-3 added Extractor (Pxx) some extractor thing (Pxx modules) enhancement New feature or request labels Nov 14, 2022
@m-1-k-3
Copy link
Member

m-1-k-3 commented Nov 14, 2022

You can find the detection of the root filesystem here

Probably a "disable deep extraction" mechanism makes sense

@m-1-k-3 m-1-k-3 self-assigned this Nov 14, 2022
@m-1-k-3
Copy link
Member

m-1-k-3 commented Nov 15, 2022

You should be able to disable it with the module blacklist: https://github.com/e-m-b-a/emba/wiki/Tweak-your-scan#blacklist-modules

@m-1-k-3 m-1-k-3 added the question Further information is requested label Nov 15, 2022
@jlucius
Copy link
Contributor

jlucius commented Nov 16, 2022

@m-1-k-3 Still the user that opened this ticket, for company process reasons it takes a looong time to allow official contributions and you have to jump through a lot of hoops to get there, so this is private work in private time. - end disclaimer :-)

After looking at the rootfs detection function, the filesystem in question here fails all checks, but I did see as some last resort you check where the bash is located. Unfortunately the android system also has no bash, but it has the /bin/sh as shell.
I would propose adding a rootfs check for /bin/sh, this would solve this case.
(Pull request follows)

@jblu42
Copy link
Contributor Author

jblu42 commented Nov 21, 2022

Works with provided patch

@jblu42 jblu42 closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Extractor (Pxx) some extractor thing (Pxx modules) question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants