From a3cc2d710dff563361859723bceeaa17a0b9ff4f Mon Sep 17 00:00:00 2001 From: Matt Ehrnschwender Date: Fri, 2 Feb 2024 15:45:46 -0500 Subject: [PATCH] Release commit for 'v0.1.7' commit 094b90bdf699522403ae5e2281570eeeb4404c03 Author: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri Feb 2 20:36:10 2024 +0000 Bump version number to match release '0.1.7' commit 8a904fa35e0a3855e8683a1da327eb65da1cb113 Author: Matt Ehrnschwender Date: Fri Feb 2 15:30:20 2024 -0500 Clippy lint commit 0e8b5ed21105a0dd6116f4a7b71c1eb397a2d94e Author: Matt Ehrnschwender Date: Fri Feb 2 15:15:54 2024 -0500 Update changelog commit 60b34aac722a1876687f61d04ad2738833c98d39 Author: Matt Ehrnschwender Date: Fri Feb 2 15:11:40 2024 -0500 Modify CI to include HTTP configuration commit 7a29fe4e9ddaf6cbacfca3352a4c944b0ef29df8 Author: Matt Ehrnschwender Date: Fri Feb 2 15:11:00 2024 -0500 Fix error due to profiles not being mut commit 93e5bb330336aa8e1dc6bf9b2ddc43212c0c709f Author: Matt Ehrnschwender Date: Fri Feb 2 15:09:52 2024 -0500 Fix typo in sshspawn command parameter description commit e3dbd690adf32bd6092daf8791af727b5e3641f8 Author: Matt Ehrnschwender Date: Fri Feb 2 15:08:18 2024 -0500 fix(#19): Add Thanatos artifacts into base image The new Mythic changes no longer run payload type containers with a bind mount to the code runtime directory. This will copy in the Thanatos artifacts needed without relying on the old bind mount. --- .github/workflows/lint.yml | 27 ++++++++++++++++--- CHANGELOG.md | 15 ++++++++++- Payload_Type/thanatos/.docker/Dockerfile | 3 +++ Payload_Type/thanatos/Dockerfile | 2 +- .../thanatos/thanatos/agent_code/.env.default | 8 +++++- .../thanatos/thanatos/agent_code/Cargo.toml | 2 +- .../thanatos/agent_code/src/profiles/http.rs | 2 +- .../thanatos/agent_code/src/profiles/mod.rs | 2 +- .../mythic/agent_functions/sshspawn.py | 2 +- agent_capabilities.json | 2 +- config.json | 2 +- 11 files changed, 55 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 74bad1a..956a1d2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -45,11 +45,18 @@ jobs: working-directory: ${{ env.THANATOS_PATH }}/${{ env.AGENT_CODE }} run: cargo check --color always --all-targets --all-features env: + RUSTFLAGS: "--cfg http" UUID: "" + AESPSK: "" + callback_host: "" callback_interval: "" callback_jitter: "" - encrypted_exchange_check: "" + callback_port: "" connection_retries: "" + encrypted_exchange_check: "" + get_uri: "" + headers: "" + post_uri: "" working_hours: "" format: @@ -74,11 +81,18 @@ jobs: working-directory: ${{ env.THANATOS_PATH }}/${{ env.AGENT_CODE }} run: cargo fmt -- --color always --check env: + RUSTFLAGS: "--cfg http" UUID: "" + AESPSK: "" + callback_host: "" callback_interval: "" callback_jitter: "" - encrypted_exchange_check: "" + callback_port: "" connection_retries: "" + encrypted_exchange_check: "" + get_uri: "" + headers: "" + post_uri: "" working_hours: "" lint: @@ -106,9 +120,16 @@ jobs: working-directory: ${{ env.THANATOS_PATH }}/${{ env.AGENT_CODE }} run: cargo clippy --color always --all-features --all-targets -- -D warnings env: + RUSTFLAGS: "--cfg http" UUID: "" + AESPSK: "" + callback_host: "" callback_interval: "" callback_jitter: "" - encrypted_exchange_check: "" + callback_port: "" connection_retries: "" + encrypted_exchange_check: "" + get_uri: "" + headers: "" + post_uri: "" working_hours: "" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4554507..6a8430a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,19 @@ Changes to the Thanatos project. This changelog file adheres to [keepachangelog](https://keepachangelog.com/en/1.1.0/). -## [0.1.6] - 2023-01-31 +## [0.1.7] - 2024-02-02 + +### Changed + +- Modify lint workflow to include HTTP configuration 60b34aa + +### Fixed + +- Fix build error due to profiles not being mut 7a29fe4 +- Fix typo in sshspawn command parameter description 93e5bb3 +- fix(#19): Add Thanatos artifacts into base image e3dbd69 + +## [0.1.6] - 2024-01-31 ### Added @@ -81,6 +93,7 @@ This changelog file adheres to [keepachangelog](https://keepachangelog.com/en/1. Initial public release +[0.1.7]: https://github.com/MythicAgents/thanatos/compare/v0.1.6...v0.1.7 [0.1.6]: https://github.com/MythicAgents/thanatos/compare/v0.1.5...v0.1.6 [0.1.5]: https://github.com/MythicAgents/thanatos/compare/v0.1.4...v0.1.5 [0.1.4]: https://github.com/MythicAgents/thanatos/compare/v0.1.3...v0.1.4 diff --git a/Payload_Type/thanatos/.docker/Dockerfile b/Payload_Type/thanatos/.docker/Dockerfile index 98e65c7..a480847 100644 --- a/Payload_Type/thanatos/.docker/Dockerfile +++ b/Payload_Type/thanatos/.docker/Dockerfile @@ -83,5 +83,8 @@ RUN rm -f sccache.tar.gz COPY .docker/config.toml /root/.cargo/config.toml WORKDIR /Mythic/ + +COPY main.py main.py +COPY thanatos thanatos ENV SCCACHE_DIR /Mythic/.cache/sccache CMD ["python3.11", "main.py"] diff --git a/Payload_Type/thanatos/Dockerfile b/Payload_Type/thanatos/Dockerfile index 746e2d2..e45a375 100644 --- a/Payload_Type/thanatos/Dockerfile +++ b/Payload_Type/thanatos/Dockerfile @@ -1,2 +1,2 @@ # Pull in the thanatos docker image -FROM ghcr.io/mythicagents/thanatos:v0.1.6 +FROM ghcr.io/mythicagents/thanatos:v0.1.7 diff --git a/Payload_Type/thanatos/thanatos/agent_code/.env.default b/Payload_Type/thanatos/thanatos/agent_code/.env.default index 91f8e07..8d2ea44 100644 --- a/Payload_Type/thanatos/thanatos/agent_code/.env.default +++ b/Payload_Type/thanatos/thanatos/agent_code/.env.default @@ -1,6 +1,12 @@ UUID="" +AESPSK="" +callback_host="" callback_interval="" callback_jitter="" -encrypted_exchange_check="" +callback_port="" connection_retries="" +encrypted_exchange_check="" +get_uri="" +headers="" +post_uri="" working_hours="" diff --git a/Payload_Type/thanatos/thanatos/agent_code/Cargo.toml b/Payload_Type/thanatos/thanatos/agent_code/Cargo.toml index e37ab26..36682a8 100644 --- a/Payload_Type/thanatos/thanatos/agent_code/Cargo.toml +++ b/Payload_Type/thanatos/thanatos/agent_code/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thanatos" -version = "0.1.6" +version = "0.1.7" authors = ["Matt Ehrnschwender", "Max Harley"] edition = "2021" diff --git a/Payload_Type/thanatos/thanatos/agent_code/src/profiles/http.rs b/Payload_Type/thanatos/thanatos/agent_code/src/profiles/http.rs index 1fb2d21..0a0bca2 100644 --- a/Payload_Type/thanatos/thanatos/agent_code/src/profiles/http.rs +++ b/Payload_Type/thanatos/thanatos/agent_code/src/profiles/http.rs @@ -109,7 +109,7 @@ pub mod profilevars { headers .get("User-Agent") .map(|agent| agent.to_owned()) - .unwrap_or_else(|| "".to_string()) + .unwrap_or_default() } // Helper function to get the other headers diff --git a/Payload_Type/thanatos/thanatos/agent_code/src/profiles/mod.rs b/Payload_Type/thanatos/thanatos/agent_code/src/profiles/mod.rs index 5693de1..ac28946 100644 --- a/Payload_Type/thanatos/thanatos/agent_code/src/profiles/mod.rs +++ b/Payload_Type/thanatos/thanatos/agent_code/src/profiles/mod.rs @@ -73,7 +73,7 @@ impl Profile { /// * `uuid` - Initial configured UUID pub fn new(uuid: String) -> Self { // Create a list of configured profiles - let profiles: Vec> = Vec::new(); + let mut profiles: Vec> = Vec::new(); // HTTP profile specified #[cfg(http)] diff --git a/Payload_Type/thanatos/thanatos/mythic/agent_functions/sshspawn.py b/Payload_Type/thanatos/thanatos/mythic/agent_functions/sshspawn.py index c80114b..865f4c3 100644 --- a/Payload_Type/thanatos/thanatos/mythic/agent_functions/sshspawn.py +++ b/Payload_Type/thanatos/thanatos/mythic/agent_functions/sshspawn.py @@ -152,7 +152,7 @@ def __init__(self, command_line, **kwargs): type=ParameterType.String, description=( "Command used to run the payload " - "({path} is the path to the payload on the remote system)", + "({path} is the path to the payload on the remote system)" ), display_name=( "Command used to run the payload " diff --git a/agent_capabilities.json b/agent_capabilities.json index 91564b0..1b3708d 100644 --- a/agent_capabilities.json +++ b/agent_capabilities.json @@ -36,6 +36,6 @@ "http" ], "mythic_version": "3.2", - "agent_version": "0.1.6", + "agent_version": "0.1.7", "supported_wrappers": [] } \ No newline at end of file diff --git a/config.json b/config.json index 7d044da..421c44b 100644 --- a/config.json +++ b/config.json @@ -6,6 +6,6 @@ "exclude_documentation_wrapper": true, "exclude_agent_icons": false, "remote_images": { - "thanatos": "ghcr.io/mythicagents/thanatos:v0.1.6" + "thanatos": "ghcr.io/mythicagents/thanatos:v0.1.7" } } \ No newline at end of file