Repository navigation
v1.2.3 #49
tirthsaraiya29
announced in
Announcements
v1.2.3
#49
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Overview
Tether v1.2.3 is a focused security and reliability release that introduces comprehensive hardening across the Windows Credential Provider, IPC named pipe and event infrastructure, and the session helper's application launch surface. This release also delivers automatic Microsoft Account detection with adaptive onboarding UI, resolves multiple desktop interface layout regressions, and adds persistent paired device caching for immediate visibility at launch.
New Features
Microsoft Account Auto-Detection and Adaptive UI
A new
WindowsAccountDetectorcomponent automatically identifies whether the active Windows session is backed by a Microsoft Account (MSA), a local account, or a domain account at application startup.NetUserGetInfoat level 24 to query theUSER_INFO_24structure, extracting theusri24_internet_identityflag, the internet provider name, and the internet principal name (e.g.,user@outlook.com). Fallback detection checks theIdentityCRLregistry hive and token group SIDs when the primary call is unavailable or returns inconclusive results.LogonUser(Win32) before being committed to the DPAPI-encrypted store. The validator detects common mistakes including PIN entry (4-10 digit numeric strings), expired passwords (ERROR_PASSWORD_EXPIRED), disabled accounts (ERROR_ACCOUNT_DISABLED), and incorrect passwords (ERROR_LOGON_FAILURE), returning clear, account-type-aware error messages. Validation attempts multiple candidate (username, domain) pairs including MSA-specific "MicrosoftAccount" domain, SAM name with local domain, and dot-domain fallbacks, using bothLOGON32_LOGON_INTERACTIVEandLOGON32_LOGON_NETWORKlogon types.Persistent Paired Device Caching
Paired phone devices now appear immediately on application launch, even when the communication service is still starting or the phone is temporarily disconnected.
%LocalAppData%\Tether\paired_devices.json. On startup, cached device entries (including device ID, display name, fingerprint, and last-seen timestamp) are loaded and rendered in the sidebar before the service connection is established.TrustStorenow writes apaired_devices_cache.jsonsummary file alongside the trust data in%ProgramData%\Tether, with Authenticated Users granted read access to the trust store directory and file. This enables the non-elevated desktop UI process to read paired device state without requiring administrative privileges.PairingManagernow publishes aPROVISION_PHONEevent over the internal event bus upon successful phone pairing completion, carrying a JSON payload of all currently trusted devices. The desktop UI requests a telemetry sync with retries on startup to ensure the cache is populated.Security
Credential Provider COM Interface Hardening
Every public COM interface method in
CTetherCredentialhas been hardened with structured exception handling and rigorous parameter validation.Initializemethod is now wrapped in atry/catch(...)block returningE_UNEXPECTEDon unhandled exceptions, matching the existing pattern applied to other COM methods. This prevents unhandled C++ exceptions from propagating across the COM boundary on the secure desktop (Winlogon).E_POINTER) have been added toSetSelected,GetFieldState,GetStringValue,GetBitmapValue,GetSubmitButtonValue,GetComboBoxValueCount,GetComboBoxValueAt,GetFieldOptions,ReportResult, andGetUserSid. Output pointers are pre-initialized tonullptrwhere applicable before any work is performed.Initializemethod now validates all three input pointers (pcpUser,rgcpfd,rgfsp) before proceeding, up from checking onlypcpUser.Plaintext Password Memory Zeroing
All code paths that handle plaintext password buffers in the credential provider now zero memory before deallocation to prevent password remnants from persisting in the process address space.
SFI_PASSWORD) is overwritten, the previous buffer is zeroed withSecureZeroMemoryover its fullwcslen * sizeof(WCHAR)extent beforeCoTaskMemFree.SecureZeroMemorybefore being freed viaCoTaskMemFree.pwzProtectedandpwzToProtectCopybuffers are zeroed withSecureZeroMemorybeforeCoTaskMemFree. Null checks guard against double-free on already-freed pointers.IPC Named Event Security Overhaul
The global named events used for inter-process communication between the credential provider, the communication service, and the desktop UI (
TetherPhoneAppUnlocked,TetherPhoneConnected,TetherUnlockPromptRequested) have been redesigned for a consistent "open-or-create" pattern with strengthened DACLs.D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GR;;;AU), granting SYSTEM and Administrators full generic access while granting Authenticated Users read-only (generic read) access. The previous SDDLD:P(A;;GA;;;SY)(A;;GA;;;BA)excluded Authenticated Users entirely, which causedUnauthorizedAccessExceptionfailures when the desktop UI (running as a standard user) attempted to open events withSynchronizerights.Worker.csandHardwareExecutor.csnow useEventWaitHandleAcl.TryOpenExistingto open pre-existing events with only the minimum required rights (Modify | ReadPermissions, orModify | ReadPermissions | Synchronize), eliminating the previous pattern of always creating events and then checkingcreatedNew. This avoids requestingWRITE_DACpermission on events owned by SYSTEM, which standard-user processes cannot obtain.SetKernelObjectSecurityto enforce the current expected SDDL, ensuring that events created by older versions with weaker DACLs are upgraded in place.TetherCredential.cpp) applies the same "create-then-verify" pattern with the updated SDDL. TheIsTrustedKernelObjectOwnerhelper is used consistently to validate that existing events are owned by SYSTEM or Administrators before signaling.MainWindow.xaml.csopens global unlock events viaEventWaitHandleAcl.TryOpenExistingwithSynchronize-only rights, the minimum needed to wait on the event without requiring write or modify permissions.Named Pipe Security Hardening
All
NamedPipeServerStreaminstances across the communication service have been updated to explicitly deny the Anonymous SID (WellKnownSidType.AnonymousSid) in addition to the existing Network SID denial.CreatePipeSecurity()now includes an explicitDenyACE forAnonymousSidwithReadWriterights. The method visibility was changed fromprivatetointernalto support unit testing. The access rule ordering is documented with numbered comments.AnonymousSiddeny rule.AnonymousSiddeny rule.Application Launch Command Injection Prevention
ApplicationManager.LaunchApplicationin the session helper has been hardened against command injection, shell metacharacter exploitation, and execution of dangerous binaries.&,|,<,>,^,;,`) are rejected.cmd,powershell,pwsh,mshta,cscript,wscript,bash,wsl,sh,reg,vssadmin) prevents direct invocation of shell interpreters and system-modifying tools, checked against both the full filename and the filename without extension..bat,.cmd,.ps1,.psm1,.vbs,.vbe,.js,.jse,.wsf,.wsh,.hta,.msc,.reg) are blocked from launch.Shell Execution Hardening
HardwareExecutorno longer usescmd.exe /c startto launch browser URLs or Windows Settings URIs. These are now launched directly viaexplorer.exe, eliminatingcmd.exeas an intermediary and reducing the attack surface for command injection through crafted capability payloads.PowerCfg Argument Injection Prevention
WindowsAdminManagerpowercfg invocations for battery report generation and power scheme activation have been refactored from string-basedArgumentsto the array-basedArgumentListAPI (psi.ArgumentList.Add(...)). This prevents argument injection through specially crafted power scheme GUIDs or file paths, as the runtime handles escaping and quoting automatically.Bug Fixes
Audio Mute State Query
HardwareExecutornow correctly interprets exit codes from the audio helper when theget-mutesubcommand is invoked. Previously, only exit code 0 was treated as a valid result for numeric queries. The mute state query now recognizes both exit code 0 (unmuted) and exit code 1 (muted) as valid responses, and stores the exit code directly as the numeric result. This fixes incorrect "mute state unavailable" errors when the system audio was muted.IPC Named Event Permission Errors
EVENT_MODIFY_STATE | READ_CONTROL | WRITE_DACpermissions (as was done implicitly by the previousCreate-with-createdNewpattern) failed withACCESS_DENIEDwhen the event was owned by SYSTEM and the caller was a standard user process. The newTryOpenExistingpattern requests only the minimum required rights, resolving sporadicUnauthorizedAccessExceptionerrors during service startup and event signaling.Desktop UI Layout Corrections
Grid.Columnassignments have been corrected andTextWrappinghas been enabled on the description text block.Test Coverage
Native Test Suite (C++)
Test_CredentialProvider_Initialize_NullArgs_Rejected: Verifies thatCTetherCredential::InitializereturnsE_INVALIDARGwhen called with nullrgcpfd,rgfsp, orpcpUserpointers.Test_CredentialProvider_COM_PointerChecks: Comprehensive null-pointer validation test coveringSetSelected,GetFieldState,GetStringValue,GetBitmapValue,GetSubmitButtonValue,GetComboBoxValueCount,GetComboBoxValueAt,GetFieldOptions,ReportResult, andGetUserSid. Each method is verified to returnE_POINTERwhen called with null output parameters.Test_CredentialProvider_SetStringValue_ZeroesOldPassword: End-to-end test using aMockCredentialProviderUserthat initializes a credential, sets a password, verifies it viaGetStringValue, then overwrites it and verifies the new value is returned correctly, confirming that the zeroing and replacement logic does not corrupt field state..NET Test Suite (xUnit)
EventSecurityDescriptor_AllowsSystemAndAdminsFullControl_AndAuthenticatedUsersReadOnly: Updated to validate the new three-ACE SDDL structure with exact ACE string assertions ((A;;GA;;;SY),(A;;GA;;;BA),(A;;GR;;;AU)) and confirms the absence of Anonymous (AN) and Everyone (WD) SIDs.PipeServerSecurity_DeniesNetworkAndAnonymous_AllowsLocalSystemAndAdmins: New test that instantiates the productionPipeServer.CreatePipeSecurity()method and iterates all access rules to verify that Network and Anonymous SIDs are denied, SYSTEM and Administrators are allowed, and Authenticated Users are allowed.ApplicationManagerTests: New test class with three theory-based test methods:LaunchApplication_RejectsControlCharacters: Verifies rejection of paths containing newlines, tabs, null bytes, and embedded control sequences.LaunchApplication_BlocksShellInterpreters: Verifies rejection ofcmd.exe,powershell.exe,pwsh.exe,mshta.exe,cscript.exe,wscript.exe,bash.exe,wsl.exe, and their extensionless variants, including fully qualified paths.LaunchApplication_BlocksScriptExtensions: Verifies rejection of files with.bat,.cmd,.ps1,.psm1,.vbs,.hta, and.regextensions.Infrastructure
Tether.iss) updated from1.2.1to1.2.3. Android companion app (build.gradle.kts) updated from version name1.2.2/ version code4to version name1.2.3/ version code6.CreatePipeSecurity()changed fromprivatetointernalto enable direct unit testing of the pipe security descriptor construction.Files Changed
TetherCredential.cpp,helpers.cppMainWindow.xaml,MainWindow.xaml.cs,App.xaml.cs,WindowsAccountDetector.cs(new)HardwareExecutor.cs,WindowsAdminManager.cs,PipeServer.cs,InputForwarder.cs,Worker.cs,TrustStore.cs,PairingManager.csApplicationManager.csmain.cpp,ApplicationManagerTests.cs(new),GlobalNamedEventTests.csTether.iss,build.gradle.ktsUpgrade Notes
paired_devices_cache.jsonfile in%ProgramData%\Tetherwill be created automatically on the next trust store write operation.paired_devices.jsonfile in%LocalAppData%\Tetherwill be created automatically by the desktop UI on first successful paired device sync.This discussion was created from the release v1.2.3.
All reactions