Island: Remove /api/monkey_control/check_remote_port/<string:port>

This commit is contained in:
Mike Salvatore 2021-12-07 13:25:16 -05:00
parent 476b6c3b36
commit 5052e21d97
3 changed files with 1 additions and 16 deletions

View File

@ -33,6 +33,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
- Max iterations and timeout between iterations config options. #1600
- MITRE ATT&CK configuration screen. #1532
- Propagation credentials from "GET /api/monkey/<string:guid>" endpoint. #1538
- "GET /api/monkey_control/check_remote_port/<string:port>" endpoint. #1635
### Fixed
- A bug in network map page that caused delay of telemetry log loading. #1545

View File

@ -30,7 +30,6 @@ from monkey_island.cc.resources.island_mode import IslandMode
from monkey_island.cc.resources.local_run import LocalRun
from monkey_island.cc.resources.log import Log
from monkey_island.cc.resources.monkey import Monkey
from monkey_island.cc.resources.monkey_control.remote_port_check import RemotePortCheck
from monkey_island.cc.resources.monkey_control.started_on_island import StartedOnIsland
from monkey_island.cc.resources.monkey_control.stop_agent_check import StopAgentCheck
from monkey_island.cc.resources.monkey_download import MonkeyDownload
@ -173,7 +172,6 @@ def init_api_resources(api):
api.add_resource(PropagationCredentials, "/api/propagationCredentials")
api.add_resource(RemoteRun, "/api/remote-monkey", "/api/remote-monkey/")
api.add_resource(VersionUpdate, "/api/version-update", "/api/version-update/")
api.add_resource(RemotePortCheck, "/api/monkey_control/check_remote_port/<string:port>")
api.add_resource(StartedOnIsland, "/api/monkey_control/started_on_island")
api.add_resource(StopAgentCheck, "/api/monkey_control/<int:monkey_guid>")
api.add_resource(ScoutSuiteAuth, "/api/scoutsuite_auth/<string:provider>")

View File

@ -1,14 +0,0 @@
import flask_restful
from flask import request
from monkey_island.cc.services.remote_port_check import check_tcp_port
class RemotePortCheck(flask_restful.Resource):
# Used by monkey. can't secure.
def get(self, port):
if port and check_tcp_port(request.remote_addr, port):
return {"status": "port_visible"}
else:
return {"status": "port_invisible"}