Skip to content

Commit 68417ae

Browse files
committed
updating to add sorting to getenv output
1 parent 9120c78 commit 68417ae

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 2.0.27 - 2024-03-08
8+
9+
### Changed
10+
11+
- `getenv` now sorts the environment variables
12+
713
## 2.0.26 - 2024-03-08
814

915
### Changed

Payload_Type/poseidon/poseidon/agent_code/getenv/getenv.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package getenv
22

33
import (
44
// Standard
5-
65
"os"
6+
"sort"
77
"strings"
88

99
// Poseidon
@@ -14,7 +14,9 @@ import (
1414
// Run - Function that executes the shell command
1515
func Run(task structs.Task) {
1616
msg := task.NewResponse()
17-
msg.UserOutput = strings.Join(os.Environ(), "\n")
17+
envString := os.Environ()
18+
sort.Strings(envString)
19+
msg.UserOutput = strings.Join(envString, "\n")
1820
msg.Completed = true
1921
task.Job.SendResponses <- msg
2022
return

Payload_Type/poseidon/poseidon/agentfunctions/builder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"strings"
1616
)
1717

18-
const version = "2.0.26"
18+
const version = "2.0.27"
1919

2020
var payloadDefinition = agentstructs.PayloadType{
2121
Name: "poseidon",

agent_capabilities.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"architectures": ["x86_64", "arm_64"],
1111
"c2": ["http", "websocket", "dynamichttp", "poseidon_tcp"],
1212
"mythic_version": "3.2",
13-
"agent_version": "2.0.26",
13+
"agent_version": "2.0.27",
1414
"supported_wrappers": []
1515
}

0 commit comments

Comments
 (0)