forked from p34709852/monkey
Island: Remove started_on_island logic
This commit is contained in:
parent
71344bcab0
commit
9791af1d47
|
@ -172,7 +172,6 @@ def init_api_resources(api):
|
||||||
api.add_resource(PropagationCredentials, "/api/propagation-credentials/<string:guid>")
|
api.add_resource(PropagationCredentials, "/api/propagation-credentials/<string:guid>")
|
||||||
api.add_resource(RemoteRun, "/api/remote-monkey")
|
api.add_resource(RemoteRun, "/api/remote-monkey")
|
||||||
api.add_resource(VersionUpdate, "/api/version-update")
|
api.add_resource(VersionUpdate, "/api/version-update")
|
||||||
api.add_resource(StartedOnIsland, "/api/monkey_control/started_on_island")
|
|
||||||
api.add_resource(StopAgentCheck, "/api/monkey_control/needs-to-stop/<int:monkey_guid>")
|
api.add_resource(StopAgentCheck, "/api/monkey_control/needs-to-stop/<int:monkey_guid>")
|
||||||
api.add_resource(StopAllAgents, "/api/monkey_control/stop-all-agents")
|
api.add_resource(StopAllAgents, "/api/monkey_control/stop-all-agents")
|
||||||
api.add_resource(ScoutSuiteAuth, "/api/scoutsuite_auth/<string:provider>")
|
api.add_resource(ScoutSuiteAuth, "/api/scoutsuite_auth/<string:provider>")
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
import json
|
|
||||||
|
|
||||||
import flask_restful
|
|
||||||
from flask import make_response, request
|
|
||||||
|
|
||||||
from monkey_island.cc.services.config import ConfigService
|
|
||||||
|
|
||||||
|
|
||||||
class StartedOnIsland(flask_restful.Resource):
|
|
||||||
|
|
||||||
# Used by monkey. can't secure.
|
|
||||||
def post(self):
|
|
||||||
data = json.loads(request.data)
|
|
||||||
if data["started_on_island"]:
|
|
||||||
ConfigService.set_started_on_island(True)
|
|
||||||
return make_response({}, 200)
|
|
|
@ -15,7 +15,6 @@ from common.config_value_paths import (
|
||||||
PBA_LINUX_FILENAME_PATH,
|
PBA_LINUX_FILENAME_PATH,
|
||||||
PBA_WINDOWS_FILENAME_PATH,
|
PBA_WINDOWS_FILENAME_PATH,
|
||||||
SSH_KEYS_PATH,
|
SSH_KEYS_PATH,
|
||||||
STARTED_ON_ISLAND_PATH,
|
|
||||||
USER_LIST_PATH,
|
USER_LIST_PATH,
|
||||||
)
|
)
|
||||||
from monkey_island.cc.database import mongo
|
from monkey_island.cc.database import mongo
|
||||||
|
@ -405,10 +404,6 @@ class ConfigService:
|
||||||
def is_test_telem_export_enabled():
|
def is_test_telem_export_enabled():
|
||||||
return ConfigService.get_config_value(EXPORT_MONKEY_TELEMS_PATH)
|
return ConfigService.get_config_value(EXPORT_MONKEY_TELEMS_PATH)
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def set_started_on_island(value: bool):
|
|
||||||
ConfigService.set_config_value(STARTED_ON_ISLAND_PATH, value)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_config_propagation_credentials_from_flat_config(config):
|
def get_config_propagation_credentials_from_flat_config(config):
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -15,13 +15,6 @@ INTERNAL = {
|
||||||
"description": "Time to keep tunnel open before going down after last exploit "
|
"description": "Time to keep tunnel open before going down after last exploit "
|
||||||
"(in seconds)",
|
"(in seconds)",
|
||||||
},
|
},
|
||||||
"started_on_island": {
|
|
||||||
"title": "Started on island",
|
|
||||||
"type": "boolean",
|
|
||||||
"default": False,
|
|
||||||
"description": "Was exploitation started from island"
|
|
||||||
"(did monkey with max depth ran on island)",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"monkey": {
|
"monkey": {
|
||||||
|
|
Loading…
Reference in New Issue