Skip to content

Commit

Permalink
updating to add sorting to getenv output
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Mar 8, 2024
1 parent 9120c78 commit 68417ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Payload_Type/poseidon/poseidon/agent_code/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -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.27 - 2024-03-08

### Changed

- `getenv` now sorts the environment variables

## 2.0.26 - 2024-03-08

### Changed
Expand Down
6 changes: 4 additions & 2 deletions Payload_Type/poseidon/poseidon/agent_code/getenv/getenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package getenv

import (
// Standard

"os"
"sort"
"strings"

// Poseidon
Expand All @@ -14,7 +14,9 @@ import (
// Run - Function that executes the shell command
func Run(task structs.Task) {
msg := task.NewResponse()
msg.UserOutput = strings.Join(os.Environ(), "\n")
envString := os.Environ()
sort.Strings(envString)
msg.UserOutput = strings.Join(envString, "\n")
msg.Completed = true
task.Job.SendResponses <- msg
return
Expand Down
2 changes: 1 addition & 1 deletion Payload_Type/poseidon/poseidon/agentfunctions/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
)

const version = "2.0.26"
const version = "2.0.27"

var payloadDefinition = agentstructs.PayloadType{
Name: "poseidon",
Expand Down
2 changes: 1 addition & 1 deletion agent_capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"architectures": ["x86_64", "arm_64"],
"c2": ["http", "websocket", "dynamichttp", "poseidon_tcp"],
"mythic_version": "3.2",
"agent_version": "2.0.26",
"agent_version": "2.0.27",
"supported_wrappers": []
}

0 comments on commit 68417ae

Please sign in to comment.