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

Retrieve Vulnerability Results from JSON/Pickle #10

Closed
nstarke opened this issue Aug 13, 2019 · 4 comments
Closed

Retrieve Vulnerability Results from JSON/Pickle #10

nstarke opened this issue Aug 13, 2019 · 4 comments

Comments

@nstarke
Copy link
Contributor

nstarke commented Aug 13, 2019

Is there currently a way to retrieve the vulnerability output that is displayed on STDOUT during a Discover_and_Dump session? I would assume all the information is in the json output, but there is a lot of data there. Any suggestions you might have would be greatly appreciated, and as always, I'll be happy to send a PR with documentation updates with any information provided. Thanks again!

@ChrisTheCoolHut
Copy link
Owner

ChrisTheCoolHut commented Aug 14, 2019

Hi @nstarke!

After a Discover and Dump is run four files should be created:

<dump_name>.all.json  <dump_name>.all.pickle  <dump_name>.json  <dump_name>.pickle

The <dump_name>.pickle will have a reduced list of functions that were found to be vulnerable.

If you want the same STDOUT as Discover and Dump I'd recommend stealing the print_function and loading that pickle.

I just moved the print_function into ghidra_handler from Discover and Dump in 5c5d2d1, so the below script should do what you need.

import pickle
from firmware_slap.ghidra_handler import print_function
pickle_name = "Your_results.pickle"
with open(pickle_name, 'rb') as f:
    results = pickle.load(f)
for result in results:
    print_function(result)

@nstarke
Copy link
Contributor Author

nstarke commented Aug 14, 2019

Works like a charm, would there be any value in adding this snippet as a script in bin? I'd be happy to submit a PR if so.

@ChrisTheCoolHut
Copy link
Owner

I'm close to having #2 ready and I imagine the main use of the JSON will be loading it into Kibana, so you get a vulnerability dashboard.

We could add the script to the bin folder, but no export it in the setup.py so it'd be there if you wanted it.
VulnerabilitiesDashboard (3)

@nstarke
Copy link
Contributor Author

nstarke commented Aug 14, 2019

I'll probably just hold off until the ELK stuff is finished and consume the vuln data that way.

Just as an aside, I've had some really great results running firmware slap against firmware images for my day job. Thanks for all the hard work!

Closing now.

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

No branches or pull requests

2 participants