From 81b10d23fa45e59631bb57df6699bb0e1b50c3b2 Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Tue, 9 Apr 2024 16:41:38 -0500 Subject: [PATCH] v2.0.34 fixed an issue with parsing dynamichttp profiles when building --- Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD | 6 ++++++ Payload_Type/poseidon/poseidon/agentfunctions/builder.go | 8 ++++---- agent_capabilities.json | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD b/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD index d6c32c4..208c885 100644 --- a/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD +++ b/Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD @@ -4,6 +4,12 @@ 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.0.34 - 2024-04-09 + +### Changed + +- Fixed an issue where dynamichttp profiles weren't getting serialized properly for configuration + ## 2.0.33 - 2024-03-29 ### Changed diff --git a/Payload_Type/poseidon/poseidon/agentfunctions/builder.go b/Payload_Type/poseidon/poseidon/agentfunctions/builder.go index 124a8c3..613557d 100644 --- a/Payload_Type/poseidon/poseidon/agentfunctions/builder.go +++ b/Payload_Type/poseidon/poseidon/agentfunctions/builder.go @@ -19,7 +19,7 @@ import ( "strings" ) -const version = "2.0.33" +const version = "2.0.34" var payloadDefinition = agentstructs.PayloadType{ Name: "poseidon", @@ -248,17 +248,17 @@ func build(payloadBuildMsg agentstructs.PayloadBuildMessage) agentstructs.Payloa payloadBuildResponse.BuildStdErr = "Key error: " + key + "\n" + configData.Error return payloadBuildResponse } - err = json.Unmarshal(configData.Content, initialConfig[key]) + tomlConfig := make(map[string]interface{}) + err = json.Unmarshal(configData.Content, &tomlConfig) if err != nil { - tomlConfig := make(map[string]interface{}) err = toml.Unmarshal(configData.Content, &tomlConfig) if err != nil { payloadBuildResponse.Success = false payloadBuildResponse.BuildStdErr = "Key error: " + key + "\n" + err.Error() return payloadBuildResponse } - initialConfig[key] = tomlConfig } + initialConfig[key] = tomlConfig /* agentConfigString = strings.ReplaceAll(string(configData.Content), "\\", "\\\\") agentConfigString = strings.ReplaceAll(agentConfigString, "\"", "\\\"") diff --git a/agent_capabilities.json b/agent_capabilities.json index c1d4ace..de5396d 100644 --- a/agent_capabilities.json +++ b/agent_capabilities.json @@ -10,6 +10,6 @@ "architectures": ["x86_64", "arm_64"], "c2": ["http", "websocket", "dynamichttp", "poseidon_tcp"], "mythic_version": "3.2.20-rc7", - "agent_version": "2.0.33", + "agent_version": "2.0.34", "supported_wrappers": [] } \ No newline at end of file