CrowdStrike Endpoint Protection Zero Trust Host Containment Integration
- Overview
- Limitations
- Solution Overview
- Video Demo
- Advanced Zero Trust Capabilities
- What is CrowdStrike Endpoint Protection?
- Integration Architecture
- Solution Configuration in CrowdStrike Endpoint Protection and Defender Zero Trust
- Prerequisites
- Configuration in CrowdStrike Endpoint Protection
- Configuration Steps on Eyeglass Virtual Machine
- High Level steps
- Configuration Step by Step
- Configure the Service start and python integration files
- Configure the python packages and customize the CrowdStrike integration python code
- Configure Defender Zero Trust Webhooks
- How the Integration works with Host Containment Automaton
- How to test the Integration with CrowdStrike Endpoint Protection
- CrowdStrike Endpoint Protection SecOps administrators Integration Experience
- How to Configure Data Security Essentials
- Overview
- Requirements
- Features
- Steps to Configure Event Sync to Crowdstrike Host Containment Integration
Overview
Customers using CrowdStrike Endpoint Protection solution can now leverage a native integration that initiates native API integration to isolate hosts where flagged as compromised by Superna Security Edition. See Crowdstrike integration landing page.
-
NOTE: This documentation is provided "as is" without support for 3rd party software. The level of support for this integration guide is best effort without any SLA on response time. No 3rd party product support can be provided by Superna directly. 3rd party components require support contracts
Limitations
- None
Solution Overview
Superna Defender Zero Trust API receives webhook alerts from Security Edition and takes account against the endpoint host that is flagged in a security incident of type critical. This integration with endpoint protection helps protect the customers infrastructure from a host that could launch additional attacks on IT infrastructure.
Video Demo
Advanced Zero Trust Capabilities
- Webhook to native CrowdStrike API
- Superna Security Edition host Containment api integration with Falcon Endpoint protection
What is CrowdStrike Endpoint Protection?
Integration Architecture
Solution Configuration in CrowdStrike Endpoint Protection and Defender Zero Trust
Prerequisites
- Installed Security Edition
- Eyeglass OS appliance version 15.5
- cat /etc/os-release
- License key for the Zero Trust API
- CrowdStrike Endpoint Protection
Configuration in CrowdStrike Endpoint Protection
To generate an API token in CrowdStrike Falcon, you'll need to follow these steps.
Log in to the CrowdStrike Falcon Console:
- Open your web browser and navigate to the CrowdStrike Falcon console login page.
- Enter your credentials and log in.
Navigate to the API Clients and Keys Section:
- Once logged in, go to the “Support” section on the left-hand menu.
- Select “API Clients and Keys.”
Create a New API Client:
- Click on the “Add new API client” button.
- Fill in the necessary details for the new API client:
- Name: Provide a name for the API client.
- Description: Optionally, provide a description for the API client.
Assign Permissions:
- Select the permissions that the API client will need. This depends on the level of access required for your use case.
- Permissions can be granted for various functionalities like sensor download, device management, event streams, etc.
- Superna Zero Trust Integration requires:
- Host and asset scope with Read and Write permissions
Generate the API Key:
- After assigning the necessary permissions, click on the “Create” button.
- The API client credentials, including the Client ID and Secret, will be displayed. Make sure to copy and securely store these credentials, as they will not be shown again. Record the endpoint as well.
Once you have generated the API token (Client ID and Secret), you can use these credentials to authenticate your API requests to CrowdStrike Falcon and update the provided integration code in this guide.
Configuration Steps on Eyeglass Virtual Machine
High Level steps
- Create python location to run the application on the Eyeglass vm
- Create python main application script
- Create linux systemd service and set to auto start
- Create Zero Trust configuration in Defender
- Update the main script to customize with CrowdStrike Endpoint Protection python code
- Test the script is running as a service
- Create a test event in Defender to validate the alerts appear as indexed parsed events in CrowdStrike Endpoint Protection
Configuration Step by Step
Configure the Service start and python integration files
-
Login to eyeglass vm using ssh as the admin user to create zero trust application
- sudo -s
- mkdir -p /opt/superna/cgi-bin
- touch /opt/superna/cgi-bin/CrowdStrike.py
- touch /opt/superna/cgi-bin/CrowdStrike.sh
- chown sca:users /opt/superna/cgi-bin/CrowdStrike.*
- chmod +x /opt/superna/cgi-bin/CrowdStrike.py
- chmod +x /opt/superna/cgi-bin/CrowdStrike.sh
-
Create systemd configuration
- nano /etc/systemd/system/CrowdStrike.service
- Copy the values below and Paste these contents into the file opened in nano editor in the step above
- Save the file
- press control+x
- Answer yes to save and exit
- Restart systemd
- systemctl daemon-reload
- Set to enabled
- systemctl enable CrowdStrike
- Create CrowdStrike.sh service script
- Copy the values below
- nano /opt/superna/cgi-bin/CrowdStrike.sh
- paste the script values below into the nano editor
- Save the file
- press control+x
- Answer yes to save and exit the editor
- Once the script is created below, do not start the service at this step.
- Done
copy for bash script
Configure the python packages and customize the CrowdStrike integration python code
-
Now install required python packages for the SCA users that will run the service. NOTE this is the same user that runs the main eyeglass application code.
- su - sca
- pip3 install flask boto3 requests logging
- exit
- NOTE: you must type exit to ensure you are the root user for the remaining steps. Type whoami to make sure you are the root user.
- Customize the application code by downloading the python code from this link to download
- Open the python template file in a text editor. NOTE: make sure to only replace the values and do not delete any of the commas
- Locate this section in the file and replace the yellow sections to match your CrowdStrike api token and endpoint for API calls .
- # Your CrowdStrike API credentialsclient_id = 'xxxxxxxxx'client_secret = 'yyyyyyyyyyyy'# The API base URL for CrowdStrikebase_url = "https://api.us-2.crowdstrike.com"
-
- nano /opt/superna/cgi-bin/crowdstrike.py
- Open the file locally in Windows OS notepad and use control-A or select all the text in the python template
- Paste the clipboard into the ssh terminal session with the open nano editor file
- save the file
- press control+x
- Answer yes to save and exit the nano editor
- Start the service and verify it is running
- systemctl start CrowdStrike
- systemctl status -l CrowdStrike
- Verify the service is started successfully and returns "active and running".
- If the service does not start do not proceed and double check the steps above are completed.
Configure Defender Zero Trust Webhooks
- The next step creates an Zero Trust Webhook URL.
- Configure Zero Trust endpoint in Ransomware Defender Zero Trust tab.
- Recommended Configuration: Only Critical and Major events and only the webhooks that set lockout or delayed lockout. Customers can customize based on specific requirements. The goal is to send findings versus a list of alarms that do not pinpoint a security incident.
- The endpoint url above will use localhost and will send Webhooks to the application service listening on port 5000. URL to use in the configuration
- http://localhost:5000/webhook
- Add the Content-Type header with value of application/json as shown above to complete the webhook configuration.
- Click save to commit the configuration.
- Click save on the main Webhook configuration page
- Configure Zero Trust endpoint in Ransomware Defender Zero Trust tab.
- Test the configuration is working following the next section
How the Integration works with Host Containment Automaton
- These screenshots show what a host will look like when Security Edition contains the host from the network after a NAS security detection.
- The Actions menu can be used to change the containment status to allow the client to rejoin the network.
- Done
How to test the Integration with CrowdStrike Endpoint Protection
- To test the integration follow these steps
- Prerequisites In CrowdStrike Endpoint Protection and Eyeglass:
- install the CrowdStrike Endpoint Protection agent on a test machine. Record the ip address of this test machine.
- Get the ip address of the Eyeglass vm
- download this curl command template and open with a text editor and locate the ip address of eyeglass at the very end of text and replace the ip address with the IP address of your eyeglass vm.
- Also edit the client ip section of the curl command by searching the text clientIPs":["172.31.1.45"] and replace only the ip address with the IP of the test machine running the CrowdStrike Endpoint Protection agent.
- Edit the section below and add the client_id and client_secret with values from the Crowdstrike Console.
- # Your CrowdStrike API credentialsclient_id = 'xxxxx'client_secret = 'yyyyyy'
- Update the base url if needed.
- # The API base URL for CrowdStrikebase_url = "https://api.us-2.crowdstrike.com"
- This will now simulate a zero trust alert on this host when the curl command sends the webhook payload to the integration python code to process.
- Copy all the text in the text editor
- ssh to the eyeglass vm as the admin user
- Paste the entire cli command text to the ssh prompt to send sample data to the running Zero Trust application. This will send test data directly to the application to be processed and sent to CrowdStrike Endpoint Protection Integration service that is running on the Eyeglass VM.
- The output of a successfully processed webhook test will return this text in the ssh terminal
- done sending event to CrowdStrike and check for http 200 and success count in response
- How to review the process logs from the web application
- sudo -s
- journalctl -f -u CrowdStrike
- This allows you to view the logs generated by the application.
- To log to a file and review with nano showing only the most recent 250 lines.
- journalctl -f -n 250 -u CrowdStrike > /tmp/ztwebhook.log
- nano /tmp/CrowdStrike.log
- In the log below the response code from the CrowdStrike Endpoint Protection api call should show http 200 status code and successCount 1 to indicate the Finding was successfully created.
- You can also view CrowdStriked.log for specific error messages.
- Login to the CrowdStrike Endpoint Protection and verify new incident is raised.
- Done
CrowdStrike Endpoint Protection SecOps administrators Integration Experience
Overview: Once configured, Superna Endpoint protection integration with CrowdStrike enables real time host isolation for critical ransomware events detected at the storage layer. This ensures the compromised host cannot launch attacks on other IT infrastructure by leveraging the host api with CrowdStrikes API.
How to Configure Data Security Essentials
Overview
Data Security Essentials saves alerts to the Windows Event log to a custom application log. This integration will extract the log entries and the json payload contained within them and format as webhook data to send to Crowdstrike to issue the host containment to the endpoint provided by Crowdstrike.
Requirements
- Follow the Crowdstrike integration steps above to configure the Scripted REST API endpoint integration.
- Install python for Windows on the Data Security Essentials host and allow the installation to add python to the path variable. https://www.python.org/downloads/windows/
- NOTE: Ensure it's installed for all users so service accounts have access, by enabling for all users during installation.
- The integration code matches event log entries from Custom trigger BOT policies and File management policies
- The event log source names are below
- Superna Data Security Essentials BOT Service
- Superna Data Security Policy Engine
- The event log source names are below
Features
- Logs for each execution are stored in the path below along with the python code.
- Each execution will store the event log record ID and date time and event number of the last processed event in a file called last_processed_record.txt. This file is read on each execution to continue processing from last record. The record number is not visible in Event Viewer, the date time and event number can be used to understand where in the log the last processing occurred.
- The schedule sync runs every minute and only processes events since the last record and logs all processing as well as event matches in the log file for debugging.
- Only events that match the severity filter will be processed for client ip address. The sample code defaults to Major and Critical severity events all other severities will be ignored.
Steps to Configure Event Sync to Crowdstrike Host Containment Integration
- Download the integration code from here.
- Modify the python and update the Crowdstrike integration settings highlighted in yellow to match your environment.
- # CrowdStrike API credentialsclient_id = 'xxxxxx'client_secret = 'yyyyyyy'base_url = "https://api.us-2.crowdstrike.com"# Configurationserver = 'localhost'log_name = 'Data Security Essentials'source_names = ['Superna Data Security Essentials BOT Service', 'Superna Data Security Policy Engine']trigger_severities = ['MAJOR', 'CRITICAL','WARNING'] # Configure severities that should trigger containmentenable_isolation = True # Set to False to disable isolation actions
- Copy the Python code into C:\Program Files\Superna\cgi-bin on the Data Security Essentials host and name the file crowdstrike-dse.py
- Install python dependancies
- MANDATORY Step: Open a command prompt as the service account (hold down shift and right click the command prompt icon) run as option to login as the service account dse-service. This is required to install the python packages under the correct user account.
- Install the dependencies with this command
- pip install pywin32 requests
- This command installs the windows API python libraries needed to read the event log.
- Test the script can correctly reach your Crowdstrike instance from a dos prompt
- cd C:\Program Files\Superna\cgi-bin
- python crowdstrike-dse.py
- The output should display event log entries that match and will ignore severities that do not match script settings . It will display the event payload details in json format and will show the data that was sent to the Crowdstrike endpoint.
- Example output
- You can also review this file last_processed_record.txt to see the last date and time within the event log and event id that was last processed. This file can be deleted to have the script start reading from the oldest windows event log entry. This can be done for testing puposes.
- The above examples shows the output when a client ip address is successfully located and the host containment api returns success.
- The example below is logged when event data is processed and inspected for client ip and matching severity.
- Steps to Schedule sync alerts into Crowdstrike Security Incidents
- Open secpol.msc, Local policies
- Give the Data security essentials AD service account the "Logon as a batch job" OS permission.
- Create a file
- Right click this link to save to a file. The task scheduler XML file to import into Task Scheduler
- You can rename the xml from Servicenow alert sync.xml to Crowdstrike integration.xml.
- Open Task Scheduler
- Run taskschd.msc, right click task schedule library
- Import the xml file
- You will be prompted with the task definition, you will need to change the service account to match your service account name and domain and re-enter the password to save the task scheduler. All other settings are configured and match the path and settings used above. Adjust any parameters that you changed if you did not use all the steps above.
- Edit the name "Crowdstrike Containment integration"
- Click the Actions tab and browse to select the file C:\Program Files\Superna\cgi-bin\crowdstrike-dse.py
- Click ok to save
- done.