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

Feature/report exporters #221

Merged
merged 50 commits into from Jan 26, 2019
Merged

Feature/report exporters #221

merged 50 commits into from Jan 26, 2019

Conversation

MaorCore
Copy link
Contributor

@MaorCore MaorCore commented Dec 2, 2018

Feature / Fixes

This feature integrates the monkey's report findings with the new AWS security hub service.

Changes

  • Report generation: Now the report generation is triggered when all the monkeys die but also allow for mid run report generation on demand.
  • Exporters: Right now not such a big deal, we need to decide on a place to check it on the beginning of the run - this was made in kind of a hurry and I'm open to suggestions. The list is being populated before the report generation happens and right now includes the AWS exporter.
  • AWS_exporter: This module handles the converting and sending of the monkey's issues as findings to AWS security hub service.

* Added exporters and aws exporter
* changed report generation to be automatic on monkey death with support of on-demand report generation and mongo storage
* Added boto session creation using credentials
* Added a flag in the get_config function to separate island configuration values from monkey ones.
*
* changed findings resource to ec2 instance id instead of IP
* Moved productARN to server_config.json file
* Added exporters and aws exporter
* changed report generation to be automatic on monkey death with support of on-demand report generation and mongo storage
* Added boto session creation using credentials
* Added a flag in the get_config function to separate island configuration values from monkey ones.
* changed findings resource to ec2 instance id instead of IP
* Moved productARN to server_config.json file
* switched to using the aws account id from the island's configuration page
…monkey's needs

* Removed space char from the default value of the aws keys
* Changed the submit function in the JS to point to the right endpoint
* Changed the productARN to the monkey's ARN
* Added a safe dict key access for aws_instance_id in report.py
* Added a skip in the aws_export if there is no instance_id in the issue.
* building the product ARN dynamically
* Resource type is now Other in case we dont have instance_id
* added error handling in report.py
* Added further inspection in telemtry
* Added some safe checks for formatting and happy flows
* Removed productARN from server_config.json - it will now be inserted in deb build.
* Added the awscli lib to be installed via pip
monkey/monkey_island/requirements.txt Outdated Show resolved Hide resolved
monkey/common/cloud/aws.py Outdated Show resolved Hide resolved
monkey/monkey_island/cc/resources/root.py Show resolved Hide resolved
monkey/monkey_island/cc/services/config.py Outdated Show resolved Hide resolved
monkey/monkey_island/cc/services/report.py Outdated Show resolved Hide resolved
monkey/monkey_island/cc/services/report.py Show resolved Hide resolved
monkey/monkey_island/cc/services/report.py Outdated Show resolved Hide resolved
monkey/monkey_island/cc/resources/aws_exporter.py Outdated Show resolved Hide resolved
monkey/monkey_island/cc/resources/aws_exporter.py Outdated Show resolved Hide resolved
 - started the report exporter manager singleton.
 - added region parsing using regex
 -
MaorCore and others added 7 commits December 31, 2018 14:51
…eton is created and

  populated with the relevant exporters (the aws exporter in this case)
- changed the report file to use the new exporter manager singleton
- changed the finding structure in the aws_exporter.py, divided it to creation functions
  and cleaned the code.
# Conflicts:
#	monkey/common/cloud/aws.py
#	monkey/monkey_island/cc/services/config.py
- some pep8
- Added a report json cleanup for mongo insertion, sometimes machine names are used as keys and these names might contain '.' which mongodb doesn't allow.
- Fixed a typo and aws sec hub protocol requirements
…r '.' in keys names and sometimes machine names might include '.' char in them. We encode with ',,,' and decode back to '.'.
@danielguardicore danielguardicore merged commit 10c88c0 into develop Jan 26, 2019
@danielguardicore danielguardicore deleted the feature/report_exporters branch February 10, 2019 08:26
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.

None yet

3 participants