Microsoft Defender XDR Integration Cyberstorage Threat Detection and XDR Automated Investigation
- Overview
- Support Statement
- Limitations
- Solution Overview
- Advanced Zero Trust Capabilities
- What is Microsoft Defender XDR?
- Integration Architecture
- Solution Configuration in Microsoft Defender XDR and Defender Zero Trust
- Prerequisites
- Configuration in Microsoft Defender XDR
- 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 msxdr integration python code
- Configure Defender Zero Trust Webhooks
- How to test the Integration with Microsoft Defender XDR
- Microsoft Defender XDR SecOps administrators Integration Experience
Overview
Customers using Microsoft Defender XDR endpoint protection solution can now leverage a native integration that initiate an automated alert and investigation against a host detected as infected by Security Editions zero trust alert API. Customers can augment the capabilities of Microsoft Defender XDR with threat intelligence and Cyber Storage capabilities of Superna Security Edition.
Support Statement
-
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
- Superna Security Edition and Zero Trust integration only supports client machines registered with the XDR on boarding process that contain the same ip address information used when connecting to support storage platforms. The matching of the threat source ip address must match an on boarded and licensed Defender XDR endpoint protection host in the XDR portal.
Solution Overview
Superna Defender Zero Trust API receive webhook alerts, parses the key information from the alert and initiates API calls to Defender XDR to match the infected host to a host registered with Defender Endpoint protection portal. Once the host mapping has been validated an automated investigation alert is created with all the Zero trusts threat information included in the alert in the XDR portal. The type and threat level is set to high.
Advanced Zero Trust Capabilities
- Host Isolation - This optional feature allows an inbound Zero trust alert that contains user lockout status will also trigger a machine isolation to ensure this host can not continue to attack other systems within the IT infrastructure
- In order to enable this function locate the settings section in the python code provided below and change the global variable to true from false
- host_isolation = 'true'
- In order to enable this function locate the settings section in the python code provided below and change the global variable to true from false
What is Microsoft Defender XDR?
A SaaS offering that offers an enterprise endpoint security platform designed to help enterprise networks prevent, detect, investigate, and respond to advanced threats and includes 3rd party integrations to provide additional threat intelligence to augment the detection vectors available to protect hosts and customer data.
Integration Architecture
Solution Configuration in Microsoft Defender XDR and Defender Zero Trust
Prerequisites
- Installed Ransomware Defender and or Easy Auditor or Defender for AWS
- Eyeglass OS appliance version 15.5
- cat /etc/os-release
- License key for the Zero Trust API
- Microsoft Defender XDR
- client token
- client secret
- tenant token
- Microsoft Azure application definition with correct scope and permissions to Graph Security and Defender API's
Configuration in Microsoft Defender XDR
- You will need to register an application in Azure with API permissions to access Defender Endpoint and XDR API's.
- Follow this guide to create the application and add API permissions. This process will create the Authentication values need for the integration script to authenticate using oAuth 2.0.
- Azure Defender XDR integration application guide.
- See Example screenshots below. The minimum permission needed for the integration are shown below in the 2nd screenshot. You can find the WindowsDefenderATP application permissions in the my API's or the all application list.
- Record the tenant, client id and secret values once the steps are completed.
- Done
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 Microsoft Defender XDR 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 Microsoft Defender XDR
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/msxdr.py
- touch /opt/superna/cgi-bin/msxdr.sh
- sca:users /opt/superna/cgi-bin/msxdr.*
- chmod +x /opt/superna/cgi-bin/msxdr.py
- chmod +x /opt/superna/cgi-bin/msxdr.sh
-
Create systemd configuration
- nano /etc/systemd/system/msxdr.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 msxdr
- Create msxdr.sh service script
- Copy the values below
- nano /opt/superna/cgi-bin/msxdr.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 msxdr 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. NOTE: This installs flask library for webhook support in python, boto3 for API support with AWS and gunicorn a multi threaded web server to run and execute the python application.
- su - sca
- pip3 install flask
- pip3 install boto3
- pip3 install requests
- 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 with the values created above in the XDR authentication configuration section.
- # Tenant ID, Client ID, and Client Secret
- tenant_id = "xxxxxxxxx"
- client_id = "yyyyyyy"
- client_secret = "zzzzzzzzzz"
- nano /opt/superna/cgi-bin/msxdr.py
- Open the file locally in Windows OS notepad and use control-A or select all the text.
- 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 msxdr
- systemctl status -l msxdr
- 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/defenderxdr
- 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 to test the Integration with Microsoft Defender XDR
- To test the integration follow these steps
- download this curl command template and open with a text editor
- Copy all the text
- ssh to the eyeglass vm as the admin user
- paste the entire cli command 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 Microsoft Defender XDR.
- The output of a successfully processed webhook test will return this text in the ssh terminal
- done sending event to msxdr 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 msxdr
- 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 msxdr > /tmp/ztwebhook.log
- nano /tmp/msxdr.log
- In the log below the response code from the Microsoft Defender XDR api call should show http 200 status code and successCount 1 to indicate the Finding was successfully created.
- You can also view msxdrd.log for specific error messages.
- Login to the Microsoft Defender XDR Main Dashboard and view the Alerts tab to view the investigation against the infected host computer detected by Superna Security Edition Zero Trust API integration.
- Done
Microsoft Defender XDR SecOps administrators Integration Experience
- Once the integration has been tested, machine automated investigation alerts can be viewed from the alerts Dashboard.
- The investigation steps and assigning to a Secops analyst and login to Security Edition to view details of the incident.
- Advanced Host Isolation if enabled will update the incident to indicate Host Isolation has been initiated.
- When the host has been remediated and is authorized to re-join the network Microsoft Defender endpoint XDR can release the host isolation command.