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

Add json output #120

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

xC0uNt3r7hr34t
Copy link
Contributor

Add the global option to output results as a json file instead of csv.

Changes applied to surveyor.py and each of the product files.
SentinelOne has been tested and validated to work, I do not have access to test other EDRs. I am also a bit unsure as to how to still categorize outputs with the appropriate tags.

Resolves #90

@rc-abodkins
Copy link
Contributor

Currently this feature would only work for S1. Before rolling this out we would want this feature parity across all supported EDR products.

@xC0uNt3r7hr34t
Copy link
Contributor Author

changes were added for all product files, however I do not have the capability to test each edr due to access limitations.

@rc-csmith rc-csmith self-requested a review August 9, 2023 15:02
Copy link
Contributor

@rc-csmith rc-csmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple design questions only added to the S1 product since they are the same across products.

@TreWilkinsRC - just a heads up it looks like this PR is closely related to your work on having Surveyor return raw results

products/sentinel_one.py Outdated Show resolved Hide resolved
products/sentinel_one.py Outdated Show resolved Hide resolved
Comment on lines +667 to +669
if self._json:
self._results[merged_tag] = dict()
self._results[merged_tag] = events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the code be configured to use the existing Result class? The type defined for self._results[merged_tag] is a list of Result objects rather than a dictionary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to be tricky. since the Result class uses specific data fields that won't be filled in when just dumping the raw json response. the response is not parsed when using the --json option and is meant to output the raw data object within the json response. With this method an analyst, could import the raw json into a SIEM or other tool to perform additional analysis.

surveyor.py Outdated Show resolved Hide resolved
surveyor.py Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

[FR] Add Support for JSON Output
3 participants