MSSQL Connector CrowdStrike Workflow Execution

Follow these steps to deploy and execute the MSSQL Server Data Sensor using a CrowdStrike workflow.

Prerequisites

The following prerequisites must be met.

CrowdStrike RTR

The CrowdStrike Real Time Response (RTR) service collection is required to perform AgileSec scanning. See https://developer.crowdstrike.com/api-reference/collections/real-time-response/ for additional details.

Optional: Host Group

While this step is optional, it is recommended to create host groups to organize your hosts. This allows you to selectively target only the hosts where you want to run scans when configuring workflows, rather than scanning all hosts in your environment.

  1. Add your Linux hosts in CrowdStrike

  2. Add your Window hosts in CrowdStrike

  3. Add your Mac hosts in CrowdStrike

  4. Add your hosts to a host group

Set up EDR ID

An EDR ID is used to obtain an access token for communicating with the AgileSec platform. This process is automatic: when a Scan runs, the configured EDR ID is presented to the Ingestion Service, which returns a Remote Sensor Token. The token is stored locally and used for subsequent authenticated communication with the Ingestion Service.

EDR IDs provide an implicit trust mechanism allowing approved endpoints to obtain a Remote Sensor Token without embedding long-lived credentials on the host. EDR IDs can be revoked at any time to immediately block token issuance for endpoints using that ID.

You can generate multiple EDR IDs and assign them to specific deployments (for example, by environment, business unit, or endpoint group) rather than using a single EDR ID across all endpoints. This segmented approach is recommended to limit blast radius and simplify revocation and rotation when access needs to be restricted.

  1. Log in to the AgileSec Platform UI, navigate to EDR Management, then click + Create EDR ID.

image-20260622-214128.png
  1. In the Create EDR ID dialog, select your organization and click Generate.

Generating EDR ID step 2
  1. Copy the newly generated EDR ID by clicking the copy icon before the EDR ID.

Generating EDR ID step 3

Step 1: Download Remote Sensor Package from Keyfactor

Download the latest Remote Sensor package from AgileSec.

  1. Open your browser and navigate to the Keyfactor AgileSec Platform Web URL

  2. Log in with your credentials

  3. Click on "Sensors" in the left navigation menu under Scan

    image-20260616-210209.png
  4. Click Remote Scan.

    image-20260616-220921.png
  5. Click + Download Remote Sensor.

    image-20260616-221015.png
  6. Download the sensor binary for your remote machine’s operating system

    image-20260616-221050.png


  1. Unzip the Remote Sensor package. The folder isg_agilescan_<platform>_sensor contains a crowdstrike directory with the scripts and configuration files required to create the CrowdStrike workflow.

Step 2: Upload Sensor Package to CrowdStrike

  1. Log in to CrowdStrike and navigate to Host setup and management → Response scripts and files.

Screenshot 2026-01-11 at 10.52.40 PM-20260112-065353.png
  1. Select the "put" files tab and click Upload file. In the dialog, choose agilesec_sensor_windows_<version>.zip|pkg, then click Upload.

Screenshot 2026-04-13 at 4.08.37 PM.png

Step 3: Create Scripts

Create scripts to perform the following tasks:

  1. Check Sensor Zip: Check whether the Sensor Zip Exists

  2. Run the Sensor: Deploy the Sensor and execute scans

  3. Un-deploy the Sensor: Remove the Sensor

Check Sensor Zip Script

  1. On the Response scripts and files screen, select the Custom scripts tab, then click Create script.

  2. In the Create script dialog, complete the following fields:

Field

Windows

Name

kf-agilesec-check-sensor-zip-windows

Shell type

PowerShell

Script access

Users with the role of RTR Administrator

Share scripts with workflows

Enabled

Script

Copy the contents of following Remote Sensor package file.

crowdstrike\scripts\kf-agilesec-check-sensor-zip-windows.ps1

Input schema

Copy the contents of the following Remote Sensor Package file.

crowdstrike\scripts\kf-agilesec-check-sensor-input-windows.json

Output schema

Copy the contents of the following Remote Sensor Package file.

crowdstrike\scripts\kf-agilesec-check-sensor-output.json

  1. Click Create.

Crowdstrike create check sensor script

Run Sensor Script

  1. On the Response scripts and files screen, select the Custom scripts tab, then click Create script.

  2. In the Create script dialog, complete the following fields:

Field

Windows

Name

kf-agilesec-run-mssql-sensor-windows

Shell type

PowerShell

Script access

Users with the role of RTR Administrator

Share scripts with workflows

Enabled

Script

Copy the contents of following Remote Sensor package file.

crowdstrike\scripts\kf-agilesec-run-mssql-windows.ps1

Input schema

Copy the contents of the following Remote Sensor Package file.

crowdstrike\scripts\kf-agilesec-run-mssql-sensor-input.json

  1. Click Create

Crowdstrike create run sensor script

Undeploy Sensor Script

  1. On the Response scripts and files screen, select the Custom scripts tab, then click Create script.

  2. In the Create script dialog, complete the following fields:

Field

Windows

Name

kf-agilesec-undeploy-sensor-windows

Shell type

PowerShell

Script access

Users with the role of RTR Administrator

Share scripts with workflows

Enabled

Script

Copy the contents of following Remote Sensor package file.

crowdstrike\scripts\kf-agilesec-undeploy-sensor-windows.ps1

Input schema

Copy the contents of the following Remote Sensor Package file.

crowdstrike\scripts\kf-agilesec-undeploy-sensor-input-windows.json

  1. Click Create.

Crowdstrike host menu

Step 4: Create and Execute the Run Sensor Workflow

  1. Navigate to Fusion SOAR -> Workflows, then click Create workflow to open the CrowdStrike workflow builder interface. 

Crowdstrike workflow step 6.1
  1. In the Create workflow dialog, select Create workflow from scratch.

Crowdstrike workflow step 6.2
  1. In the Add trigger dialog, select Scheduled workflow and configure the execution schedule.

Crowdstrike workflow step 6.3
  1. On the workflow builder, click Action.

Crowdstrike workflow step 6.4
  1. In the Add action dialog, search for and select Device Query.

Crowdstrike workflow step 6.5
  1. In the Device Query dialog, configure fields specific to your environment to select the devices where the SQL Server Database Sensor should run. At a minimum, the following fields are recommended:

  • Device status: all

  • Host group: as defined in your environment

Crowdstrike workflow step 6.6
  1. On the workflow builder, add a Loop after Device Query.

Crowdstrike workflow step 6.7
  1. In the Start Loop dialog, enter the following and click Next:

  • Loop typeFor each

  • Loop sourceSensor IDs

  • Processing orderAt the same time/concurrently

  • Continue workflow on loop iteration failure: Enabled

Crowdstrike workflow step 6.8
  1. On the workflow builder, add an action inside the loop.

Crowdstrike workflow step 6.9
  1. In the Add action dialog, search for and select Get device details.

Crowdstrike workflow step 6.10
  1. In the Device details dialog, set Device ID to Sensor IDs instance, then click Next.

Crowdstrike workflow step 6.11
  1. On the workflow builder, add a Condition after Get device details.

image-20260105-082144.png


  1. In the Condition dialog, enter the following and click Next:

  • ParameterPlatform

  • Operatoris equal to

  • ValueWindows

Crowdstrike workflow step 6.13
  1. On the workflow builder, add an action under the TRUE branch.

Crowdstrike workflow step 6.14
  1. In the Add action dialog, search for and select the script kf-agilesec-check-sensor-zip-windows script.

Crowdstrike workflow step 6.15
  1. In the action configuration for kf-agilesec-check-sensor-zip-windows, enter the following recommended values and click Next:

  • Device IDSensor IDs instance

  • sensorDirectoryC:\Program Files\Keyfactor

  • sensorZipFilenameisg_sensor_windows_3.4.0_crowdstrike.zip

Crowdstrike workflow step 6.16
  1. On the workflow builder, add a Condition after kf-agilesec-check-sensor-zip-windows.

Crowdstrike workflow step 6.17
  1. In the Condition dialog, enter the following and click Next:

  • ParameterSensorZipExists

  • Operatoris equal to

  • ValueTrue

Crowdstrike workflow step 6.18
  1. On the workflow build, add an action under the TRUE branch.

image-20260105-025806.png
  1. In the Add action dialog, search for and select the script kf-agilesec-run-mssql-sensor-windows.

Crowdstrike workflow step 6.20
  1. In the action configuration for kf-agilesec-run-mssql-sensor-windows, enter the following recommended values for your environment:

Crowdstrike workflow step 6.21

Field

Value

Description

app

AgileSecSensor

App name used by the plugin. Leave default

Device ID

Sensor IDs instance

Device ID provided by Crowdstrike

edrId

See Prerequisites.

Used to obtain an access token from AgileSec Platform. This access token is used for authenticating with the ingestion service. See Prerequisites.

exportURL

https://:

External facing AgileSec platform URL

gMSA


Group Managed Service Account used to authenticate to SQL Server

log_level

info

Log level for sensor logs

port

1433

SQL Server port

Queue offline

true

Queues the action when the device is offline.

recreateTask

false

Recreates the Windows Task Scheduler task. Use if parameters change after first install

sensorDirectory


Sensor install directory. Set it to ${data['KfAgilesecCheckSensorZipWindows.sensorDirectory']} to use output from check sensor zip action

sensorZipPath


Path to the sensor ZIP. Set it to ${data['KfAgilesecCheckSensorZipWindows.sensorZipPath']} to use output from check sensor zip action

server

127.0.0.1

SQL Server hostname or IP address

spn

(leave empty)

Reserved for future support. Leave this value blank.

trust

true

Trust self-signed certificates

updateSensor

false

Set to true to reinstall/upgrade the sensor

  1. On the workflow builder, add an action under the ELSE branch for sensorZipExists.

Crowdstrike workflow step 6.22
  1. In the Add action dialog, search for and select Put file.

Crowdstrike workflow step 6.23
  1. In the Put file dialog, enter the following values and click Next:

  • Device IdSensor IDs instance

  • File nameisg_sensor_windows_3.4.0_crowdstrike.zip

  • Destination directory path${data['KfAgilesecCheckSensorZipWindows.sensorDirectory']}

  • Queue offlinetrue

Crowdstrike workflow step 6.24
  1. On the workflow builder, add action kf-agilesec-run-mssql-sensor-windows (same as 20) under the Put file.

Crowdstrike workflow step 6.25
  1. Configure the action kf-agilesec-run-mssql-sensor-windows using information from Step 1.21.

  2. The workflow is now complete and should resemble the following:

Crowdstrike workflow step 6.27
  1. Click Publish, then in the Publish workflow dialog click Publish workflow. When you are ready to active the workflow, toggle Status to on.

Crowdstrike workflow step 6.28

Step 5: Execute Workflow to Run Host Scan Sensor

  1. If your workflow trigger is on-demand, execute the workflow to test the sensor.

image-20251226-050411.png
  1. If your trigger is scheduled, wait for the configured interval for the sensor to run.

  2. Check the scan output data

  • A SQL server database scan is initiated on all machines included in “Device Query” action.

  • Found findings are exported to the ingestion service.

  • Users can view scan history and results within the Keyfactor web application.

image-20260105-074245.png

Step 6: Workflow To Undeploy Sensor

You may need to un-deploy the sensor to upgrade to a newer version or remove the sensor from an endpoint. The un-deployment workflow cleanly removes the deployed sensor components and associated execution artifacts so the sensor can be reinstalled or upgraded as needed.

Follow the same instructions used to create the "Run host sensor" workflow, with the following changes:

  1. In the Add trigger dialog, select On-demand instead of Scheduled.  

  2. On the true branch of the sensorZipExists condition:

    1. Windows: add action kf-agilesec-undeploy-sensor-windows

  3. In the action configuration, enter the following recommended values for your environment:

    1. Device Id: Sensor IDs instance

    2. Queue Offline: true

    3. sensorDirectory:

      • Windows: ${data['KfAgilesecCheckSensorZipWindows.sensorDirectory']}

    4. sensorZipPath:

      1. Windows: ${data['KfAgilesecCheckSensorZipWindows.sensorZipPath']}

The undeploy sensor workflow should resemble the following:

image-20260105-080724.png


Step 7: Deploy New Sensor Package

When a new version of the sensor package is released, follow these steps to deploy the update:

  1. Execute the "Un-deploy Sensor" workflow to remove the old version.

  2. Execute the "Run Host Sensor" workflow to install the new version.