From b1c125f420ee01bdc8953386e88d96c49807df2b Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 7 Apr 2022 12:11:47 -0400 Subject: [PATCH] Island: Remove disused T1216 file download endpoint --- CHANGELOG.md | 1 + monkey/monkey_island/cc/app.py | 3 --- .../cc/resources/T1216_pba_file_download.py | 20 ------------------- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 monkey/monkey_island/cc/resources/T1216_pba_file_download.py diff --git a/CHANGELOG.md b/CHANGELOG.md index a87f42c23..12e94cbbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - Struts2 exploiter. #1869 - Drupal exploiter. #1869 - WebLogic exploiter. #1869 +- The /api/t1216-pba/download endpoint. #1864 ### Fixed - A bug in network map page that caused delay of telemetry log loading. #1545 diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index 863a88909..b4413e7a5 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -6,7 +6,6 @@ import flask_restful from flask import Flask, Response, send_from_directory from werkzeug.exceptions import NotFound -from common.common_consts.api_url_consts import T1216_PBA_FILE_DOWNLOAD_PATH from monkey_island.cc.database import database, mongo from monkey_island.cc.resources.agent_controls import StopAgentCheck, StopAllAgents from monkey_island.cc.resources.attack.attack_report import AttackReport @@ -41,7 +40,6 @@ 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 -from monkey_island.cc.resources.T1216_pba_file_download import T1216PBAFileDownload from monkey_island.cc.resources.telemetry import Telemetry from monkey_island.cc.resources.telemetry_feed import TelemetryFeed from monkey_island.cc.resources.version_update import VersionUpdate @@ -153,7 +151,6 @@ def init_api_resources(api): api.add_resource(Log, "/api/log") api.add_resource(IslandLog, "/api/log/island/download") api.add_resource(PBAFileDownload, "/api/pba/download/") - api.add_resource(T1216PBAFileDownload, T1216_PBA_FILE_DOWNLOAD_PATH) api.add_resource( FileUpload, "/api/fileUpload/", diff --git a/monkey/monkey_island/cc/resources/T1216_pba_file_download.py b/monkey/monkey_island/cc/resources/T1216_pba_file_download.py deleted file mode 100644 index 906d4c97f..000000000 --- a/monkey/monkey_island/cc/resources/T1216_pba_file_download.py +++ /dev/null @@ -1,20 +0,0 @@ -import os - -import flask_restful -from flask import send_from_directory - -from monkey_island.cc.server_utils.consts import MONKEY_ISLAND_ABS_PATH - - -class T1216PBAFileDownload(flask_restful.Resource): - """ - File download endpoint used by monkey to download executable file for T1216 ("Signed Script - Proxy Execution" PBA) - """ - - def get(self): - executable_file_name = "T1216_random_executable.exe" - return send_from_directory( - directory=os.path.join(MONKEY_ISLAND_ABS_PATH, "cc", "resources", "pba"), - path=executable_file_name, - )