How To: Uninstall ConnectSecure Scan Agent

Modified on Mon, Sep 8 at 2:31 PM

https://app.storylane.io/share/5kbjbfrwkglk


Overview

This document will cover how to uninstall the ConnectSecure Vulnerability Scan Agent, otherwise known as the CyberCNS agent.


Method 1 - Uninstall from Web Portal

  1. Login to the ConnectSecure portal (portal.myconnectsecure.com)

  2. Select Global or Company

  3. Tap on the Assets > Assets menu, then choose your Probe or Lightweight Agent option

  4. Tap the three-dot action menu and choose Uninstall

image-20240320-175750.pngimage-20240320-175852.png

The agent must be online in order to get the uninstall command succesfuly


Method 2 - Uninstall from Add/Remove Programs (Windows OS only)

  1. Access the Add/Remove Programs from Windows Settings > Installed Apps

  2. Locate the program called ‘ConnectSecure Vulnerability Scan Agent’ and tap to uninstall

image-20240320-191644.png

Method 3 - Uninstall from Command Prompt or CLI

Uninstalling the agent directly from the device removes it from the system, but the asset may still appear in the ConnectSecure portal. To fully remove the asset from both the device and the portal, the agent must be uninstalled or deleted through the portal interface.

Windows

  1. Open the command prompt as administrator

  2. Navigate to the installed agent directory; by default we install to C:\ProgramFiles(X86)\CyberCNSAgent

  3. Execute the ./cybercnsagent.exe -r command

cd "C:\Program Files (x86)\CyberCNSAgent"
cybercnsagent.exe -r

This should completely remove the application and all services.


MAC

  1. Open the terminal as sudo

     >> cd /opt/CyberCNSAgent/
     >> ./cybercnsagent_darwin -r

To stop/unload the service in the mac asset

sudo launchctl unload -w /Library/LaunchDaemons/com.CyberCNSAgent.AgentService.plist

To remove the service from the mac asset

sudo rm  /Library/LaunchDaemons/com.CyberCNSAgent.AgentService.plist


Looking for V2 Agent Information; check the page below

https://cybercns.atlassian.net/wiki/x/aIA9YQ


Linux

Uninstallation Steps for Linux (Probe & LightWeightAgent)

  1. Browse to the CyberCNSAgent installation directory

       >>cd /opt/CyberCNSAgent/
  1. Run the uninstall command

       >>./cybercnsagent_linux -r

Delete cybercnsagent service(s)

Run the commands below if the service(s) are not removed during the method(s) listed above.

sc delete [service name]
sc delete cybercnsagent
sc delete cybercnsagentmonitor


Batch Script Method

Using this method does not delete the agent from the portal. Once the batch file has completed, you can proceed to delete the agent from the portal using the three-dot Action menu as shown here:

image-20250908-154350.png

Use the .bat uninstall method by pushing the uninstall.bat script that is located @ C:\Program Files (x86)\CyberCNSAgent\uninstall.bat on any endpoint as Admin.

The uninstall.bat is also copied below:

@echo off
ping 127.0.0.1 -n 6 > nul
cd 'C:\PROGRA~2'
:: sc stop ConnectSecureAgentMonitor
:: timeout /T 5 > nul
:: sc delete ConnectSecureAgentMonitor
timeout /T 5 > nul
sc stop CyberCNSAgent
timeout /T 5 > nul
sc delete CyberCNSAgent
ping 127.0.0.1 -n 6 > nul
taskkill /IM osqueryi.exe /F
taskkill /IM nmap.exe /F
taskkill /IM cyberutilities.exe /F
CyberCNSAgent\cybercnsagent.exe --internalAssetArgument uninstallservice
rmdir CyberCNSAgent /s /q

Need Support?

Do you need help? You can access our support portal anytime to create, view, and update tickets.

https://cybercns.freshdesk.com

Click below to be directed to our secure support portal or email support@cybercns.com to open a ticket.

image-20231229-202028.png

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article