You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+70-3Lines changed: 70 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
## [Unreleased]
16
16
- Fixed background jobs for the python agent.
17
17
18
-
## [6.5.0] - 2026-03-08
19
-
- Updated Starkiller to v3.4.0
18
+
## [6.6.0] - 2026-04-25
19
+
- Updated Starkiller to v3.5.0
20
+
21
+
### Added
22
+
23
+
- Added 8 new modules (7 PowerShell, 1 Python) based on Atomic Red Team to fill partial ATT&CK coverage gaps: thread execution hijacking (T1055.003), cached domain credentials (T1003.005), Safe Mode boot defense evasion (T1562.009), default file association hijack (T1546.001), screensaver persistence (T1546.002), Office template macro injection (T1137.001), Wi-Fi credential extraction (T1555, T1016.002), and Linux proc filesystem credential dumping (T1003.007)
24
+
- Added 16 new modules (13 PowerShell, 3 Python) based on Atomic Red Team for ATT&CK gap coverage: mshta execution (T1218.005), CHM execution (T1218.001), CMSTP UAC bypass (T1218.003), InstallUtil execution (T1218.004), regasm execution (T1218.009), msiexec execution (T1218.007), indirect command execution (T1202), browser cookie theft (T1539), base64 file encoding (T1027), compile-after-delivery (T1027.004), root certificate installation (T1553.004), hidden user creation (T1564.002), Python startup hooks (T1546.018), Windows Terminal profile persistence (T1547), exfiltration over alternative protocols (T1048.003), and Linux at job scheduling (T1053.002)
25
+
- Added 25 new modules (19 PowerShell, 6 Python) based on Atomic Red Team for ATT&CK gap coverage: clear command history (T1070.003), impair history logging (T1562.003), disable firewall (T1562.004), hide artifacts (T1564.001), FSUtil indicator removal (T1070), network share removal (T1070.005), rename system utilities (T1036.003), masquerading (T1036, T1036.005), rundll32 proxy execution (T1218.011), regsvr32 proxy execution (T1218.010), signed script proxy (T1216), jsc.exe compilation (T1127), BITS jobs (T1197), logon script persistence (T1037.001), VM detection (T1497.001), system language discovery (T1614.001), web beaconing (T1071.001), and local data staging (T1074.001)
26
+
- Added `./ps-empire test` command as a convenience wrapper for pytest with passthrough arguments
27
+
- Added Alembic database migration framework for versioned schema management. Untracked databases are stamped at the baseline revision on first startup; already-tracked databases are left as-is so pending migrations can be applied. Includes `migrate_db()` and `backup_db()` functions for future update workflows.
28
+
- Added configurable MySQL connection pool settings (`pool_size`, `max_overflow`, `pool_pre_ping`, `pool_recycle`) via server config YAML
29
+
- Added pool health monitoring that warns at 80% capacity
30
+
- Added `mysql` pytest marker for tests requiring MySQL and Docker
31
+
- Added performance test suite (`empire/test/test_performance/`) for pool exhaustion and event loop blocking regression testing
- Added `POST /api/v2/obfuscation/modules/preobfuscate` endpoint for targeted pre-obfuscation of specific modules by ID (runs in background, returns 202)
34
+
- Added `strict` and `suggested_values` to boolean switch options in modules for better validation and UI hints
35
+
- Added dynamic `depends_on` options to stagers so dependent fields (e.g. `Bypasses`, `Obfuscate`, `ObfuscateCommand`) are shown/hidden based on the selected listener type
36
+
- Added `nanodump` BOF module for creating minidumps of the LSASS process using various evasion techniques (handle duplication, process forking, snapshot, seclogon handle leaking)
37
+
- Added 7 new BOF modules sourced from Sliver Armory for defense evasion and credential access:
38
+
-`unhook` — refresh DLLs to remove EDR/AV API hooks (T1562.001)
-`inject_amsi_bypass` — AMSI bypass in a remote process via syscalls (T1562.001)
41
+
-`inject_etw_bypass` — ETW bypass in a remote process via syscalls (T1562.001)
42
+
-`credman` — dump Windows Credential Manager via SeTrustedCredManAccess (T1555.004)
43
+
-`handlekatz` — LSASS dump via handle duplication to evade handle-based detection (T1003.001)
44
+
-`bofroast` — Kerberoasting as a BOF without .NET CLR dependency (T1558.003)
45
+
- Added multi-language stager support (powershell, csharp, ironpython, go) to UAC bypass privesc modules: `bypassuac`, `bypassuac_env`, `bypassuac_eventvwr`, `bypassuac_sdctlbypass`, `bypassuac_wscript`
46
+
- Added configurable `obfuscation.timeout` setting (default: 300s, set to 0 to disable) for the PowerShell obfuscation subprocess, settable via `config.yaml` or `EMPIRE_OBFUSCATION__TIMEOUT` env var
47
+
48
+
### Changed
49
+
50
+
- Agent check-in uses single INSERT with ON DUPLICATE KEY UPDATE / ON CONFLICT DO NOTHING instead of SELECT-then-INSERT (2 queries → 1)
51
+
- All FastAPI route handlers converted from `async def` to `def`. FastAPI now dispatches every handler to a thread pool, preventing synchronous SQLAlchemy calls from blocking the uvicorn event loop. Handlers that previously offloaded work via `asyncio.to_thread()` no longer need to — the thread pool provides the same isolation automatically.
52
+
- High-frequency hooks (`AFTER_AGENT_CALLBACK_HOOK`, `AFTER_TASKING_RESULT_HOOK`, `AFTER_AGENT_CHECKIN_HOOK`, `AFTER_TASKING_HOOK`) now fire with `None` as the session argument. `_run_async_hook` and `run_hooks` provide a fresh managed session to hook callbacks, eliminating the 2x connection amplification that occurred when hooks opened a second connection while the caller still held the first.
53
+
- Cleaned up redundant "Switch." prefixes and duplicate description text from module option descriptions
54
+
- Marked `Listener` and `Command` options as conditionally required in 7 lateral movement modules (`invoke_psexec`, `invoke_wmi`, `invoke_smbexec`, `invoke_dcom`, `invoke_psremoting`, `inveigh_relay`, `invoke_executemsbuild`) so they are validated when their `depends_on` condition is met
55
+
56
+
### Removed
57
+
58
+
- Removed legacy `archive` field from `empire_compiler` config; use `repo` and `ref` instead
59
+
60
+
### Fixed
61
+
62
+
- Fixed flaky `test_pool_exhaustion_at_concurrency_levels[250]` CI failures by marking the 250-concurrency case with `pytest.mark.flaky(reruns=2)` via the new `pytest-rerunfailures` dev dependency. The assertion is preserved exactly (250 stays 250), so a real throughput regression still fails all retries while transient CI resource contention clears on rerun.
63
+
- Fixed DB pool exhaustion under concurrent load causing 503/504 cascading failures. The root cause was hook connection amplification: async hooks called inside DB session blocks opened a second pool connection via `_run_async_hook` while the caller still held the first, doubling connection usage per check-in.
64
+
- Fixed event loop blocking across all API endpoints. Previously only stager, listener, and plugin endpoints were addressed; now all 216 handlers use `def` to prevent any synchronous DB call from blocking the event loop.
65
+
- Fixed `donut-shellcode` failing with "Cannot open file" when a root-owned `loader.bin` exists in the working directory, breaking all shellcode generation tests and stager paths. Donut calls now run in an isolated temp directory via a shared `donut_create()` utility with a threading lock for concurrency safety.
66
+
- Fixed unnecessary GitHub API call on every server startup when the compiler is already cached locally
67
+
- Fixed unhandled `TagInvalidException` in `parse_routing_packet` that caused request crashes from stale agents or non-agent traffic
68
+
- Fixed `TypeError` in BOF module parameter packing when integer values were passed to options that require space-checking
69
+
- Fixed module option descriptions for `Obfuscate` and `ObfuscateCommand` that contained redundant text
70
+
- Fixed `evaluate_dependencies` crashing when `DependsOn` key exists but is `None`
71
+
- Fixed strict option validation crashing when `SuggestedValues` is `None`
72
+
- Fixed options with unmet `depends_on` conditions being excluded from params, causing `KeyError` in module `generate()` functions — they now pass through with their default value
73
+
- Fixed broken `revert_options` logic in `stager_service` that assigned entire option dicts as values, causing circular reference errors during JSON serialization
74
+
- Fixed `invoke_ntsd` module setting stager options without the `["Value"]` key, causing `TypeError` during launcher generation
75
+
- Fixed `invoke_executemsbuild``Command` option `depends_on` pointing to `Payload=Empire` instead of `Payload=Manual`, and added missing `depends_on` for `Listener`
76
+
- Fixed agent staging log messages displaying wrong language (e.g. "Python PUB key" for PowerShell agents, "PS" in C# block) by replacing hardcoded language names with the actual agent language
77
+
- Fixed incorrect log levels in agent communication: `log.error` for normal conditions (agent not active, agent exiting) downgraded to `log.debug`/`log.info`, `log.info` for invalid data (bad language spec, malformed sysinfo) upgraded to `log.warning`
78
+
- Fixed typo in SOCKS client error message ("failed to started" -> "failed to start")
79
+
- Fixed double-obfuscation in PowerShell module script generation — when a module source was already obfuscated (via `get_module_source` or `auto_get_source`), `finalize_module` was re-obfuscating the entire combined script, spawning a redundant PowerShell subprocess per task. `finalize_module` now accepts `script_already_obfuscated` to skip the expensive re-obfuscation while still obfuscating the invoke command (`script_end`).
80
+
- Fixed obfuscation subprocess (`Invoke-Obfuscation`) running indefinitely with no timeout. Added 300s timeout, process group isolation (`start_new_session`), return code checking, and empty output validation. On failure, gracefully falls back to keyword-obfuscated script with error logging.
81
+
- Fixed background jobs for the python agent.
20
82
21
83
## [6.5.0] - 2026-03-08
22
84
- Updated Starkiller to v3.4.0
@@ -29,6 +91,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
29
91
- Added `clipboard_window_inject_list` BOF module for enumerating processes with clipboard window class
30
92
- Added PIC shellcode C template and linker script for MinGW-based shellcode compilation
31
93
- Added unit tests for `shellcode_compiler` and rewrote `test_bof_packer` to cover the new `Packer` class API
94
+
- Added `repo` and `ref` fields to `empire_compiler` config, replacing the hardcoded archive URL with GitHub Releases API asset discovery
95
+
- Added unit tests for compiler platform resolution and download URL logic
32
96
- Added a runtime `Background` option to C# modules, allowing operators to override background/foreground execution at task time
33
97
- Added C# PatchETW module for in-process ETW patching via ntdll!EtwEventWrite
34
98
- Added C# PatchlessAMSI module for patchless AMSI bypass using hardware breakpoints and vectored exception handling
@@ -37,6 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
101
- Added Python linux_keyring module for credential extraction from the Linux kernel keyring subsystem
38
102
- Added Python aws_imds module for AWS IAM role credential theft via EC2 Instance Metadata Service
39
103
- Added BOF `spawn` module for EarlyBird process hollowing with suspended process creation, shellcode injection, and APC thread hijacking
104
+
- Agent "got results" log message now includes the task ID for easier post-mortem correlation
40
105
41
106
### Changed
42
107
@@ -1337,7 +1402,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Copy file name to clipboardExpand all lines: docs/agents/README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,21 @@ The Go agent (`Gopire`) is designed for use in environments where Go is advantag
27
27
28
28
Additional documentation on the agent can be found [here](./go/README.md).
29
29
30
+
## C Agent
31
+
The C agent (`Cpire`) is an experimental native agent modeled after the Go agent. It compiles into a standalone binary and supports Windows and Linux targets. **Currently, the C agent supports the HTTP listener only.**
32
+
33
+
The C agent is only available in the [Sponsors](https://github.com/sponsors/BC-SECURITY) version of Empire.
34
+
35
+
### Features
36
+
- Cross-platform: supports Windows and Linux targets.
37
+
- Native compiled binary with no runtime dependencies.
38
+
- Runs PowerShell, C#, BOF, and shell taskings.
39
+
- Full DH key exchange staging with Ed25519 certificate verification.
40
+
- File download/upload and directory listing.
41
+
- Agent controls: delay/jitter, kill date, working hours, lost-limit enforcement.
42
+
43
+
Additional documentation on the agent can be found [here](./c/README.md).
44
+
30
45
## PowerShell Agent
31
46
The PowerShell agent is the original agent for Empire.
The C agent (`Cpire`) is an experimental native agent for Empire, modeled after the Go agent (Gopire). It compiles into a standalone binary and supports Windows and Linux targets via cross-compilation. **Currently, the C agent supports the HTTP listener only.**
4
+
5
+
The C agent is only available in the [Sponsors](https://github.com/sponsors/BC-SECURITY) version of Empire.
6
+
7
+
## Prerequisites
8
+
9
+
To compile the C agent, the following are required:
10
+
11
+
- A C compiler (GCC or MinGW for cross-compilation)
12
+
- OpenSSL development libraries
13
+
- For Windows targets: `x86_64-w64-mingw32-gcc` (MinGW-w64 toolchain)
14
+
15
+
## Compilation and Setup
16
+
17
+
The C agent is compiled server-side via the `CCompiler` class. When generating a stager through the `multi/c_exe` stager, the server handles compilation automatically using the configured compiler.
18
+
19
+
### Stager Options
20
+
21
+
| Option | Description | Default |
22
+
|--------|-------------|---------|
23
+
|`Listener`| Listener to use (required) | - |
24
+
|`CC`| C compiler override |`x86_64-w64-mingw32-gcc` (Windows) or `gcc` (Linux) |
25
+
|`CFLAGS`| Extra compiler flags | - |
26
+
|`TargetOS`| Target OS: `windows` or `linux`|`windows`|
The `CCompiler` class validates compiler flags and compiler binaries against an allowlist to prevent command injection during server-side compilation. The agent zeros all cryptographic key material using `OPENSSL_cleanse` before freeing memory to prevent forensic recovery.
0 commit comments