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

Firmware diffing preparation #804

Merged
merged 26 commits into from Oct 4, 2023
Merged

Conversation

m-1-k-3
Copy link
Member

@m-1-k-3 m-1-k-3 commented Sep 27, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature, Bug fix

  • What is the current behavior? (You can also link to an open issue here)

No firmware diffing possibilities

  • What is the new behavior (if this is a feature change)? If possible add a screenshot.

This is a preparation PR for the upcoming firmware diffing mechanism
This PR includes multiple bug fixes and introduces the new -o parameter for the upcoming firmware diffing mechanism

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Firmware diffing preparation. Please review the current state and check the functionality and the working of the web report.

@m-1-k-3 m-1-k-3 added bug Something isn't working enhancement New feature or request Core modules (Sxx) The core scanning modules (Sxx modules) EMBA labels Sep 27, 2023
@torabi12
Copy link

I wanted to try out the FW compare function with this command:

$ sudo ./emba -l ~/GS1200 -f ~/GS1200-5_V1.00ABKM.5C0.bin -t -s -z -W -X V1.00ABKM.5C0 -Y ZyXEL -N GS1200-5 -o ~/GS1200-5_V2.00ABKM.2C0.bin

but the scan stopped at the beginning:

kép

I installed the fw_differ version. Maybe I did not use correctly the parameters?

@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Sep 29, 2023

@torabi12 this is fine :) The diffing modules are currently not included. This PR is for preparing everything around them and to ensure nothing is broken.

@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Sep 29, 2023

Started with a wiki entry for the diffing mode here: https://github.com/e-m-b-a/emba/wiki/Firmware-diffing

@BenediktMKuehne
Copy link
Member

tests look good

@BenediktMKuehne BenediktMKuehne merged commit 41a5a53 into e-m-b-a:master Oct 4, 2023
12 checks passed
@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Oct 23, 2023

I wanted to try out the FW compare function with this command:

$ sudo ./emba -l ~/GS1200 -f ~/GS1200-5_V1.00ABKM.5C0.bin -t -s -z -W -X V1.00ABKM.5C0 -Y ZyXEL -N GS1200-5 -o ~/GS1200-5_V2.00ABKM.2C0.bin

but the scan stopped at the beginning:

kép

I installed the fw_differ version. Maybe I did not use correctly the parameters?

Should work now with the current master branch. Feedback welcome :) See also here https://github.com/e-m-b-a/emba/wiki/Firmware-diffing

@torabi12
Copy link

I selected a classic router E1200 from Linksys, starting with this command:

$ sudo ./emba -l ~/E1200_diff -f ~/1.0.04.001_US_20120307.bin -o ~/2.0.11.001_US_20180910.bin

I cought the beginning:

kép

and after a few seconds it has finished:
kép

The report is this:
E1200_html_report.tar.gz

Is this what we expect from the comparison?

@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Oct 23, 2023

Shit ... We need to update our container first

@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Oct 25, 2023

@torabi12 docker image should be ready. Dep checker should now also check for ssdeep

@torabi12
Copy link

torabi12 commented Oct 25, 2023

I repeated the same test:

kép

End of compare:
kép

Report of the scan:
E1200_diff_report.tar.gz

Maybe I should try with different binaries?

@m-1-k-3
Copy link
Member Author

m-1-k-3 commented Oct 25, 2023

Firmware differ did a quite good job :)

It looks as there are a lot of changes between these two firmware images:

Extracted files: 506 │
vs
Extracted files: 1475 │

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core modules (Sxx) The core scanning modules (Sxx modules) EMBA enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants