From 4df70010ced8885d095131bb5d7aceea114dd9cf Mon Sep 17 00:00:00 2001 From: Ralf Date: Mon, 24 Nov 2025 22:46:43 +0300 Subject: [PATCH] Small update --- AdaptixServer/core/connector/connector.go | 2 -- Extenders/beacon_agent/Makefile | 2 +- Extenders/beacon_agent/src_beacon/beacon/Agent.cpp | 4 ++-- Extenders/beacon_listener_http/Makefile | 2 +- Extenders/beacon_listener_smb/Makefile | 2 +- Extenders/beacon_listener_tcp/Makefile | 2 +- Extenders/gopher_agent/Makefile | 2 +- Extenders/gopher_agent/pl_utils.go | 5 +++++ Extenders/gopher_listener_tcp/Makefile | 2 +- Makefile | 8 +++++--- README.md | 8 +++++++- 11 files changed, 25 insertions(+), 14 deletions(-) diff --git a/AdaptixServer/core/connector/connector.go b/AdaptixServer/core/connector/connector.go index bf5a4bc4..f4969e25 100644 --- a/AdaptixServer/core/connector/connector.go +++ b/AdaptixServer/core/connector/connector.go @@ -202,8 +202,6 @@ func NewTsConnector(ts Teamserver, tsProfile profile.TsProfile, tsResponse profi { otp_group.POST("/otp/upload/temp", connector.tcOTP_UploadTemp) otp_group.GET("/otp/download/sync", connector.tcOTP_DownloadSync) - //otp_group.POST("/otp/upload/temp", ts.ValidateOTP(), default404Middleware(tsResponse), gin.WrapH(connector.tcOTP_UploadTemp())) - //otp_group.GET("/otp/download/sync", ts.ValidateOTP(), default404Middleware(tsResponse), gin.WrapH(connector.tcOTP_DownloadSync())) } api_group := connector.Engine.Group(tsProfile.Endpoint) diff --git a/Extenders/beacon_agent/Makefile b/Extenders/beacon_agent/Makefile index 09062a08..eab492b4 100644 --- a/Extenders/beacon_agent/Makefile +++ b/Extenders/beacon_agent/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building agent_beacon plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/agent_beacon.so pl_main.go pl_agent.go pl_packer.go pl_utils.go pl_sideloading.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/agent_beacon.so pl_main.go pl_agent.go pl_packer.go pl_utils.go pl_sideloading.go @ echo " done..." @ echo " * Building agent" diff --git a/Extenders/beacon_agent/src_beacon/beacon/Agent.cpp b/Extenders/beacon_agent/src_beacon/beacon/Agent.cpp index dd02ad6f..2597e61b 100644 --- a/Extenders/beacon_agent/src_beacon/beacon/Agent.cpp +++ b/Extenders/beacon_agent/src_beacon/beacon/Agent.cpp @@ -4,13 +4,13 @@ #include "Packer.h" #include "Crypt.h" -void* Agent::operator new(size_t sz) +void* Agent::operator new(size_t sz) { void* p = MemAllocLocal(sz); return p; } -void Agent::operator delete(void* p) noexcept +void Agent::operator delete(void* p) noexcept { MemFreeLocal(&p, sizeof(Agent)); } diff --git a/Extenders/beacon_listener_http/Makefile b/Extenders/beacon_listener_http/Makefile index 6c22f000..9d08458d 100644 --- a/Extenders/beacon_listener_http/Makefile +++ b/Extenders/beacon_listener_http/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building listener_beacon_http plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_http.so pl_main.go pl_http.go pl_listener.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_http.so pl_main.go pl_http.go pl_listener.go @ echo " done..." clean: diff --git a/Extenders/beacon_listener_smb/Makefile b/Extenders/beacon_listener_smb/Makefile index 5846eb78..ae4f4748 100644 --- a/Extenders/beacon_listener_smb/Makefile +++ b/Extenders/beacon_listener_smb/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building listener_beacon_smb plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_smb.so pl_main.go pl_smb.go pl_listener.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_smb.so pl_main.go pl_smb.go pl_listener.go @ echo " done..." clean: diff --git a/Extenders/beacon_listener_tcp/Makefile b/Extenders/beacon_listener_tcp/Makefile index 05bc5df3..5016d0c1 100644 --- a/Extenders/beacon_listener_tcp/Makefile +++ b/Extenders/beacon_listener_tcp/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building listener_beacon_tcp plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_tcp.so pl_main.go pl_tcp.go pl_listener.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_beacon_tcp.so pl_main.go pl_tcp.go pl_listener.go @ echo " done..." clean: diff --git a/Extenders/gopher_agent/Makefile b/Extenders/gopher_agent/Makefile index 9f4a012f..7012ba50 100644 --- a/Extenders/gopher_agent/Makefile +++ b/Extenders/gopher_agent/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building agent_gopher plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/agent_gopher.so pl_main.go pl_agent.go pl_utils.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/agent_gopher.so pl_main.go pl_agent.go pl_utils.go @ echo " done..." @ echo " * Building agent" diff --git a/Extenders/gopher_agent/pl_utils.go b/Extenders/gopher_agent/pl_utils.go index b391a35e..773fe503 100644 --- a/Extenders/gopher_agent/pl_utils.go +++ b/Extenders/gopher_agent/pl_utils.go @@ -1282,6 +1282,11 @@ func parseDurationToSeconds(input string) (int, error) { re := regexp.MustCompile(`(\d+)(h|m|s)`) matches := re.FindAllStringSubmatch(input, -1) + if matches == nil { + input = input + "s" + matches = re.FindAllStringSubmatch(input, -1) + } + totalSeconds := 0 for _, match := range matches { value, err := strconv.Atoi(match[1]) diff --git a/Extenders/gopher_listener_tcp/Makefile b/Extenders/gopher_listener_tcp/Makefile index f49a420d..a159a6a2 100644 --- a/Extenders/gopher_listener_tcp/Makefile +++ b/Extenders/gopher_listener_tcp/Makefile @@ -2,7 +2,7 @@ all: clean @ echo " * Building listener_gopher_tcp plugin" @ mkdir dist @ cp config.json ax_config.axs ./dist/ - @ go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_gopher_tcp.so pl_main.go pl_listener.go pl_tcp.go map.go + @ GOEXPERIMENT=jsonv2,greenteagc go build -buildmode=plugin -ldflags="-s -w" -o ./dist/listener_gopher_tcp.so pl_main.go pl_listener.go pl_tcp.go map.go @ echo " done..." clean: diff --git a/Makefile b/Makefile index 32e6a758..5e033c11 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,7 @@ clean: server: prepare @ echo "[*] Building adaptixserver..." - @ cd AdaptixServer && go build -buildvcs=false -ldflags="-s -w" -o adaptixserver > /dev/null 2>build_error.log || { echo "[ERROR] Failed to build AdaptixServer:"; cat build_error.log >&2; exit 1; } # for static build use CGO_ENABLED=0 - @ sudo setcap 'cap_net_bind_service=+ep' AdaptixServer/adaptixserver + @ cd AdaptixServer && GOEXPERIMENT=jsonv2,greenteagc go build -buildvcs=false -ldflags="-s -w" -o adaptixserver > /dev/null 2>build_error.log || { echo "[ERROR] Failed to build AdaptixServer:"; cat build_error.log >&2; exit 1; } # for static build use CGO_ENABLED=0 @ mv AdaptixServer/adaptixserver ./$(DIST_DIR)/ @ cp AdaptixServer/ssl_gen.sh AdaptixServer/profile.json AdaptixServer/404page.html ./$(DIST_DIR)/ @ echo "[+] done" @@ -58,6 +57,8 @@ extenders: prepare done @ echo "[+] done" +server-ext: clean server extenders + clean-all: clean @ echo "[*] Cleaning all build artifacts..." @ find . -name "*.o" -delete @@ -73,6 +74,7 @@ help: @ echo "Available targets:" @ echo " all - Build everything (server, client, extenders)" @ echo " server - Build only the server" + @ echo " server-ext - Build server and extenders (no client, ideal for VPS)" @ echo " client - Build only the client in multithread mode (fast build)" @ echo " client-fast - Build only the client" @ echo " extenders - Build only the extenders" @@ -82,4 +84,4 @@ help: @ echo "" @ echo "Platform: $(UNAME_S) [$(NPROC) proc]" -.PHONY: all server client extenders clean clean-all help prepare +.PHONY: all server server-ext client extenders clean clean-all help prepare diff --git a/README.md b/README.md index ca403324..29b98938 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,17 @@ # AdaptixC2 v0.10 -Adaptix is an extensible post-exploitation and adversarial emulation framework made for penetration testers. The Adaptix server is written in Golang and to allow operator flexibility. The GUI Client is written in C++ QT, allowing it to be used on Linux, Windows, and MacOS operating systems. [Full documentation is available here](https://adaptix-framework.gitbook.io/adaptix-framework). +Adaptix is an extensible post-exploitation and adversarial emulation framework made for authorized penetration testing. The Adaptix server is written in Golang and to allow operator flexibility. The GUI Client is written in C++ QT, allowing it to be used on Linux, Windows, and MacOS operating systems. [Full documentation is available here](https://adaptix-framework.gitbook.io/adaptix-framework). ![](https://adaptix-framework.gitbook.io/adaptix-framework/~gitbook/image?url=https%3A%2F%2F2104178602-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FS8p8XLFtLmf0NkofQvoa%252Fuploads%252FrKGlqi7FhQNN8vdoWfFf%252FScreenshot_20250927_224408.png%3Falt%3Dmedia%26token%3D8466b9a1-d6a7-48e0-a174-c27a16695883&width=768&dpr=4&quality=100&sign=db47f987&sv=2) +## Legal Warning + +This tool is designed for AUTHORIZED security testing and red team operations ONLY. Unauthorized use is strictly prohibited and may violate local and international laws. Use at your own risk. + + + ## Getting Started Please checkout the [wiki](https://adaptix-framework.gitbook.io/adaptix-framework/adaptix-c2/getting-starting/installation).