From 6daf1cf211aee2c63e907261db7b041058d3cb18 Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Fri, 30 Aug 2024 08:53:38 -0500 Subject: [PATCH] Fixing bug with last checkin times when restarting --- CHANGELOG.MD | 6 ++++++ VERSION | 2 +- mythic-docker/src/VERSION | 2 +- mythic-docker/src/rabbitmq/util_callback_graph.go | 6 +++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a002df7a..775cda40 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -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.1-rc2] - 2024-08-30 + +### Changed + +- Fixed a bug where all callbacks would have their last checkin reset when restarting Mythic + ## [3.3.1-rc1] - 2024-08-28 ### Changed diff --git a/VERSION b/VERSION index b52af3dc..76351a22 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.1-rc1 \ No newline at end of file +3.3.1-rc2 \ No newline at end of file diff --git a/mythic-docker/src/VERSION b/mythic-docker/src/VERSION index b52af3dc..76351a22 100644 --- a/mythic-docker/src/VERSION +++ b/mythic-docker/src/VERSION @@ -1 +1 @@ -3.3.1-rc1 \ No newline at end of file +3.3.1-rc2 \ No newline at end of file diff --git a/mythic-docker/src/rabbitmq/util_callback_graph.go b/mythic-docker/src/rabbitmq/util_callback_graph.go index ac75ce8c..194608de 100644 --- a/mythic-docker/src/rabbitmq/util_callback_graph.go +++ b/mythic-docker/src/rabbitmq/util_callback_graph.go @@ -227,12 +227,16 @@ func (g *cbGraph) Add(source databaseStructs.Callback, destination databaseStruc } else { for _, dest := range g.adjMatrix[source.ID] { if dest.DestinationId == destination.ID && dest.C2ProfileName == c2profileName { + g.lock.Unlock() //logging.LogDebug("Found existing p2p connection, not adding new one to memory") + if dest.DestinationId == source.ID { + return + } updateTime := time.Now().UTC() if isCallbackStreaming(source.ID) { updateTime = time.UnixMicro(0) } - g.lock.Unlock() + callbackIDs := g.getAllChildIDs(source.ID) go updateTimes(updateTime, callbackIDs) return