ucsb-seclab / karonte

Karonte is a static analysis tool to detect multi-binary vulnerabilities in embedded firmware
BSD 2-Clause "Simplified" License
391 stars 60 forks source link

Upgrade to python 3 and Angr 9.0 #13

Closed cpbscholten closed 3 years ago

cpbscholten commented 3 years ago

This pull request updates the Karonte framework to Python 3 and Angr 9.0 with many other fixes and changes. I have used a modified version of Karonte for my master's thesis and using this PR I want to contribute back my improvements to the framework.

It contains a lot of changes, but the changes are so intertwined that it became impossible to split up in multiple PR's.

Changes

There are still some small issues remaining:

JonathanGoikhman commented 3 years ago

Hi, thanks for your work. I do have a problem when running karonte.py. I get the error: self._pickle_parsers = self._config['pickle_parsers'] KeyError: 'pickle_parsers' This field can be empty, isn't he? When I run the tool, i get: INFO | 2021-08-21 08:35 | Karonte | Extracting firmware image. This may take a while... INFO | 2021-08-21 08:35 | Karonte | Logging at: /tmp/Karonte.txt_42 INFO | 2021-08-21 08:35 | Karonte | Firmware directory: /tmp/fw/DIR823A1_FW100WWb05.bin INFO | 2021-08-21 08:35 | Karonte | Retrieving Border Binaries ERROR | 2021-08-21 08:35 | Karonte | No border binaries found, exiting... INFO | 2021-08-21 08:35 | Karonte | Finished, results in /tmp/Karonte.txt_42 0

zardus commented 3 years ago

@badnack @Machiry , any objections to merging this in? I guess the current version no longer works anyways. If we merge this in and add testcases, we could keep karonte alive forever :-)

cpbscholten commented 3 years ago

Hi, thanks for your work. I do have a problem when running karonte.py. I get the error: self._pickle_parsers = self._config['pickle_parsers'] KeyError: 'pickle_parsers' This field can be empty, isn't he? When I run the tool, i get: INFO | 2021-08-21 08:35 | Karonte | Extracting firmware image. This may take a while... INFO | 2021-08-21 08:35 | Karonte | Logging at: /tmp/Karonte.txt_42 INFO | 2021-08-21 08:35 | Karonte | Firmware directory: /tmp/fw/DIR823A1_FW100WWb05.bin INFO | 2021-08-21 08:35 | Karonte | Retrieving Border Binaries ERROR | 2021-08-21 08:35 | Karonte | No border binaries found, exiting... INFO | 2021-08-21 08:35 | Karonte | Finished, results in /tmp/Karonte.txt_42 0

Right now, just as in the current version of Karonte, the pickle_parsers cannot be empty.

Did you install the dependencies for the extractor? See: https://github.com/cpbscholten/karonte/blob/master/tool/libraries/extractor/README.md

JonathanGoikhman commented 3 years ago

Hi, thanks for your work. I do have a problem when running karonte.py. I get the error: self._pickle_parsers = self._config['pickle_parsers'] KeyError: 'pickle_parsers' This field can be empty, isn't he? When I run the tool, i get: INFO | 2021-08-21 08:35 | Karonte | Extracting firmware image. This may take a while... INFO | 2021-08-21 08:35 | Karonte | Logging at: /tmp/Karonte.txt_42 INFO | 2021-08-21 08:35 | Karonte | Firmware directory: /tmp/fw/DIR823A1_FW100WWb05.bin INFO | 2021-08-21 08:35 | Karonte | Retrieving Border Binaries ERROR | 2021-08-21 08:35 | Karonte | No border binaries found, exiting... INFO | 2021-08-21 08:35 | Karonte | Finished, results in /tmp/Karonte.txt_42 0

Right now, just as in the current version of Karonte, the pickle_parsers cannot be empty.

Did you install the dependencies for the extractor? See: https://github.com/cpbscholten/karonte/blob/master/tool/libraries/extractor/README.md

Yes, I can run this script no problems. So how should I run the tool (What do I specify in pickle_parsers field)? If I put the blank space this is the output, If i leave it empy I get 'KeyError' because it's empty. Is there a way to get the pk file?

conand commented 3 years ago

Merged. Thanks, Christian @cpbscholten!