Skip to content

Commit

Permalink
updating mythic-cli defaults and echoing error messages from tasking
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Aug 1, 2024
1 parent d80ca96 commit 85f9c10
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 6 deletions.
6 changes: 6 additions & 0 deletions 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](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.3.0-rc11] - 2024-08-01

### Changed

- Updated the opsec pre and create task response handles to mirror stderr messages to task output so it's easier for operators to see what's wrong

## [3.3.0-rc9] - 2024-07-29

### Changed
Expand Down
8 changes: 7 additions & 1 deletion Mythic_CLI/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ 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).

## 0.3.0 - 2024-07031
## 0.3.1 - 2024-08-01

### Changed

- Made the default for dynamic ports to bind to localhost

## 0.3.0 - 2024-07-31

### Changed

Expand Down
4 changes: 2 additions & 2 deletions Mythic_CLI/src/cmd/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("mythic_server_dynamic_ports", "7000-7010")
mythicEnvInfo["mythic_server_dynamic_ports"] = `These ports are exposed through the Docker container and provide access to SOCKS, Reverse Port Forward, and Interactive Tasking ports opened up by the Mythic Server. This is a comma-separated list of ranges, so you could do 7000-7010,7012,713-720`

mythicEnv.SetDefault("mythic_server_dynamic_ports_bind_localhost_only", false)
mythicEnvInfo["mythic_server_dynamic_ports_bind_localhost_only"] = `This specifies if the mythic_server container will expose the dynamic_ports on 0.0.0.0 or 127.0.0.1. If you have a remote agent container connecting to Mythic, you MUST set this to false so that the remote agent container can connect to gRPC.`
mythicEnv.SetDefault("mythic_server_dynamic_ports_bind_localhost_only", true)
mythicEnvInfo["mythic_server_dynamic_ports_bind_localhost_only"] = `This specifies if the mythic_server container will expose the dynamic_ports on 0.0.0.0 or 127.0.0.1.`

mythicEnv.SetDefault("mythic_server_use_volume", false)
mythicEnvInfo["mythic_server_use_volume"] = `The mythic_server container saves uploaded and downloaded files. If this is True, then a docker volume is created and mounted into the container to host these pieces. If this is false, then the local filesystem is mounted inside the container instead. `
Expand Down
2 changes: 1 addition & 1 deletion Mythic_CLI/src/cmd/config/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ package config

var (
// Version Mythic CLI version
Version = "v0.3.0"
Version = "v0.3.1"
)
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0-rc10
3.3.0-rc11
2 changes: 1 addition & 1 deletion mythic-docker/src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0-rc10
3.3.0-rc11
5 changes: 5 additions & 0 deletions mythic-docker/src/rabbitmq/recv_pt_task_create_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ func processPtTaskCreateMessages(msg amqp.Delivery) {
status=:status, stderr=:stderr, completed=:completed
WHERE
id=:id`, task)
_, err = database.DB.Exec(`INSERT INTO response (task_id, operation_id, response)
VALUES ($1, $2, $3)`, task.ID, task.OperationID, task.Stderr)
if err != nil {
logging.LogError(err, "failed to add error to responses")
}
if err != nil {
logging.LogError(err, "Failed to update task status")
return
Expand Down
5 changes: 5 additions & 0 deletions mythic-docker/src/rabbitmq/recv_pt_task_opsec_pre_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ func processPtTaskOPSECPreMessages(msg amqp.Delivery) {
logging.LogError(err, "Failed to update task status")
return
}
_, err = database.DB.Exec(`INSERT INTO response (task_id, operation_id, response)
VALUES ($1, $2, $3)`, task.ID, task.OperationID, task.Stderr)
if err != nil {
logging.LogError(err, "failed to add error to responses")
}
go CheckAndProcessTaskCompletionHandlers(task.ID)
EventingChannel <- EventNotification{
Trigger: eventing.TriggerTaskFinish,
Expand Down

0 comments on commit 85f9c10

Please sign in to comment.