Windows Agent - SyncroMSP Installation

Introduction

Follow this article to install the Blackpoint SNAP-Defense agent to your customer network using your SyncroMSP tool. We've broken down the installation into four main steps:

  1. Copying the SNAP Agent URL
  2. Modifying the PowerShell script
  3. Setting up the SyncroMSP script
  4. Deploying the Snap Agent

Instructions

Copying the SNAP Agent URL

  1. In the Blackpoint Portal, navigate to Customers in the left-hand menu. 
  2. In the Customer List section, find the customer you want to deploy the agent to. Click the Manage button. You will be redirected to the Customer Details page.
  3. Provided that a service has been added to this customer, you will see a Download SNAP Agent button. Click to download the .exe file. Likewise, you can copy the URL to your clipboard if you prefer to use the hosted agent link.
  4. The URL contains two values you will need in the next section: the CustomerUID and the CompanyEXE. Save or paste this information in a secure location.
    • CustomerUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    • CompanyEXE: COMPANYNAME_installer.exe
    For example, if the URL is https://portal.blackpointcyber.com/installer/f1dc5f6a-1e05-883e-9c90-61pon278wm52/MyFirstCustomer_snap_installer.exe, then:
    • The CustomerUID is f1dc5f6a-1e05-883e-9c90-61pon278wm52
    • The CompanyEXE is MyFirstCustomer_snap_installer.exe
  5. Important. Remember that each UID and installer will be unique to one company only.

Modifying the PowerShell script

  1. Download the Powershell script here. Right-click on the link and select Save Link As...
  2. Next, open the script and paste in the CustomerUID and the CompanyEXE values you recorded in the previous section.
  3. Finally, send the script to the deployment method you prefer.

    Important. The script must be run with Administrative privileges to successfully install.
    #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#
    #.______    __          ___       ______  __  ___ .______     ______    __  .__   __. .___________.##  
    #|   _  \  |  |        /   \     /      ||  |/  / |   _  \   /  __  \  |  | |  \ |  | |           |## 
    #|  |_)  | |  |       /  ^  \   |  ,----'|  '  /  |  |_)  | |  |  |  | |  | |   \|  | `---|  |----`##  
    #|   _  <  |  |      /  /_\  \  |  |     |    <   |   ___/  |  |  |  | |  | |  . `  |     |  |####### 
    #|  |_)  | |  `----./  _____  \ |  `----.|  .  \  |  |      |  `--'  | |  | |  |\   |     |  |#######         
    #|______/  |_______/__/     \__\ \______||__|\__\ | _|       \______/  |__| |__| \__|     |__|#######         
    #####################################################################################################                                                                                                
    ####################################╔═╗╔╗╔╔═╗╔═╗///╔╦╗╔═╗╔═╗╔═╗╔╗╔╔═╗╔═╗#############################
    ####################################╚═╗║║║╠═╣╠═╝/// ║║║╣ ╠╣ ║╣ ║║║╚═╗║╣ ###### Ver 2.2 04/09/2021 ###
    ####################################╚═╝╝╚╝╩ ╩╩/////═╩╝╚═╝╚  ╚═╝╝╚╝╚═╝╚═╝#############################
    
    ###########
    # EDIT ME
    ###########
    
    #Customer UID found in URL From Blackpoint Portal
    $CustomerUID = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
    
    #Snap Installer name
    $CompanyEXE = "COMPANYNAME_installer.exe" 
    
    ##############################
    # DO NOT EDIT PAST THIS POINT
    ##############################
    
    #Installer Name
    $InstallerName = "snap_installer.exe"
    
    #InstallsLocation
    $InstallerPath =  Join-Path $env:TEMP $InstallerName
    
    #Snap URL
    $DownloadURL = "https://portal.blackpointcyber.com/installer/$CustomerUID/$CompanyEXE"
    
    #Service Name
    $SnapServiceName = "Snap"
    
    #Enable Debug with 1
    $DebugMode = 1 
    
    #Failure message
    $Failure = "Snap was not installed Successfully. Contact [email protected] if you need more help."
    
    function Get-TimeStamp {
        return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date)
    }
    
    
    #Checking if the Service is Running
    function Snap-Check($service)
    {
        if (Get-Service $service -ErrorAction SilentlyContinue)
        {
            return $true
        }
        return $false
    }
    
    #Debug 
    function Debug-Print ($message)
    {
        if ($DebugMode -eq 1)
        {
            Write-Host "$(Get-TimeStamp) [DEBUG] $message"
        }
    }
    
    #Checking .NET Ver 4.6.1
    function Net-Check {
        #Left in to help with troubleshooting
        #$cimreturn = (Get-CimInstance Win32_Operatingsystem | Select-Object -expand Caption -ErrorAction SilentlyContinue) 
        #$windowsfull =  $cimreturn
        #$WindowsSmall = $windowsfull.Split(" ")
        #[string]$WindowsSmall[0..($WindowsSmall.Count-2)]
        #If ($WindowsSmall -eq $Windows10) {  
        
        Debug-Print("Checking for .NET 4.6.1+...") 
        #Calls Net Ver 
            If (! (Get-ItemProperty "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release -gt 394254){
                       
    
            $NetError = "SNAP needs 4.6.1+ of .NET...EXITING" 
            Write-Host "$(Get-TimeStamp) $NetError"
            exit 0
            }
            
            {
            Debug-Print ("4.6.1+ Installed...")
            }
               
    }
    
    #Downloads file
    function Download-Installer {
        Debug-Print("Downloading from provided $DownloadURL...")
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
        $Client = New-Object System.Net.Webclient
        try
        {
            $Client.DownloadFile($DownloadURL, $InstallerPath)
        }
        catch
        {
        $ErrorMsg = $_.Exception.Message
        Write-Host "$(Get-TimeStamp) $ErrorMsg"
        }
        If ( ! (Test-Path $InstallerPath) ) {
            $DownloadError = "Failed to download the SNAP Installation file from $DownloadURL"
            Write-Host "$(Get-TimeStamp) $DownloadError" 
            throw $Failure
        }
        Debug-Print ("Installer Downloaded to $InstallerPath...")
    
    }
    
    #Installation 
    function Install-Snap {
        Debug-Print ("Verifying AV did not steal exe...")
        If (! (Test-Path $InstallerPath)) {
        {
            $AVError = "Something, or someone, deleted the file."
            Write-Host "$(Get-TimeStamp) $AVError"
            throw $Failure
        }
        }
        Debug-Print ("Unpacking and Installing agent...")
        Start-Process -NoNewWindow -FilePath $InstallerPath -ArgumentList "-y"    
    }
    
    function runMe {
        Debug-Print("Starting...")
        Debug-Print("Checking if SNAP is already installed...")
        If ( Snap-Check($SnapServiceName) )
        {
            $ServiceError = "SNAP is Already Installed...Bye." 
            Write-Host "$(Get-TimeStamp) $ServiceError"
            exit 0
        }
        Net-Check
        Download-Installer
        Install-Snap
      # Error-Test
        Write-Host "$(Get-TimeStamp) Snap Installed..."
    }
    
    try
    {
        runMe
    }
    catch
    {
        $ErrorMsg = $_.Exception.Message
        Write-Host "$(Get-TimeStamp) $ErrorMsg"
        exit 1
    }<br>
    	

Setting up the SyncroMSP script

  1. Log into SyncroMSP and navigate to More > Scripts.
  2. At the top of the screen, click the + New Script button.
  3. In the New Script screen:
    1. Input a name for the script (i.e. SNAP-Installer-$YourCompanyName)
    2. Copy and paste the edited script from the section above into the Script field.
    3. Click the Available on Every Customer Portal checkbox if you will be using the same SNAP installer across multiple customers. This will allow you to run the script on any of your customer's endpoints in SyncroMSP.
    4. Click Create Script.

Deploying the SNAP Agent

  1. In SyncroMSP, click the Assets & RMM tab.
  2. In the Customer/Site field, enter the name of the customer or site you want to deploy the agent to. If you do not need to specify a customer or site, you can leave this section blank.
  3. In the Asset list below, select the checkbox next to the assets/hosts that you want to deploy to. To select all assets in the list, select the checkbox next to NAME.
  4. At the top of the screen, click the Manage button and select Run Script...
  5. In the Run Script pop-up window:
    1. Locate and select the script you created in the section above in the Select a Script drop-down menu.
    2. Determine the Frequency you want the script to run. Then determine if you would like to run the script immediately, or at a scheduled time. You can also allow the script to skip running on offline assets. 
    3. Finally, click Run to begin running the script on the selected hosts.

You've successfully deployed to your customer's network.