Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting Remote Session Disconnection Issue During Windows Login #202

Open
amoljagdalepucsd opened this issue Oct 7, 2023 · 3 comments

Comments

@amoljagdalepucsd
Copy link

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.

@krayon007 @Ylianst

@amoljagdalepucsd
Copy link
Author

amoljagdalepucsd commented Oct 13, 2023

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

@si458
Copy link
Collaborator

si458 commented Oct 13, 2023

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

@amoljagdalepucsd
Copy link
Author

amoljagdalepucsd commented Oct 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants