Skip to content

Commit

Permalink
v3.2.17.1
Browse files Browse the repository at this point in the history
added some better checking and deadlock preventing checks around socks traffic
  • Loading branch information
its-a-feature committed Feb 8, 2024
1 parent c23998a commit 3ee407b
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 149 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.17.1] - 2024-02-08

### Changed

- Adjusted the SOCKS handling functions to use non-blocking sends when dealing with channels to help prevent deadlock
- Adjusted the SOCKS channels to have increased capacity

## [3.2.17] - 2024-02-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.17
3.2.17.1
14 changes: 10 additions & 4 deletions mythic-docker/src/rabbitmq/util_agent_message_push_c2.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type interceptProxyToAgentMessage struct {
CallbackID int
}

var interceptProxyToAgentMessageChan = make(chan interceptProxyToAgentMessage, 200)
var interceptProxyToAgentMessageChan = make(chan interceptProxyToAgentMessage, 2000)

// interceptProxyDataToAgentForPushC2 checks if Proxy messages can be sent to a PushC2 agent first
func interceptProxyDataToAgentForPushC2() {
Expand Down Expand Up @@ -155,14 +155,20 @@ func interceptProxyDataToAgentForPushC2() {
// we don't have a PushC2 client available, so save it like normal
switch msg.ProxyType {
case CALLBACK_PORT_TYPE_INTERACTIVE:
msg.InteractiveMessagesToAgent <- msg.InteractiveMessage
select {
case msg.InteractiveMessagesToAgent <- msg.InteractiveMessage:
default:
}
//.LogInfo("saved to msg")
case CALLBACK_PORT_TYPE_SOCKS:
fallthrough
case CALLBACK_PORT_TYPE_RPORTFWD:
msg.MessagesToAgent <- msg.Message
select {
case msg.MessagesToAgent <- msg.Message:
default:
logging.LogError(nil, "dropping message because channel is full", "type", msg.ProxyType)
}
}

}
}
}
Expand Down
Loading

0 comments on commit 3ee407b

Please sign in to comment.