Troubleshooting Remote Session Disconnection Issue During Windows Login
Opened this issue · 3 comments
Hi Community , I am facing below issue in MeshCentral.
When there are no active sessions (neither console nor RDP) on a system, and a remote session is initiated through MeshCentral , the session begins, showing the Windows login screen with a list of users. However, upon selecting a user, entering the password, and attempting to log in, the session immediately disconnects. Is there any way to avoid this disconnection? It's important to note that after clicking on the 'connect' button again, the control is restored and works fine.
Hi Community,
I'm encountering a persistent issue within MeshCentral's agent code. Specifically, the issue arises during remote sessions and appears to be related to the CheckDesktopSwitch function in the kvm.c file.
Issue Description:
When initiating a remote session through MeshCentral on a system with no active sessions (neither console nor RDP), the session begins as expected, displaying the Windows login screen with a list of users. However, after selecting a user, entering the password, and attempting to log in, the session immediately disconnects. It's important to note that upon clicking the 'connect' button again, control is restored, and the remote session works flawlessly.
Findings and Attempts:
I've performed a detailed investigation and found that the issue appears to be within the CheckDesktopSwitch function in kvm.c. This function seems to handle desktop changes and remote session credentials. Here's what I've discovered:
Desktop Change Logic: The code checks for desktop changes and may potentially cause disconnections. I suspect that this logic may be overly sensitive and triggering disconnections erroneously.
User Object Information: The function uses GetUserObjectInformationA, OpenInputDesktop, and CloseDesktop functions to gather information about the desktop. These calls could be relevant to the problem.
Now, I'm looking for insights or suggestions on how to modify the kvm.c code / agentcore.c and other agent files to potentially address this issue. Are there any experienced developers familiar with the CheckDesktopSwitch function who could offer advice on code changes or adjustments to mitigate this disconnection problem?
Thank you for your help!
@krayon007 @si458 @Ylianst @silversword411
sadly im not a C expert so i cant help when it comes to the agent side of things
i work with NODEJS mainly
also you already have an issue open in the other repo so im linking them together
and im sure the is more issues about this problem which ill link later when i find them
Ylianst/MeshCentral#5294
Ylianst/MeshCentral#4409
Ylianst/MeshCentral#2471
Thank you @si458 for the response.
Yes , All three issues are same I guess
Are you aware of any C/C++ experts or developers who are actively involved in maintaining the Duktape environment? If so, could you kindly mention or tag them here? I'm currently in the process of comprehending agent files within Duktape, and I'm making steady progress in my understanding and findings. I would greatly appreciate their assistance, and I'm willing to share my insights and progress with the relevant individuals.