updating download and jobkill functionality

This commit is contained in:
its-a-feature
2025-05-30 13:33:19 -05:00
parent 0860282f09
commit 3ecfca585e
6 changed files with 14 additions and 6 deletions
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 2.2.8 - 2025-05-30
### Changed
- Updated the download browserscript to render as the download happens
- Updated the download task to not report back periodic progress updates
- Added the supported ui feature `task:job_kill` to `jobkill` for support through the UI
## 2.2.7 - 2025-05-19
### Changed
@@ -41,7 +41,7 @@ func Run(task structs.Task) {
downloadMsg := structs.SendFileToMythicStruct{}
downloadMsg.Task = &task
downloadMsg.IsScreenshot = false
downloadMsg.SendUserStatusUpdates = true
downloadMsg.SendUserStatusUpdates = false
downloadMsg.File = file
downloadMsg.FileName = fi.Name()
downloadMsg.FullPath = fullPath
@@ -20,7 +20,7 @@ import (
"time"
)
const version = "2.2.7"
const version = "2.2.8"
type sleepInfoStruct struct {
Interval int `json:"interval"`
@@ -11,7 +11,7 @@ func init() {
HelpString: "jobkill SOME-GUID-GOES-HERE",
Version: 1,
MitreAttackMappings: []string{"T1033"},
SupportedUIFeatures: []string{"jobs:kill"},
SupportedUIFeatures: []string{"jobs:kill", "task:job_kill"},
Author: "@xorrior",
CommandAttributes: agentstructs.CommandAttribute{
SupportedOS: []string{},
@@ -1 +1 @@
function(task, responses){␍␍ if(task.status.includes("error")){␍ const combined = responses.reduce( (prev, cur) => {␍ return prev + cur;␍ }, "");␍ return {'plaintext': combined};␍ }else if(task.completed){␍ if(responses.length > 0){␍ try{␍ let data = JSON.parse(responses[0]);␍ let filename_pieces = task.display_params.split("/");␍ return { "media": [{␍ "filename": `${filename_pieces[filename_pieces.length -1]}`,␍ "agent_file_id": data["file_id"],␍ }]};␍ }catch(error){␍ const combined = responses.reduce( (prev, cur) => {␍ return prev + cur;␍ }, "");␍ return {'plaintext': combined};␍ }␍␍ }else{␍ return {"plaintext": "No data to display..."}␍ }␍␍ }else{␍ if(responses.length > 0){␍ const task_data = JSON.parse(responses[0]);␍ let message = "Downloading a file with " + task_data["total_chunks"] + " total chunks...";␍ if(responses.length > 1){␍ message += "\n" + responses[responses.length-1];␍ }␍ return {"plaintext": message};␍ }␍ return {"plaintext": "No data yet..."}␍ }␍}
function(task, responses){␍␍ if(task.status.includes("error")){␍ const combined = responses.reduce( (prev, cur) => {␍ return prev + cur;␍ }, "");␍ return {'plaintext': combined};␍ }␍ if(responses.length > 0){␍ try{␍ let data = JSON.parse(responses[0]);␍ let filename_pieces = task.display_params.split("/");␍ return { "media": [{␍ "filename": `${filename_pieces[filename_pieces.length -1]}`,␍ "agent_file_id": data["file_id"],␍ }]};␍ }catch(error){␍ const combined = responses.reduce( (prev, cur) => {␍ return prev + cur;␍ }, "");␍ return {'plaintext': combined};␍ }␍␍ }else{␍ return {"plaintext": "No data to display..."}␍ }␍}
+2 -2
View File
@@ -9,7 +9,7 @@
"payload_output": ["macho", "elf", "dylib", "so"],
"architectures": ["x86_64", "arm_64"],
"c2": ["http", "websocket", "dynamichttp", "tcp"],
"mythic_version": "3.3.1-rc48",
"agent_version": "2.2.3",
"mythic_version": "3.3.1-rc71",
"agent_version": "2.2.8",
"supported_wrappers": []
}