tiagorlampert / CHAOS

:fire: CHAOS is a free and open-source Remote Administration Tool that allow generate binaries to control remote operating systems.
MIT License
2.31k stars 498 forks source link

Websocket Termination Not Handled Properly When It Crashes Unexpectedly. #127

Open muhammetyurdan opened 1 year ago

muhammetyurdan commented 1 year ago

I'm experiencing an issue while operating the client on a Windows system with active antivirus (AV) software.

Here's what's happening: Upon executing shell commands that the AV software flags as malicious, the AV terminates the websocket without killing the process. This is expected. However, despite this termination, I observe that the client continues to send health check (GET) and device (POST) requests but it doesn't send request /client.

After reviewing the code, I've not found any segment that handles the unexpected termination of the websocket. Specifically, there's no apparent mechanism to recreate the socket if it gets killed or to stop sending requests once the socket is down.

I hope this description provides a clearer understanding of the issue. Please let me know if you need more information.