Licensing Standalone agents without a web browser

There might be occasions where customers have a very locked down environment and use standalone agents with no WebUI or browser. This can result in a issue when the license expires and no easy way to replace it.

In order to get the KeyID’s to generate a new license in SLDM, follow the below:

  1. Open command prompt on the server and change directory to the Snare installation

cd "C:\Program Files\Snare"
  1. Run the openweb.bat script to open the Snare Web UI for access.

openweb.bat
  1. Follow the onscreen instructions to complete this process.

  2. Run the following command to capture the KeyIDs from the installation:

curl https://localhost:6161/license -k | findstr KeyID

If you receive the below error:

“curl (7) Failed to connect to the localhost port 6161: Connection refused”

Make sure you have a firewall rule in place to allow this traffic. An example cmd command to enable this is below:

netsh advfirewall firewall add rule name="AllowSnare" dir=in action=allow protocol=TCP localport=6161

  1. You will receive an output like the below:

  1. Copy the KeyIDs as per the below example:

  1. Login to the Snare License portal (SLDM) and select Licenses → My Licenses in the left-hand navigation. Once you have located the correct license, select “Enter Key-Ids” and paste in the KeyID copied from the server in Step 6.

Once you’ve got the license file, place it in a directory like C:\temp or similar.

Download our latest agent from SLDM and place it in the same directory above with the license file.

Lastly export the config of the current agent using the below steps:

Open CMD as an admin

Cut the newly created template.inf file and paste it into the same folder with the license and exe file.

Lastly using the silent installer command run the below to install the new agent with the existing config and new license.

Once all is done, confirm logs are being received or run the debug command from the installation folder to check if the license is applied.

Snarecore.exe -c -d9 > mysnare.log 2>&1