From 924aa1d7e128605ac2d576946cb13703e34b03fc Mon Sep 17 00:00:00 2001 From: yuanyuanxiang <962914132@qq.com> Date: Mon, 10 Nov 2025 06:34:38 +0800 Subject: [PATCH] Feature: Add menu to build and test AES encrypted shellcode --- common/obfs.h | 23 +++++++++++++++++++++++ server/2015Remote/2015Remote.rc | Bin 103982 -> 104416 bytes server/2015Remote/2015RemoteDlg.cpp | 27 +++++++++++++++++++++++++-- server/2015Remote/2015RemoteDlg.h | 2 ++ server/2015Remote/resource.h | Bin 53694 -> 54072 bytes 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/common/obfs.h b/common/obfs.h index a08cdeb..c4d11b3 100644 --- a/common/obfs.h +++ b/common/obfs.h @@ -3,6 +3,7 @@ #include #include #include +#include "aes.h" #pragma once class ObfsBase @@ -100,3 +101,25 @@ public: } } }; + +class ObfsAes : public ObfsBase { +private: + // Please change `aes_key` and `aes_iv`. + unsigned char aes_key[16] = "It is a example"; + unsigned char aes_iv[16] = "It is a example"; + +public: + ObfsAes(bool genCArray = true) : ObfsBase(genCArray) { } + + virtual void ObfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) { + struct AES_ctx ctx; + AES_init_ctx_iv(&ctx, aes_key, aes_iv); + AES_CBC_encrypt_buffer(&ctx, buf, len); + } + + virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) { + struct AES_ctx ctx; + AES_init_ctx_iv(&ctx, aes_key, aes_iv); + AES_CBC_decrypt_buffer(&ctx, buf, len); + } +}; diff --git a/server/2015Remote/2015Remote.rc b/server/2015Remote/2015Remote.rc index c4d71f64d1e7743f7dc2016091e018c4d5067775..36b4dc5551f6a76daedfb6ecbe7a1f7b48107491 100644 GIT binary patch delta 133 zcmZ3thV8+6wuUW?UZ&IKgc;Sg8<;X4W1J2orNDd;ONq^q!IdGHVY-Y7qrvnKCX7;? z5P^6Gr^y@dC{AAh6yk#jDKI24WHRJ2Okd#0r~y_h90JxH!Vu4ZtV?ow0T-jxb^&un Gxp)95MH=Ge;b!2d52%fBeUVie16C9I+ z+GK#DGC*~W+aT(gmdH%bJ0ij#0#e5i!Vu2@(;*HrhtYC!`1x3F1qNOQE(T?WOop_{ aAJ0o~zHy#|ak5jY#AJsHB9nP8ZUO+Q!ZEG@ delta 30 ocmV+(0O9|*rUSmC1F&4rlhn{yvo6sr0h2-u7?aM@6qAP1vgp4K>;M1&