Feature: run a test client inside the master from the Advanced menu

The Advanced menu now ends with Run Test Program. It copies the kernel
payload that was already read into memory, points its CONNECT_ADDRESS at
127.0.0.1:<listen port>, and loads it with MemoryLoadLibrary inside the
master process, so this machine comes online as a controlled host -- no
second machine is needed to try remote desktop or file transfer. A
worker thread waits for the client to exit, then frees the module and
re-enables the item. Only one instance runs at a time: the item is
grayed while it does, and stopping it means uninstalling the test host
from the online list.

The loaded copy carries LOCAL_TEST_CLIENT_MAGIC in szFuture. The client
uses that mark to refuse the commands that would otherwise hit the host
process or the whole machine: uninstall (no self_del), update, run as
admin, ban, share/assign, and shutdown/reboot/logoff. It also skips
auth-kernel detection, which GetModuleFileName(NULL) would misjudge
inside the master.

Renames szFututre to szFuture and documents that the first 16 bytes of
the reserved tail are now claimed, with a static_assert so it cannot
silently shrink below the magic.

Translations for en_US, zh_TW and de_DE, plus the HIDE_MENU_RUN_TEST
feature flag and its row in the limits dialog.

Verified on a Debug master: the item is last and has its icon, one click
brings the host online, a second click is refused, uninstall stops it in
about a second and the master survives, re-run works, and exiting the
master with a live test client takes 2.6s (3.0s baseline).

Co-Authored-By: deepseek-flash
This commit is contained in:
yuanyuanxianganddeepseek-flash committed 2026-11-06 17:17:18 +01:00
1 parent cc9ce35c4d
commit f77b18aa68
18 files changed
+268 -11

No files matched your search

+11
View File
@@ -2137,6 +2137,17 @@ DLL
已关闭:此后下发的 DLL 不再内嵌证书。\r\n\r\n已经内嵌了证书的客户端不受影响。=Ausgeschaltet: Ab jetzt ausgelieferte DLLs enthalten kein Zertifikat mehr.\r\n\r\nClients mit bereits eingebettetem Zertifikat sind nicht betroffen.
重新生成内核载荷失败(资源缺失),仍沿用原来的 DLL。=Neuerstellung der Kern-Payloads fehlgeschlagen (Ressource fehlt); die bisherige DLL bleibt in Verwendung.
; ============================================
; Advanced -> Run Test Program (运行测试程序)
; ============================================
运行测试程序=Testprogramm starten
测试程序已在运行。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」;结束后本菜单项会自动恢复可用。=Das Testprogramm laeuft bereits.\r\n\r\nZum Beenden in der Online-Liste den gerade online gegangenen Test-Host mit 'Deinstallieren' entfernen; danach ist dieser Menuepunkt wieder verfuegbar.
测试程序已启动,本机将作为受控端上线。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」,结束后本菜单项自动恢复。=Das Testprogramm wurde gestartet; dieser Rechner geht als gesteuerter Host online.\r\n\r\nZum Beenden in der Online-Liste den gerade online gegangenen Test-Host mit 'Deinstallieren' entfernen; danach wird dieser Menuepunkt wieder freigegeben.
内核 DLL 尚未就绪,无法运行测试程序。=Die Kernel-DLL ist noch nicht bereit, das Testprogramm kann nicht starten.
内核 DLL 中找不到连接配置,无法运行测试程序。=In der Kernel-DLL wurden keine Verbindungsdaten gefunden, das Testprogramm kann nicht starten.
加载内核 DLL 失败。=Kernel-DLL konnte nicht geladen werden.
创建测试线程失败。=Testthread konnte nicht erstellt werden.
; ===== TLS =====
TLS证书(&T)...=TLS-Zertifikat(&T)...
TLS证书=TLS-Zertifikat
+11
View File
@@ -2152,6 +2152,17 @@ DLL
已关闭:此后下发的 DLL 不再内嵌证书。\r\n\r\n已经内嵌了证书的客户端不受影响。=Disabled: DLLs delivered from now on no longer carry a certificate.\r\n\r\nClients that already have an embedded certificate are not affected.
重新生成内核载荷失败(资源缺失),仍沿用原来的 DLL。=Failed to regenerate kernel payloads (missing resource); the previous DLL is still in use.
; ============================================
; Advanced -> Run Test Program (运行测试程序)
; ============================================
运行测试程序=Run Test Program
测试程序已在运行。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」;结束后本菜单项会自动恢复可用。=The test program is already running.\r\n\r\nTo stop it, right-click the test host that just came online and choose 'Uninstall'; this menu item becomes available again once it exits.
测试程序已启动,本机将作为受控端上线。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」,结束后本菜单项自动恢复。=The test program has started; this machine will come online as a controlled host.\r\n\r\nTo stop it, right-click the test host that just came online and choose 'Uninstall'; this menu item is restored once it exits.
内核 DLL 尚未就绪,无法运行测试程序。=The kernel DLL is not ready yet, so the test program cannot start.
内核 DLL 中找不到连接配置,无法运行测试程序。=The connection settings were not found in the kernel DLL, so the test program cannot start.
加载内核 DLL 失败。=Failed to load the kernel DLL.
创建测试线程失败。=Failed to create the test thread.
; ===== TLS =====
TLS证书(&T)...=TLS Certificate(&T)...
TLS证书=TLS Certificate
+11
View File
@@ -2145,6 +2145,17 @@ DLL
已关闭:此后下发的 DLL 不再内嵌证书。\r\n\r\n已经内嵌了证书的客户端不受影响。=已關閉:此後下發的 DLL 不再內嵌憑證。\r\n\r\n已內嵌憑證的用戶端不受影響。
重新生成内核载荷失败(资源缺失),仍沿用原来的 DLL。=重新產生核心負載失敗(資源缺失),仍沿用原本的 DLL。
; ============================================
; Advanced -> Run Test Program (运行测试程序)
; ============================================
运行测试程序=執行測試程式
测试程序已在运行。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」;结束后本菜单项会自动恢复可用。=測試程式已在執行。\r\n\r\n要停止它,請在線上清單裡對剛上線的那台測試主機執行「卸載」;結束後本選單項會自動恢復可用。
测试程序已启动,本机将作为受控端上线。\r\n\r\n要停止它,请在在线列表里对刚上线的那台测试主机执行「卸载」,结束后本菜单项自动恢复。=測試程式已啟動,本機將作為受控端上線。\r\n\r\n要停止它,請在線上清單裡對剛上線的那台測試主機執行「卸載」,結束後本選單項自動恢復。
内核 DLL 尚未就绪,无法运行测试程序。=核心 DLL 尚未就緒,無法執行測試程式。
内核 DLL 中找不到连接配置,无法运行测试程序。=核心 DLL 中找不到連線設定,無法執行測試程式。
加载内核 DLL 失败。=載入核心 DLL 失敗。
创建测试线程失败。=建立測試執行緒失敗。
; ===== TLS =====
TLS证书(&T)...=TLS 憑證(&T)...
TLS证书=TLS 憑證