This guide will walk you through the steps to manually deploy the Falcon Integration Gateway on an AWS EC2 instance as a Python application.
- Falcon API Credentials with the following API scopes:
- Event streams: [Read]
- Hosts: [Read]
- Have appropriate AWS permissions to:
- Create EC2 instances
- Create IAM roles/policies
- Access Security Hub
graph LR
A[CrowdStrike Cloud] -->|Events| B[FIG]
B -->|Findings| C[AWS Security Hub]
D[EC2 Instances] -->|Metadata| B
Note
Currently, this backend only supports sending detection events that originate from AWS to Security Hub.
Before deploying the FIG, you must enable the CrowdStrike Falcon partner integration in AWS Security Hub. Without this, the FIG will receive AccessDeniedException errors when attempting to import findings.
- Navigate to the Security Hub console in your target region
- Click the Integrations link in the left navigation
- Search for CrowdStrike
- Find CrowdStrike: CrowdStrike Falcon
- Click Accept findings
Note
This is a one-time setup per region. If you are deploying the FIG across multiple regions, you must enable the integration in each region.
This will be used to grant the EC2 instance access to the Security Hub and EC2 API's.
❗ If you already have an instance profile that you would like to use, just ensure the role has the appropriate permissions and skip to step 3.
-
Navigate to the IAM Policies page
-
Click the Create policy button
-
Select the JSON tab
-
Paste the following policy into the editor:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:DescribeInstances", "ec2:DescribeRegions", "securityhub:GetFindings" ], "Resource": "*" }, { "Effect": "Allow", "Action": "securityhub:BatchImportFindings", "Resource": "arn:aws:securityhub:*:*:product/crowdstrike/crowdstrike-falcon" } ] } -
Click the Next button
-
Give it a name (e.g.
FIG-SecurityHub-Access-Policy) and click the Create policy button
- Navigate to the IAM Roles page
- Click the Create role button
- Select AWS service as the trusted entity
- Select EC2 as the service/use-case that will use this role
- Click the Next button
- Search for the policy you created in the previous step (e.g.
FIG-SecurityHub-Access-Policy) and select it - Click the Next button
- Give it a name (e.g.
FIG-SecurityHub-Access-Role) and click the Create role button
This step is completely up to you. You can use the AWS console, CLI, or any other method you prefer to create an EC2 instance. Just make sure you select the instance profile you created in the previous step and that you have access to the instance via SSH.
For the purposes of this guide, we will be using the latest Amazon Linux 2023 AMI.
If you have an existing instance that you would like to use, just ensure the instance has instance profile you created in the previous step and skip to step 4.
- Navigate to the EC2 Instances page
- Click the Launch Instance button
- Fill out the instance details as you see fit
- Under Advanced details
- Select the instance profile you created in the previous step
- Click the Launch instance button
Connect to your EC2 instance via SSH and follow the steps below to install the FIG.
| Method | Pros | Cons | Best For |
|---|---|---|---|
| Python Package | • Simple installation • Automatic updates • Dependency management |
• Less customization | Most users |
| Git Repository | • Full source access • Maximum customization • Development features |
• Manual updates • Manual dependency management |
Developers |
Python Package (Recommended)
- Python 3.6 <= 3.11
- pip
sudo dnf install python3 python3-pip python3-develUse the package manager for your distro to ensure these packages are installed.
Install the package:
python3 -m pip install 'falcon-integration-gateway>3.2.5'There are two different ways that you can configure the FIG to use the AWS backend.
You can either use the config.ini file or you can use environment variables.
Refer to the configuration options available to the application and backend.
[!NOTE] Instance existence confirmation can be disabled using the
confirm_instanceconfig.ini in the[aws]section or by setting theAWS_CONFIRM_INSTANCEenvironment variable. This option is available for scenarios where the account that is running the service application does not have access to the AWS account where the instance with the detection resides.
Create the config.ini file and set the following minimum values:
[main]
backends = AWS
[events]
severity_threshold = 3
[falcon]
cloud_region = <Falcon Cloud Region>
client_id = <Falcon Client ID>
client_secret = <Falcon Client Secret>
application_id = <EXAMPLE-SECHUB-APPID>
[aws]
region = <AWS Region>Alternatively, if you would like to use environment variables, set the following minimum environment variables:
export FIG_BACKENDS=AWS
export EVENTS_SEVERITY_THRESHOLD=3
export FALCON_CLOUD_REGION=<Falcon Cloud Region>
export FALCON_CLIENT_ID=<Falcon Client ID>
export FALCON_CLIENT_SECRET=<Falcon Client Secret>
export FALCON_APPLICATION_ID=<EXAMPLE-SECHUB-APPID>
export AWS_REGION=<AWS Region>Git Repository
- Python 3.6+
- pip
- git
sudo dnf install python3 python3-pip python3-devel gitUse the package manager for your distro to ensure these packages are installed.
-
Clone the repository
git clone https://github.com/CrowdStrike/falcon-integration-gateway.git
-
Change to the FIG directory
cd falcon-integration-gateway -
Install the python dependencies.
pip install -r requirements.txt
There are two different ways that you can configure the FIG to use the AWS backend.
You can either use the config/config.ini file or you can use environment variables.
Refer to the configuration options available to the application and backend.
[!NOTE] Instance existence confirmation can be disabled using the
confirm_instanceconfig.ini in the[aws]section or by setting theAWS_CONFIRM_INSTANCEenvironment variable. This option is available for scenarios where the account that is running the service application does not have access to the AWS account where the instance with the detection resides.
-
Modify the
config/config.inifile and set the following minimum values:[main] backends = AWS [events] severity_threshold = 3 [falcon] cloud_region = <Falcon Cloud Region> client_id = <Falcon Client ID> client_secret = <Falcon Client Secret> application_id = <EXAMPLE-SECHUB-APPID> [aws] region = <AWS Region>
-
Set the following minimum environment variables:
export FIG_BACKENDS=AWS export EVENTS_SEVERITY_THRESHOLD=3 export FALCON_CLOUD_REGION=<Falcon Cloud Region> export FALCON_CLIENT_ID=<Falcon Client ID> export FALCON_CLIENT_SECRET=<Falcon Client Secret> export FALCON_APPLICATION_ID=<EXAMPLE-SECHUB-APPID> export AWS_REGION=<AWS Region>
Run the following to start the FIG:
python3 -m figVerify output
2023-10-18 16:45:43 fig MainThread INFO Starting Falcon Integration Gateway 3.2.1
2023-10-18 16:45:43 fig MainThread INFO AWS Backend is enabled.
2023-10-18 16:45:43 fig MainThread INFO Enabled backends will only process events with types: {'DetectionSummaryEvent'}
2023-10-18 16:45:44 fig cs_stream INFO Opening Streaming Connection
2023-10-18 16:45:44 fig cs_stream INFO Established Streaming Connection: 200 OK
...
...As events are processed by the FIG, they will be sent to Security Hub. You can verify this by following the steps below.
- Navigate to the Security Hub page
- Click the Findings tab
- Add a filter for Product name and enter CrowdStrike Falcon
To get additional logging verbosity, you can set the logging level to DEBUG by modifying either the config.ini or setting an environment variable.
Modify the config.ini:
[logging]
level = DEBUGAlternatively, set the environment variable:
export LOG_LEVEL=DEBUGIf you see an error like the following:
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the BatchImportFindings operation
This typically means the CrowdStrike Falcon partner integration has not been enabled in Security Hub. Verify that you have completed Step 1 in the target region. If you are deploying across multiple regions, the integration must be enabled in each region separately.