Repository navigation
Comprehensive Security Hardening, Credential Provider Isolation, and Protocol Remediations
Overview
Tether version 1.1.4 delivers critical architectural, security, and usability remediations across the entire Tether ecosystem, encompassing the Windows background service, native Credential Provider DLL, Session Helper, Desktop UI, Android companion application, and Inno Setup installer.
Key highlights include strict per-instance tile isolation in Windows LogonUI, DPAPI machine-level vault encryption, named pipe access control hardening with Network SID rejection, unique lock session tracking on Android, sequential touch input queues, and enhanced pairing rate limiting with real-time feedback.
Key Changes & Improvements
1. Windows Credential Provider & Logon UI Isolation
- Per-Instance State Synchronization: Replaced global state triggers with atomic instance flags (
_fInstancePhoneAppTriggered,_fInstanceAutoLogonReady) inCTetherCredential, preventing tile starvation and race conditions in multi-account login environments. - Target User SID Validation: Bound remote unlock requests directly to the configured
TargetUserSidin registry secrets. SID validation performs account lookups viaLookupAccountNameWandConvertSidToStringSidWwith fallbacks for domain-joined accounts. - LogonUI Filter Clean-up: Removed erroneous
ICredentialProviderregistration entries under the WindowsCredential Provider Filtersregistry key in bothregister.regandTether.iss, preventing potentialLogonUI.exestability issues.
2. Inter-Process Communication & Secrets Hardening
- Named Pipe Access Restrictions: Implemented explicit
NetworkSidDENY access rules on\\.\pipe\TetherIPCto prevent remote or cross-network named pipe exploitation. Client process credentials and session contexts are verified viaRunAsClient. - IPC Event Whitelisting: Prohibited unauthorized state-injection payloads (
PHONE_UNLOCKED,AUTH_SUCCESS) over IPC pipes, enforcing an allowlist restricted to authorized client actions (PANIC_TRIGGERED,HARDWARE_SYNC_REQUESTED,FORGET_PHONE,VAULT_UPDATE). - DPAPI Machine-Level Vault Storage: Refactored
TrustStoreto use Windows Data Protection API (ProtectedData.ProtectunderDataProtectionScope.LocalMachine). Writes are performed atomically using temporary files with inheritance-stripped DACLs restricted toSYSTEMandAdministrators. - Zero Command-Line Credential Leakage: Eliminated command-line credential passing in
Tether.DesktopUI. Vault updates are now securely piped across redirected standard input via--commit-vault-stdin.
3. Session Management & Input Injection
- Least-Privilege Process Querying: Replaced elevated process query tokens with
PROCESS_QUERY_LIMITED_INFORMATIONinTether.SessionHelper, allowing standard user processes to reliably locate the Session 0 service. - Locked-State Input Suppression: Updated
InputInjectorto verify workstation lock status and suppress virtual mouse and keyboard injection while the console is locked.
4. Pairing Protocol & Rate Limiting
- PIN Retry Policy: Expanded pairing retry attempts to a maximum of 3 failed entries before closing the handshake. Packets transmit
PAIRING_INVALID_PINwith the count of remaining attempts. - PIN Privacy: Stripped plaintext PIN values from internal event bus distribution; the PIN is surfaced strictly to the active console session via
WTSSendMessage. - Concurrency Guards: Added
SemaphoreSlimsynchronization to the Desktop UI pairing handler to eliminate concurrent dialog collisions. - mDNS Certificate Resolution: Embedded
{hostname}.localSubject Alternative Name (SAN) records in generated self-signed TLS certificates to ensure smooth local host resolution.
5. Android Companion Application
- Lock Session Isolation: Addressed notification deadlock by scoping unlock notifications to a unique
lockSessionId(UUID) per lock event. Clearing dismissals onWTS_SESSION_UNLOCKensures future lock events prompt the user reliably. - Notification Cleanup: Active unlock notifications are automatically cancelled as soon as the workstation is unlocked locally or remotely.
- Sequential Touch and Gesture Pipeline: Migrated
sendInputFramefrom unbounded parallel coroutines to a sequential coroutineChannel<ByteArray>, preventing out-of-order mouse and touch packet delivery over Wi-Fi. - Subnet-Directed Discovery: Enhanced
TetherDiscoveryManagerto iterate over all active network interfaces and broadcast discovery packets to subnet-directed broadcast addresses alongside255.255.255.255. - Pairing Interface: Refactored
PairingConfirmationActivityto display live remaining PIN attempts without dismissing the dialog on invalid entries. - UI Feedback: Added charging indicator animations within
LaptopScreenCard.
6. Packaging & Build Automation
- Installer Updates: Updated Inno Setup installer script (
Tether.iss) to v1.1.4. Removed obsolete 32-bit Visual C++ redistributable requirements. - Data Retention Guard: Added an uninstallation prompt enabling users to preserve secure vault pairings across re-installations.
- Logging Standardization: Standardized runtime logs to rolling files placed in
%ProgramData%\Tether\logs. - Repository Hygiene: Updated
.gitignoreto prevent tracking of local build scripts, binary artifacts, and signing keys.
Commit Summary
dd28a67- chore: add binaries, build scripts to .gitignore and bump installer versionfa6e1d2- fix(core): comprehensive architectural, security, and usability remediations
File Change Statistics
- Total Files Changed: 34
- Additions: +1,084 lines
- Deletions: -219 lines