e-m-b-a / embark

EMBArk - The firmware security scanning environment
https://www.securefirmware.de
MIT License
314 stars 46 forks source link

Different lengths of labels on X axis #95

Closed torabi12 closed 1 year ago

torabi12 commented 1 year ago

Describe the bug The graph uses non-uniform long captions, so the size may be smaller due to wrong titles.

To Reproduce Steps to reproduce the behavior:

  1. Do many scans in EMBArk for different FWs.
  2. Check the OS distribution's graph
  3. See error

Expected behavior Uniform long labels.

Screenshots image

Desktop (please complete the following information):

torabi12 commented 1 year ago

Not so nice: image

m-1-k-3 commented 1 year ago

As the correct info is shown we need to think about the way to handle this issue. Probably we could just strip the long version details (if the short one is part of the long one) for statistics?

torabi12 commented 1 year ago

I think the default label like "Linux / vX.YY.ZZZ" would be OK, the 2nd slash and the remaining parts are unnecessary.

m-1-k-3 commented 1 year ago

Not that easy, as there could be also some other kernel versions e.g. if the firmware update ships multiple kernel versions we can't drop one of them. On EMBA side I think we need to split the kernel versions and report for every kernel version a separate entry in the f50.csv. On EMBArk side we can then check for the main kernel version and use only this for the dashboard. What do you think @BenediktMKuehne ?

BenediktMKuehne commented 1 year ago

On EMBA side I think we need to split the kernel versions and report for every kernel version a separate entry in the f50.csv

I think that's unnecessary. The easiest/best would be to just change the rendering filters in EMBArk.

BenediktMKuehne commented 1 year ago

@torabi12 would you be able to test the PR for me?

git remote add testPR https://github.com/BenediktMKuehne/embark git fetch testPR git checkout testPR/95-different-lengths-of-labels-on-x-axis

and then restart the EMBArk server

torabi12 commented 1 year ago

Sure, I will, thank you. Will come back the results end of this day.

torabi12 commented 1 year ago

I went to ~/embark folder and used your commands and I started the service. The scan was OK, I followed the logs in putty:

kép

The detailed view is also OK: kép

but the main dashboard is emtpy now:

kép

This was a clean system, I installed it a few days ago. I didn't execute the emba_updater before the git commands. Do you think it is worth to make a brand new installation with testPR/95-different-lengths-of-labels-on-x-axis? I mean $ git clone https://github.com/BenediktMKuehne/embark.git -b 95-different-lengths-of-labels-on-x-axis ?

BenediktMKuehne commented 1 year ago

No, It shouldn't make a difference I probably made a mistake 😅

torabi12 commented 1 year ago

If there's a version I can try, please let me know and I'll be happy to test it.

BenediktMKuehne commented 1 year ago

@torabi12 Now it should work

torabi12 commented 1 year ago

I tested with the same kkeps.bin file, which has a long kernel version but sorry I have the same empty dashboard at the end. Another issue is that the vendor and label creation does not work for me: kép

the same error for the label creation also.

I followed the scan from terminal and it was OK:

kép

The details page looks fine: kép

torabi12 commented 1 year ago

I checked again the story on a clean Ubuntu server. I installed $ git clone https://github.com/BenediktMKuehne/embark.git -b 95-different-lengths-of-labels-on-x-axis but the issues were the same. The scan went fine but the dashboard is empty. I was not able to add vendor and label to the firmware, I got AttributeError like above.

BenediktMKuehne commented 1 year ago

@torabi12 now everything should work as expected

torabi12 commented 1 year ago

It works, but the linux label is long on the dashboard: kép

and on the details page: kép

Adding vendor and label were OK also.

torabi12 commented 1 year ago

I may not need to bother with this, but since I've run quite a few tests with partial module selection where S24 was not running, each of these cases has a separate anonymous graph displayed on the dashboard. I think that when running a partial scan you should not create a separate column, which might make the statistics worse, but might give a more accurate result.

kép

BenediktMKuehne commented 1 year ago

I'll have to test that particular firmware to find out where that graph comes from. And adjust the truncation.

torabi12 commented 1 year ago

I tried today the actual EMBArk, after a scan the dashboard is empty, the entropy frame is missing and detailed view's graphs are also missing. image

image

and the values are all 0:(

torabi12 commented 1 year ago

I did a new installation of EMBArk today with a basic scan and the details page is OK: kép

but the dashboard left empty after the scan: kép

during the scan the terminal dropped these: kép

Maybe it does not count but I wanted to share with you.

torabi12 commented 1 year ago

The FW counter and the CPU/MEM graph are working: kép

but the others are empty for me.