Commit Graph
20 Commits
Author SHA1 Message Date
KingKDot c1fefec1b5 improve superseeding, fix linux persistence stuff 2026-06-14 02:12:26 -05:00
KingKDot 146626ec0d add recording, fix solpush, persistence tests and tiny improvements 2026-06-02 17:18:46 -05:00
Michael 4fae9e56cf Shellcode clean (#21)
* feat: shellcode output via Donut (Windows) + memfd stub (Linux)

- Donut (Windows): PE → PIC shellcode (.bin) via donut-manager.ts
  Flags: -f1 -a<arch> -b3 -x1 (continue on AMSI fail, thread exit)
- Linux shellcode: 113-byte x86_64 memfd_create+execveat stub
  (linux-shellcode-manager.ts) wraps ELF for memfd_create+execveat
- Two-pass build for shellcode+persistence: Pass 1 = normal agent with
  persist compiled in; Pass 2 = selfembed agent that drops+registers
  Pass 1 on first run (isRunningInMemory() gates the path)
- Show console option: shellcode_console build tag calls AllocConsole()
  on start for debug builds; AttachConsole fallback included
- isRunningInMemory() Windows: VirtualQuery on .data sentinel
  (MEM_PRIVATE = injected, MEM_IMAGE = normal disk load) replaces
  os.Executable() which returned host process path when injected
- Build UI: Donut mode, Linux shellcode mode, show-console checkboxes;
  settings persisted across sessions via collectFormSettings()
- GODEBUG=netdns=cgo hardcoded in build env (fixes IPv6 DNS on VPN)
- Dockerfile: pre-seed Go module cache; add curl to runtime image
- docker-compose.yml: switch healthcheck to wget (curl absent in slim)

* fix: add missing shellcode UI functions and restore dynamic linking

applyDonutMode, applyLinuxShellcodeMode, and updateShellcodeCheckboxVisibility
were called throughout build.js but never defined, breaking platform selection
and the build button. Add the missing implementations.

Also remove forced -extldflags '-static' on Linux CGO builds; fully static
glibc binaries cannot call dlopen, which broke native plugin loading entirely.

* fix: call updateShellcodeCheckboxVisibility on page load

Shellcode rows were hidden on initial load because the function was only
wired to checkbox change events. Call it at startup and in applyFormSettings
so pre-selected platforms correctly show their shellcode options immediately.

* feat: Linux plugin subprocess shim for static-agent compatibility

Static musl binaries cannot call dlopen. Introduce a small C shim
(plugin_host.c) that is compiled at agent-build time into a
dynamically-linked binary, embedded via go:embed, and fork+exec'd to
load .so plugins on behalf of the static agent over a Unix socketpair.

Empty placeholder files allow go:embed to compile without error; the
real binaries are produced by build-process.ts before go build runs and
are never committed. Documents the IPC protocol and build matrix in
PLUGINS.md Section 12.

* fix: define sp_memfd_create/sp_write_all in subproc CGO preamble

CGO preamble functions are per-file translation units; so_memfd_create
and so_write_all from loader_linux.go are not visible in
loader_linux_subproc.go. Add local equivalents with sp_ prefix.

* fix: use CGO helper for shim memfd_create instead of syscall.SYS_MEMFD_CREATE

syscall.SYS_MEMFD_CREATE is not defined in Go stdlib syscall package.
Replace with sp_memfd_create_nocloe() CGO helper (flags=0, no CLOEXEC).

* fix: compile plugin host shim statically to avoid glibc version mismatch

A dynamically-linked shim compiled on Debian Bookworm (glibc 2.36) fails
on older glibc targets. Compile with -static so the shim is self-contained
and runs on any glibc version. Static glibc can still call dlopen at runtime
via the system ld-linux.so.2.

Also surface subprocess errors instead of silently falling through to dlopen
so failures are visible in the build log.

* Restore docker build cache
2026-05-13 22:55:51 -05:00
KingKDot a58e0fadf1 add control flow obf for garble 2026-04-20 13:46:59 -05:00
KingKDot 86c1897406 Get AI to make me a POC. Will need to push to the git so I can test. Will revert if it doesn't work and probably just delete commit history for it as well. 2026-04-19 15:07:44 -05:00
KingKDot 3e198f76a2 add custom startup names to mac and linux. Also update readme for windows users who are using the server 2026-04-04 20:42:54 -05:00
KingKDot 38e5f42baf make shit hidden 2026-04-03 10:33:24 -05:00
KingKDot f50f76d3f6 multi select persistence 2026-03-26 11:05:04 -05:00
KingKDot f4c70ce824 fix task scheduler not running as admin 2026-03-24 21:14:58 -05:00
KingKDot 5ac5e4e536 add custom file names to building and fix purgatory issue 2026-03-21 03:06:35 -05:00
KingKDot ac5cf6e43e tons of new build options, fix mutex shit, etc 2026-03-21 02:12:35 -05:00
KingKDot 1b1bf087a4 fix for persistence + 1.3.10 2026-03-13 13:58:11 -05:00
KingKDot 5da706bc88 tests for persistence on windows 2026-03-12 18:16:48 -05:00
KingKDot b2172dd3e8 add more persistence options and fix startup detections. Also bump version to 1.3.5 2026-03-12 13:52:02 -05:00
KingKDot 79c36feeff most unneeded code on the fucking planet 2026-03-11 18:56:12 -05:00
KingKDot b9dccc3361 new persistence 2026-03-11 18:55:01 -05:00
KingKDot b6acc69c70 improve updating 2026-03-09 13:52:42 -05:00
KingKDot 38a330f305 remove old bs code, start getting ready for freebsd and openbsd support 2026-03-09 00:46:29 -05:00
KingKDot ed32444495 fixed persistence error and error with clients sometimes not showing up as connected. 2026-03-08 16:08:04 -05:00
KingKDot f8515a2883 inital commit 2026-03-05 00:04:26 -06:00