From 1556733798840c896c826cc9c5a4fc96e5d29589 Mon Sep 17 00:00:00 2001 From: Joe Abbate Date: Fri, 27 Dec 2024 23:42:13 -0500 Subject: [PATCH 1/3] Bump Rust to 1.83.0 --- .github/workflows/tests.yml | 2 +- implants/golem/src/inter.rs | 5 ----- implants/lib/eldritch/src/sys/dll_reflect_impl.rs | 8 ++++---- implants/lib/pb/src/generated/c2.rs | 1 + implants/lib/pb/src/generated/eldritch.rs | 1 + implants/rust-toolchain | 2 +- tavern/tomes/debug_report_pass/main.eldritch | 1 + tavern/tomes/debug_report_pass/metadata.yml | 10 ++++++++++ 8 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 tavern/tomes/debug_report_pass/main.eldritch create mode 100644 tavern/tomes/debug_report_pass/metadata.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1eb7d7208..d2437eb59 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,7 @@ jobs: - name: Setup Rust uses: actions-rs/toolchain@v1 with: - toolchain: '1.76.0' + toolchain: '1.83.0' default: true profile: minimal components: rustfmt, clippy diff --git a/implants/golem/src/inter.rs b/implants/golem/src/inter.rs index c213a54f2..dd4bbbb71 100644 --- a/implants/golem/src/inter.rs +++ b/implants/golem/src/inter.rs @@ -15,11 +15,6 @@ * limitations under the License. */ -// -// Plugins -#![cfg_attr(feature = "gazebo_lint", feature(plugin))] -#![cfg_attr(feature = "gazebo_lint", allow(deprecated))] // :( -#![cfg_attr(feature = "gazebo_lint", plugin(gazebo_lint))] // Disagree these are good hints #![allow(clippy::type_complexity)] diff --git a/implants/lib/eldritch/src/sys/dll_reflect_impl.rs b/implants/lib/eldritch/src/sys/dll_reflect_impl.rs index dc43925a3..0e1b5404d 100644 --- a/implants/lib/eldritch/src/sys/dll_reflect_impl.rs +++ b/implants/lib/eldritch/src/sys/dll_reflect_impl.rs @@ -20,27 +20,27 @@ use { }, }; -#[cfg(all(host_family = "windows", target_os = "windows"))] +#[cfg(all(target_family = "windows", target_os = "windows"))] macro_rules! win_target { () => { r"x86_64-pc-windows-msvc" }; } -#[cfg(all(host_family = "unix", target_os = "windows"))] +#[cfg(all(target_family = "unix", target_os = "windows"))] macro_rules! win_target { () => { r"x86_64-pc-windows-gnu" }; } -#[cfg(all(host_family = "unix", target_os = "windows"))] +#[cfg(all(target_family = "unix", target_os = "windows"))] macro_rules! sep { () => { "/" }; } -#[cfg(host_family = "windows")] +#[cfg(target_family = "windows")] macro_rules! sep { () => { r#"\"# diff --git a/implants/lib/pb/src/generated/c2.rs b/implants/lib/pb/src/generated/c2.rs index 85563379b..c388d9b63 100644 --- a/implants/lib/pb/src/generated/c2.rs +++ b/implants/lib/pb/src/generated/c2.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Agent information to identify the type of beacon. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/implants/lib/pb/src/generated/eldritch.rs b/implants/lib/pb/src/generated/eldritch.rs index 6c7cac2b2..ac4647c34 100644 --- a/implants/lib/pb/src/generated/eldritch.rs +++ b/implants/lib/pb/src/generated/eldritch.rs @@ -1,3 +1,4 @@ +// This file is @generated by prost-build. /// Tome for eldritch to execute. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/implants/rust-toolchain b/implants/rust-toolchain index 624eb0ea6..0193dee36 100644 --- a/implants/rust-toolchain +++ b/implants/rust-toolchain @@ -1,2 +1,2 @@ [toolchain] -channel = "1.76.0" +channel = "1.83.0" diff --git a/tavern/tomes/debug_report_pass/main.eldritch b/tavern/tomes/debug_report_pass/main.eldritch new file mode 100644 index 000000000..8d9ac8471 --- /dev/null +++ b/tavern/tomes/debug_report_pass/main.eldritch @@ -0,0 +1 @@ +report.user_password("foo", input_params['pass']) diff --git a/tavern/tomes/debug_report_pass/metadata.yml b/tavern/tomes/debug_report_pass/metadata.yml new file mode 100644 index 000000000..6677f813b --- /dev/null +++ b/tavern/tomes/debug_report_pass/metadata.yml @@ -0,0 +1,10 @@ +name: DEBUG +description: Lol +author: skyz +support_model: FIRST_PARTY +tactic: RECON +paramdefs: +- name: pass + type: string + label: password + placeholder: "foo" From c6406c1aa64d0b67193cedcdf5c838f726c2efc8 Mon Sep 17 00:00:00 2001 From: Joe Abbate Date: Fri, 27 Dec 2024 23:49:36 -0500 Subject: [PATCH 2/3] Oops debug code --- tavern/tomes/debug_report_pass/main.eldritch | 1 - tavern/tomes/debug_report_pass/metadata.yml | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100644 tavern/tomes/debug_report_pass/main.eldritch delete mode 100644 tavern/tomes/debug_report_pass/metadata.yml diff --git a/tavern/tomes/debug_report_pass/main.eldritch b/tavern/tomes/debug_report_pass/main.eldritch deleted file mode 100644 index 8d9ac8471..000000000 --- a/tavern/tomes/debug_report_pass/main.eldritch +++ /dev/null @@ -1 +0,0 @@ -report.user_password("foo", input_params['pass']) diff --git a/tavern/tomes/debug_report_pass/metadata.yml b/tavern/tomes/debug_report_pass/metadata.yml deleted file mode 100644 index 6677f813b..000000000 --- a/tavern/tomes/debug_report_pass/metadata.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: DEBUG -description: Lol -author: skyz -support_model: FIRST_PARTY -tactic: RECON -paramdefs: -- name: pass - type: string - label: password - placeholder: "foo" From fcf28f016d97afb4de3fbcaeb7fdc432c0c95e5d Mon Sep 17 00:00:00 2001 From: Joe Abbate Date: Fri, 27 Dec 2024 23:55:03 -0500 Subject: [PATCH 3/3] Damn its crazy if I read the compiler errors --- implants/lib/eldritch/build.rs | 1 + implants/lib/eldritch/src/sys/dll_reflect_impl.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/implants/lib/eldritch/build.rs b/implants/lib/eldritch/build.rs index f59887faf..b193418fd 100644 --- a/implants/lib/eldritch/build.rs +++ b/implants/lib/eldritch/build.rs @@ -142,6 +142,7 @@ const HOST_FAMILY: &str = "windows"; const HOST_FAMILY: &str = "unix"; fn set_host_family() { + println!("cargo::rustc-check-cfg=cfg(host_family, values(\"unix\", \"windows\"))"); println!("cargo:rustc-cfg=host_family=\"{}\"", HOST_FAMILY); } diff --git a/implants/lib/eldritch/src/sys/dll_reflect_impl.rs b/implants/lib/eldritch/src/sys/dll_reflect_impl.rs index 0e1b5404d..dc43925a3 100644 --- a/implants/lib/eldritch/src/sys/dll_reflect_impl.rs +++ b/implants/lib/eldritch/src/sys/dll_reflect_impl.rs @@ -20,27 +20,27 @@ use { }, }; -#[cfg(all(target_family = "windows", target_os = "windows"))] +#[cfg(all(host_family = "windows", target_os = "windows"))] macro_rules! win_target { () => { r"x86_64-pc-windows-msvc" }; } -#[cfg(all(target_family = "unix", target_os = "windows"))] +#[cfg(all(host_family = "unix", target_os = "windows"))] macro_rules! win_target { () => { r"x86_64-pc-windows-gnu" }; } -#[cfg(all(target_family = "unix", target_os = "windows"))] +#[cfg(all(host_family = "unix", target_os = "windows"))] macro_rules! sep { () => { "/" }; } -#[cfg(target_family = "windows")] +#[cfg(host_family = "windows")] macro_rules! sep { () => { r#"\"#