Cortex Xsoar Deployment Guide
Cortex Xsoar Deployment Guide
Cortex XSOAR
D E P LOY M E N T G U I D E
AUGUST 2021
Table of Contents
Table of Contents
Preface..................................................................................................................................................................... 1
Related Guides........................................................................................................................................................ 3
Other Resources.................................................................................................................................................................................... 3
Objectives............................................................................................................................................................................................... 4
Audience................................................................................................................................................................................................. 4
Preface
GUIDE TYPES
Overview guides provide high-level introductions to technologies or concepts.
Reference architecture guides provide an architectural overview for using Palo Alto Networks® technologies
to provide visibility, control, and protection to applications built in a specific environment. These guides
are required reading prior to using their companion deployment guides.
Deployment guides provide decision criteria for deployment scenarios, as well as procedures for combining
Palo Alto Networks technologies with third-party technologies in an integrated design.
DOCUMENT CONVENTIONS
Cautions warn about possible data loss, hardware damage, or compromise of security.
Blue text indicates a configuration variable for which you need to substitute the correct value for your
environment.
• Command-line commands.
• User-interface elements.
• Navigational paths.
• A value to be entered.
An external dynamic list is a file hosted on an external web server so that the firewall can import objects.
ABOUT PROCEDURES
These guides sometimes describe other companies’ products. Although steps and screen-shots were
up-to-date at the time of publication, those companies might have since changed their user interface,
processes, or requirements.
https://www.paloaltonetworks.com/referencearchitectures
Related Guides
•
Cortex XSOAR is a security orchestration, automation, and response (SOAR) solution that manages alerts,
standardizes processes, and automates responses.
The SecOps Automation and Response—Cortex XSOAR suite of guides details how to use Cortex XSOAR, from
understanding its concepts and user interface through deployment and using playbooks to implement a
structured and automated incident response.
OTHER RESOURCES
Cortex XSOAR developer hub (https://xsoar.pan.dev)—Includes documentation and reference materials
about all Cortex XSOAR components.
• Requires that you first read the SecOps Automation and Response‒Cortex XSOAR: Concepts Guide. The
reference architecture guide provides architectural guidance for using Cortex XSOAR to automate
the response to security incidents.
• Provides step-by-step details for required post-installation tasks, including integrations with
external systems.
OBJECTIVES
Completing the procedures in this guide, you can successfully deploy Cortex XSOAR on Ubuntu Linux. The
main objectives are to:
AUDIENCE
This deployment guide is for technical readers including solution architects, security engineers, and
security support staff, who want to orchestrate and automate the prevention, investigation, and response
to security threats. It assumes the reader is familiar with the basic concepts of threat prevention,
networking, and security operations, as well as possessing a basic understanding of automation, machine
learning, and analytics.
System requirements:
• Your server meets the Cortex XSOAR minimum hardware requirements for a production
environment:
• The tested Cortex XSOAR version used in this deployment guide is 6.2.0.
• Your organization has either a Cortex XSOAR or Cortex XSOAR Threat Intel Management license.
• You have installed Ubuntu from the ISO image downloaded from:
https://releases.ubuntu.com/20.04/ubuntu-20.04.2-live-server-amd64.iso
◦ A static IP address.
◦ Its hostname added to your organization’s DNS. In this guide, you use xsoar.example.com.
◦ A Python interpreter (normally installed as part of the default Ubuntu installation process).
Procedures
Step 1: Download the Cortex XSOAR installer. You should have an email from Cortex Customer Success
Bot (cortex-cs-bot@paloaltonetworks.com) that includes a specific download link for your organization.
If you do not have a Cortex XSOAR license, you can request download access to the Cortex XSOAR
Community Edition by filling out the request form at https://start.paloaltonetworks.com/sign-up-for-
community-edition.html.
Step 2: After you obtain the Cortex XSOAR installer file, place it in the /tmp directory on the Ubuntu
server.
bash-3.2$ scp demistoserver-6.2-1321594.sh xsoar_admin@xsoar.example.com:/tmp/
xsoar_admin@xsoar.example.com’s password:
demistoserver-6.2-1321594.sh 100% 854MB 112.7MB/s 00:07
Step 3: From the /tmp directory on the Ubuntu server, enable execute permissions for the Cortex XSOAR
installer script.
xsoar_admin@xsoar:/tmp$ chmod +x demistoserver-6.2-1321594.sh
Step 4: The Cortex XSOAR installer script must have execute permissions. Verify permissions by
examining the output of the ls -l command. You should see an “x” in the permissions flags.
xsoar_admin@xsoar:/tmp$ ls -l
-rwxrwxr-x 1 xsoar_admin xsoar_admin 895587706 Jul 21 16:05
demistoserver-6.2-1321594.sh
Step 5: Run the Cortex XSOAR installer script. If prompted, enter your password. The Cortex XSOAR
server version appears. In this example, the version is 6.2.0.
xsoar_admin@xsoar:/tmp$ sudo ./demistoserver-6.2-1321594.sh
[sudo] password for xsoar_admin:
Verifying archive integrity... All good.
Uncompressing Cortex XSOAR Server Version 6.2-1321594 (6.2.0) 100%
Log file: /tmp/demisto_install.log
The product is subject to the Palo Alto Networks End User License Agreement.
Link: www.paloaltonetworks.com/legal/eula
eula (END)
Step 6: Press the q key to exit the End User License Agreement (EULA) screen.
The console shows various packages being installed and then prompts you for configuration input.
Step 9: Press ENTER. This accepts the default answer of no to using an elasticsearch database.
Is Cortex XSOAR connecting to an elasticsearch database? [yes no] (default: 'no')
Step 11: Enter a password for the admin user, and if the configuration settings are correct, enter yes.
Enter password for user ‘admin’: **********
Verify password: **********
Server (Secure) Web Port: 443.
Admin user name: `admin`
Are these configurations correct? [yes no] yes
The installer shows the status of pulling various Docker images and updating Git.
Step 12: When installation is complete, you are prompted to start the Cortex XSOAR server. When
prompted to start the server, enter yes.
Start the server? [yes no] yes
Step 13: Verify that the Cortex XSOAR server starts and that the installation finishes successfully.
Enabling Cortex XSOAR service...
Cortex XSOAR service enabled successfully.
Starting Cortex XSOAR server... Cortex XSOAR server started at
https://10.48.54.23:443 https://172.17.0.1:443
Finished Successfully.
This procedure assumes you have received an entitlement email from Cortex Customer Success Bot
(cortex-cs-bot@paloaltonetworks.com) and have saved the attached license file locally on your computer
(example: DemistoLicense12345abc67.lic).
Step 1: Log into the Cortex XSOAR portal (example: https://xsoar.example.com) with username admin
and the password you created in Procedure 1.1.
Note
When you log in for the first time, the Missing License window appears.
Step 3: In the Missing License window, click Drop license file here.
Note
The Cortex XSOAR license applies when you upload the license file; however,
there are no confirmation or status messages.
Step 5: To verify you successfully applied the license to Cortex XSOAR, in your browser, go to https://
xsoar.example.com/#/settings/license and ensure that the customer name and license expiration date are
correct.
Palo Alto Networks and their partners periodically update content packs with new features and fixes. In
this procedure, you update the content packs that come pre-installed with Cortex XSOAR. You should
periodically apply available updates for any installed content packs.
Step 3: On the Installed Content Packs tab, click the drop-down link next to Show, and then choose
Update available.
The Content Packs Library pane shows the content packs for which an update is available. You can click a
content pack name in order to view its details, such as its dependencies and version history.
Step 4: Select all content packs in the list by clicking Sort by ABC, and then click Update.
Procedures
End users are provided a URL so that they can enter input through their web browser. This requires that
you configure a fully qualified domain name (FQDN) in the Cortex XSOAR settings.
This procedure assumes a FQDN has been created for your Cortex XSOAR server and added to your
organization’s DNS server.
Step 3: In Settings > About > Troubleshooting, in the External Host Name box, enter the FQDN for your
Cortex XSOAR deployment (example: xsoar.example.com), and then click Save.
The Cortex XSOAR installation process automatically installs a self-signed SSL certificate. To increase
security, you should install a trusted SSL certificate from your organization. In this procedure, you install
a trusted SSL certificate on the Cortex XSOAR server and require two files. The first file is composed of the
full certificate chain, with the server certificate at the top followed by any intermediate certificates. The
second file is the server private key file.
This procedure assumes you have a valid server certificate and private key file.
Step 1: Use secure copy protocol (SCP) to transfer the trusted certificate and key files to the /tmp directory
on the Cortex XSOAR server.
bash-3.2$ scp fullchain.pem xsoar_admin@xsoar.example.com:/tmp/fullchain.pem
xsoar_admin@xsoar.example.com’s password:
fullchain.pem 100% 3578 62.0KB/s 00:00
bash-3.2$ scp privkey.pem xsoar_admin@xsoar.example.com:/tmp/privkey.pem
xsoar_admin@xsoar.example.com’s password:
privkey.pem 100% 1708 34.0KB/s 00:00
Step 2: Back up the self-signed server certificate and private key files to xsoar_admin’s home directory.
xsoar_admin@xsoar:~$ sudo cp /usr/local/demisto/cert.pem ~/self_signed_cert.pem
xsoar_admin@xsoar:~$ sudo cp /usr/local/demisto/cert.key ~/self_signed_key.key
Step 3: Copy the trusted certificate file from the /tmp directory, using sudo to overwrite the current
self-signed server certificate file.
xsoar_admin@xsoar:~$ sudo cp /tmp/fullchain.pem /usr/local/demisto/cert.pem
Step 4: Copy the trusted private key file from the /tmp directory, using sudo to overwrite the current
self-signed server key file.
xsoar_admin@xsoar:~$ sudo cp /tmp/privkey.pem /usr/local/demisto/cert.key
Step 6: Verify that the certificates have taken effect. When you log on to the portal (example: https://
xsoar.example.com), you should no longer see the certificate error message.
This procedure installs the EWS Mail Sender content pack. This pack enables Cortex XSOAR to send email
messages.
Step 3: On the Browse tab, in the Search in list, choose Content Packs.
Step 6: On the Marketplace > EWS Mail Sender content pack page, click Install.
Step 8: After Cortex XSOAR successfully installs the content pack, click Refresh content.
In this procedure, you create an instance of the EWS Mail Sender integration. This integration is required
for Cortex XSOAR to send and receive email. These emails are typically for sending notifications or
requesting task input.
This procedure assumes you have access to an Exchange Web Services (EWS) instance and an active email
account.
Step 3: In Integrations > Servers & Services, in the Search integration box, enter EWS Mail Sender.
Note
If you do not see an entry for EWS Mail Sender, click the refresh button to force
your web browser to update the page.
Step 7: In the Authentication: Email address (for Office 365) box, enter xsoar@example.com.
Step 11: In the Sender Mailbox box, enter xsoar@example.com, and then click Test.
Step 12: Verify that you receive a Success message, and then click Save & exit.
If you use multiple integrations that provide access to external email systems, you must specify which
integration instance the system should use to send email notifications.
Step 3: In About > Troubleshooting> Server Configuration, click Add Server Configuration.
Step 5: In the Value box, enter EWS Mail Sender, and then click Save.
Cortex XSOAR uses role-based access control (RBAC) for controlling access. You should create accounts
for each of the users that access Cortex XSOAR, allowing only the access necessary to fulfill their duties.
Cortex XSOAR uses roles to group access permissions applied to each user. In this procedure you create a
user named Brian assigned to the analyst role.
As a Cortex XSOAR administrator, you create a new user by generating an invitation. Cortex XSOAR emails
an invitation to the user and prompts the user to input a password.
Note
If you do not have Cortex XSOAR configured to send email, you can
alternatively access the invitation link from the Settings > Users and Roles >
Invites screen. You can then copy the link and deliver it to the end user
through another mechanism.
Example user-specific invitation link:
https://xsoar.example.com/invite/3e6495b6-f25f-4151-8485-40f9b0104d9a/
access
Step 4: In the Invite User dialog box, in the Email box, enter the user’s email address (example: brian@
example.com).
Step 5: In the Roles list, select the role you want to assign this user (example: Analyst).
Step 6: Click the Invite button. XSOAR emails an invitation to the user.
When the user clicks the Join Now link in the email and selects a password, the account is created.
3.4 Create the “Is the Hostname the Same as the IP Address?” Task
This playbook uses automation to determine if Cortex XSOAR can resolve a hostname from an IP address.
The purpose of this playbook is to provide a working example that includes a variety of task types and
does not require any integrations to external systems.
In this procedure, you create a playbook. Later, in Procedure 4.1 and Procedure 4.4, this guide provides
two options to run the playbook.
Step 3: In the New Playbook dialog box, in the Playbook name box, enter Resolve IP to Hostname, and
then click the Save button. A playbook workspace with a Playbook Triggered section-header task appears.
Note
Step 4: If the Task Library dialog box obscures your view of the playbook workspace, then click x to close
the dialog box.
To gather analyst input for your playbook, you use a data collection task. When you create the task,
you configure a survey with one or more questions. By default, data collection tasks use all configured
communication methods (example: email or slack) to communicate with the Cortex XSOAR user that you
specify. In this example, you configure the task to communicate with the Cortex XSOAR user through the
workplan.
In this procedure, you do not perform any checks to ensure that the response is a valid IPv4 address. As a
best practice, in a production playbook you should include input validation.
After you have run this data collection task, Cortex XSOAR adds Cortex XSOAR Data Collection context data
to the incident.
Step 1: Hover over the Playbook Triggered section-header task egress node. When the hand changes to a
crosshair, click-and-drag the task connector line to the playbook workspace, and then release to create an
Untitled Task below. The Edit Task dialog box appears.
Step 5: In the dialog box, clear Email, and then click Done.
Step 7: On the Questions tab, in the Web Survey Title box, enter Cortex XSOAR Data Collection.
Step 8: In the Short Description box, enter Cortex XSOAR investigates whether an IP address you provide
can be resolved to a hostname.
Step 9: In the Question box, enter What is an IP address that you want to resolve to a hostname?
Step 11: In the Placeholder box, enter 1.1.1.1, and then click OK.
In this procedure, you configure an automation task to perform an IP address to hostname resolution.
This task uses the IPToHost automation script, which uses the Cortex XSOAR Data Collection.Answers
context data as an input.
This automation script does not require any integrations to external systems.
After you have run this automation script, Cortex XSOAR adds Endpoint context data to the incident. If the
hostname resolution is successful, Cortex XSOAR sets the Endpoint.Hostname value to the hostname.
Step 1: From the Get the IP address task egress node, drag the task connector line to the playbook
workspace, and then release to create an untitled task below. The Edit Task dialog box appears.
Step 3: In the Choose Automation section, click the down arrow. The search dialog box opens.
Step 4: In the search box, enter IPToHost and then choose IPToHost. The task fields update.
Step 5: In the ip box, click the {} button. The Select Source for IP dialog box appears.
Step 7: In the Cortex XSOAR Data Collection.Answers section, click 0, and then click Close.
Step 8: Verify that the ip box is now correctly populated with ${Cortex XSOAR Data Collection.
Answers.0}, and then click OK.
3.4 Create the “Is the Hostname the Same as the IP Address?” Task
In this procedure, you perform a check to see if the IP address to hostname resolution that Cortex XSOAR
performed in Procedure 3.3 was successful. Your playbook executes different branches depending on the
results of the check.
If the hostname resolution failed, then Cortex XSOAR sets the Endpoint.Hostname context data value
to be the same as the original IP address that you provided as a task input. If the hostname resolution
succeeded, then Cortex XSOAR sets the Endpoint.Hostname context data value to be the resolved hostname.
In both cases, Cortex XSOAR also sets the Endpoint.IP context data value to be the same as the original IP
address that you provided as input.
To perform the check, you need to create a conditional statement that compares the Endpoint.Hostname
context data value with the Endpoint.IP context data value. If the values are the same, then the hostname
resolution has failed.
Step 1: From the IP to hostname lookup task egress node, drag the task connector line to the playbook
workspace, and then release to create an untitled task below. The Edit Task dialog box appears.
Step 3: In the Task Name box, enter Is the hostname the same as the IP address?
Step 4: In the left-side box, click the {} button. The Select Source For dialog box appears.
Step 6: In the Endpoint section, click Hostname, and then click Close.
Step 7: Under the right-side box, click As value, and then choose From previous tasks.
Step 8: In the right-side box, click the {} button. The Select Source For dialog box appears.
Step 10: In the Endpoint section, click IP, and then click Close.
Step 11: Verify that the conditional statement now compares Endpoint.Hostname and Endpoint.IP, and
then click the check.
This is the first procedure of a new branch of the playbook. The playbook selects this branch only if the IP
to hostname resolution failed, as determined by Procedure 3.4.
This task uses the Print automation script. You configure advanced settings for this task to mark the
results as an incident note.
Step 1: From the Is the hostname the same as the IP address? task egress node, drag the task connector
line to the playbook workspace, and then release to create an untitled task below and to the left.
Step 2: In the Choose Label Name for Condition dialog box, select yes.
Step 4: In the Task Name box, enter Mark as note - name resolution failed.
Step 5: In the Choose Automation section, click the down arrow to open the search dialog box.
Step 6: In the search box, enter Print, and then choose Print. The task fields update.
Step 7: In the value box, enter The IP address ${Endpoint.IP} failed to resolve to a hostname..
Step 8: On the Advanced tab, select Mark results as note, and then click OK.
This is the first procedure of a new branch of the playbook. The playbook selects this branch only if the IP
to hostname resolution succeeded, as determined by Procedure 3.4.
This task uses the Print automation script. You configure advanced settings for this task to mark the
results as an incident note.
You include Endpoint.IP and Endpoint.Hostname context data as an input for this task.
Step 1: From the Is the hostname the same as the IP address? task egress node, drag the task connector
line to the playbook workspace, and then release to create an untitled task below and to the right.
Step 2: In the Choose Label Name for Condition dialog box, select Mark as 'else' case.
Step 4: In the Task Name box, enter Mark as note - name resolution successful.
Step 5: In the Choose Automation section, click the down arrow to open the search dialog box.
Step 6: In the search box, enter Print, and then choose Print. The task fields update.
Step 7: In the value box, enter The IP address ${Endpoint.IP} successfully resolved to hostname
${Endpoint.Hostname}.
Step 8: On the Advanced tab, select Mark results as note, and then click OK.
As a best practice, you should create a Done section-header task that ends the playbook.
Step 1: From the Mark as note - name resolution failed task egress node, drag the task connector line to
the playbook workspace, and then release to create an untitled blank task below and to the center.
Step 3: In the Task Name box, enter Done, and then click OK.
Step 4: From the Mark as note - name resolution successful task egress node, drag the task connector
line to the Done section-header task ingress node to create an additional connection to the Done task.
Procedures
4.2 Review Playbook Execution Information in the Cortex XSOAR Playbook Debugger Panel
• Cortex XSOAR playbook debugger—The playbook debugger enables you to run and troubleshoot
playbooks right from the playbook workspace, providing visibility into task execution and control
over test data.
• Cortex XSOAR incident—You can fully validate all aspects of your playbook by creating a Cortex
XSOAR incident.
While developing your playbook, you typically use the Cortex XSOAR playbook debugger for testing. Later,
to validate a finished playbook, you create a test incident to complete the testing.
The Cortex XSOAR playbook debugger uses test data to execute a playbook. By default, the debugger runs
using an empty mock data incident that will be used to test the Resolve IP to Hostname playbook. For
more complicated playbooks, you can configure the playbook debugger to use playground or incident data.
Note
Step 5: Click the Get the IP address task. The Task Details dialog box appears.
Step 6: In the What is an IP address that you want to resolve to a hostname? box, enter an IP address
(example: 192.168.5.6), and then click Submit Answers.
The dialog box closes, and Cortex XSOAR resumes playbook execution.
In the Cortex XSOAR playbook debugger panel, you can view input, output, and results in real time for a
playbook run-through.
Step 2: To expand the Cortex XSOAR Debugger Panel context data, click the Cortex XSOAR Data Collection
row.
Step 3: To expand the Endpoint context data, click the Endpoint row.
Step 4: To search for a keyword in the context data, in the search box, enter the keyword (example:
Hostname), and then press ENTER.
The Context Data Explorer search is case sensitive and highlights any matches in the context data. The
search also expands any rows in the context data that contain case-insensitive matches but does not
highlight them.
Step 5: Verify that all playbook tasks completed execution without errors. Successful tasks display a green
check. Tasks with errors display a red caution symbol.
By default, the playbook debugger does not keep context data between playbook runs, which simplifies
testing of task changes.
Step 1: If the Stop button is displayed, click it to ensure that the current debug session is ended.
After you have completed the development of your playbook, you run it within an incident. In this
example, you manually assign the playbook after you create a new incident.
Step 3: On the New Incident dialog box, in the Name box, enter a descriptive incident name (example:
Test example playbook).
Step 5: In the search box, enter Resolve IP to Hostname, and then choose Resolve IP to Hostname.
Cortex XSOAR creates the new incident and immediately begins running the playbook.
Step 7: To access the incident information, in the ID column, click the incident ID number (example: #1).
Step 9: Click the Get the IP address task. The Task Details dialog box appears.
Step 10: In the What is an IP address that you want to resolve to a hostname? box, enter an IP address
(example: 8.8.4.4), and then click Submit Answers.
The dialog box closes, and Cortex XSOAR resumes playbook execution.
At any time while your playbook is running, or after the playbook has completed running, you can view
the context data for the incident or review task results in the War Room.
Step 1: On the War Room tab or the Work Plan tab, click the menu, and then choose Context Data.
Step 2: To expand the Cortex XSOAR Data Collection context data, click the Cortex XSOAR Data Collection
row.
Step 3: To expand the Endpoint context data, click the Endpoint row.
Step 4: To search for a keyword in the context data, in the search box, enter the keyword (example:
Hostname), and then press ENTER.
The Context Data Explorer search is case-sensitive and highlights any matches in the context data. The
search also expands any rows in the context data that contain case-insensitive matches but does not
highlight them.
Step 5: On the workplan tab, verify that all playbook tasks completed execution without errors. Successful
tasks display a green check. Tasks with errors display a red caution symbol.
Step 6: On the War Room tab, review task results. The war room provides a complete record of all
activities related to the incident.
In the war room, you can filter for specific task results, such as when the playbook creates notes.
Step 7: Click the icon, and in the Actions column, select Notes. Cortex XSOAR applies the filter.
Step 8: To close the filter dialog box, click the icon. You can now review the filtered task results.
The war room provides a chronological journal of all activities related to the incident. To ensure integrity,
there is no method for removing entries. When re-running your playbook, Cortex XSOAR appends all task
information to the war room.
If you want to re-run your playbook, you should delete the context data.
Note
Each time you run a playbook, Cortex XSOAR adds new context data to the
existing context data. Unless you configure your playbook tasks to properly
parse context data, such as arrays, playbook tasks could fail when you re-run
them.
Step 1: Clear the context data before you re-run your playbook. In the Cortex XSOAR CLI, enter:
!DeleteContext all=yes
Step 2: To re-run your playbook, on the Work Plan tab, click Run again.
Step 3: On the Change playbook dialog box, click Yes I know what I am doing. Cortex XSOAR immediately
begins running the playbook again.
Continue interacting with your playbook as you did in the previous sections.
© 2021 Palo Alto Networks, Inc. Palo Alto Networks is a registered trademark of Palo Alto Networks. A list of our
trademarks can be found at http://www.paloaltonetworks.com/company/trademarks.html. All other marks mentioned
herein may be trademarks of their respective companies. Palo Alto Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
B-000240P-1-21b