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 API endpoint for ransomware report #1297

Merged
merged 3 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Scripts to build an AppImage for Monkey Island. #1069, #1090, #1136
- `log_level` option to server config. #1151
- A ransomware simulation payload. #1238
- API endpoint for ransomware report. #1297

### Changed
- server_config.json can be selected at runtime. #963
Expand Down
2 changes: 2 additions & 0 deletions monkey/monkey_island/cc/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from monkey_island.cc.resources.node_states import NodeStates
from monkey_island.cc.resources.pba_file_download import PBAFileDownload
from monkey_island.cc.resources.pba_file_upload import FileUpload
from monkey_island.cc.resources.ransomware_report import RansomwareReport
from monkey_island.cc.resources.remote_run import RemoteRun
from monkey_island.cc.resources.root import Root
from monkey_island.cc.resources.security_report import SecurityReport
Expand Down Expand Up @@ -149,6 +150,7 @@ def init_api_resources(api):
api.add_resource(SecurityReport, "/api/report/security")
api.add_resource(ZeroTrustReport, "/api/report/zero-trust/<string:report_data>")
api.add_resource(AttackReport, "/api/report/attack")
api.add_resource(RansomwareReport, "/api/report/ransomware")

api.add_resource(ZeroTrustFindingEvent, "/api/zero-trust/finding-event/<string:finding_id>")
api.add_resource(TelemetryFeed, "/api/telemetry-feed", "/api/telemetry-feed/")
Expand Down
10 changes: 10 additions & 0 deletions monkey/monkey_island/cc/resources/ransomware_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import flask_restful
from flask import jsonify

from monkey_island.cc.resources.auth.auth import jwt_required


class RansomwareReport(flask_restful.Resource):
@jwt_required
def get(self):
return jsonify({"report": None})