https://github.com/crowdstrike/aws-elastic-beanstalk-integration
A repo with steps and examples of how to deploy the Falcon sensor in AWS Elastic Beanstalk
https://github.com/crowdstrike/aws-elastic-beanstalk-integration
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords from Contributors
Repository
A repo with steps and examples of how to deploy the Falcon sensor in AWS Elastic Beanstalk
Basic Info
- Host: GitHub
- Owner: CrowdStrike
- Language: Shell
- Default Branch: main
- Size: 27.3 KB
Statistics
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
[!CAUTION] This repository is deprecated. Please go to https://github.com/CrowdStrike/Cloud-AWS/tree/main/beanstalk to see the latest supported version.
CrowdStrike Falcon Elastic Beanstalk Deployment
This repository contains a sample AWS Elasticbeanstalk application to help illustrate how to deploy the Falcon sensor on your Elastic Beanstalk compute resources.
The recommended way is to use use an ebextension to deploy the Falcon sensor, but there are two other methods described at the bottom of this readme you can also utilize.
Table of Contents
- ebextensions (Recommended)
- Deploying the Example Application
- Prerequisites
- Deployment Steps
- Step 1: Store Falcon Credentials
- Step 2: Create a Key-Pair
- Step 3: Create an Instance Profile
- Step 4: Create Elastic Beanstalk Environment
- Step 5: Package the Sample Application
- Step 6: Deploy the Sample Application
- Step 7: Verify the Application Deployment
- Step 8: Verify the Falcon Sensor Installation
- Other Deployment Options
ebextensions (Recommended)
Configuration
First, add the Falcon client id and secret to Secrets Manager.
Create a
scriptsfolder. In the script folder, create the following file.
scripts/install_falcon.sh
```bash
!/bin/bash
export FALCONCLIENTID="$(aws secretsmanager get-secret-value --secret-id "$SECRETID" --query SecretString --output text | jq -r .FALCONCLIENTID)" export FALCONCLIENTSECRET="$(aws secretsmanager get-secret-value --secret-id "$SECRETID" --query SecretString --output text | jq -r .FALCONCLIENTSECRET)"
curl -L https://raw.githubusercontent.com/crowdstrike/falcon-scripts/v1.7.1/bash/install/falcon-linux-install.sh | bash
```
[!NOTE] This script retrieves the Falcon credentials from secrets manager, and installs the sensor using the linux script from the falcon-scripts repository.
- Create a
.ebextensionsdirectory in the root of the application package. Within this folder, create the following files.
.ebextensions/secrets_manager.config
option_settings:
aws:elasticbeanstalk:application:environment:
SECRET_ID: <secret name>
[!TIP] Remember to change <secret name> to your actual secret name
[!NOTE] This config will ensure the secret name is exported as an environment variable.
.ebextensions/falcon.config
container_commands:
01_falcon:
command: "sh scripts/install_falcon.sh"
[!NOTE] This config will execute the falcon install script we previously created at runtime.
Deploying the example application
Prerequisites
- Have a current CrowdStrike Subscription
- Have appropriate AWS permissions to run CloudFormation and create resources
- Generate Falcon API credentials (Client ID and Client Secret)
- Ensure you have the aws-elasticbeanstalk-service-role deployed in your AWS account
Deployment steps
Step 1: Store Falcon credentials
Open the AWS console ans navigate to Secrets Manager.
Click on Store a new secret.
Under Secret type Choose Other type of secret
Create an entry for FALCONCLIENTID and FALCONCLIENTSECRET with their respective values
Under Secret Name enter ebs/falcon/credentials
Click Next -> Next -> Store
Step 2: Create a key-pair
[!NOTE] If you already have a key pair you want to use, feel free to skip this step
In the AWS Console, navigate to EC2
Under Network and security click Key Pairs
Click Create key pair
Give your key pair a suitable name.
Click Create key pair as save your key to a secure location.
Step 3: Create an Instance profile
Navigate to IAM in the AWS console.
Click Roles and Create role
Under Select trusted entity choose AWS Service
Under Use case choose EC2 then click Next
Select the AWSElasticBeanstalkWebTier and SecretsManagerReadWrite managed policies. Click Next
Give your role a name then click Create role
Step 4: Create Elastic Beanstalk Environment
- Navigate to Elastic Beanstalk in the AWS Console Click on Create environment
- Configure Environment
- Choose the following values
- Environment tier: Web server environment
- Application Name: CSHelloWorld
- Platform: Python
- Platform branch: Python 3.12
- Platform version: 4.3.1(Recommended)
- Click Next
- Configure service access
- For Existing service roles choose aws-elasticbeanstalk-service-role
- If you do not have this role, refer to this documentation to get it deployed.
- For EC2 key pair, choose the key pair we created earlier
- For EC2 instance profile choose the instance profile we created earlier
- Click Next until you arrive at Configure instance traffic and scaling
- Configure instance traffic and scaling
- For Root volume type choose General Purpose 3(SSD)
- Leave everything else as default, scroll down, and click Skip to review
- Click Submit
Step 5: Package the sample application
Open up this root directory in your terminal and execute the following commands
bash
zip -r ./hello_world.zip .
Step 6: Deploy the sample application
Navigate back to the environment we created in Elastic Beanstalk.
Click Upload and deploy.
Select the hello_world.zip file we created.
Click Deploy
Step 7: Verify the application deployment
Click the url under Domain
You should see a simple webpage with a
Hello World!message
Step 8: Verify the Falcon sensor installation
In the logs tab, click Request logs and then Full
Download and unzip the contents
In the
var/log/directory, open the cfn-init-cmd.log file. At the bottom of the file, you should see some logs that resemble the following
```
...
2024-12-03 17:53:01,286 P3644 [INFO] Command 01falcon
2024-12-03 17:53:14,245 P3644 [INFO] -----------------------Command Output-----------------------
2024-12-03 17:53:14,246 P3644 [INFO] % Total % Received % Xferd Average Speed Time Time Time Current
2024-12-03 17:53:14,247 P3644 [INFO] Dload Upload Total Spent Left Speed
2024-12-03 17:53:14,247 P3644 [INFO]
2024-12-03 17:53:14,247 P3644 [INFO] 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
2024-12-03 17:53:14,247 P3644 [INFO] 100 35817 100 35817 0 0 164k 0 --:--:-- --:--:-- --:--:-- 164k
2024-12-03 17:53:14,247 P3644 [INFO] Check if Falcon Sensor is running ... [ Not present ]
2024-12-03 17:53:14,247 P3644 [INFO] Falcon Sensor Install ...
2024-12-03 17:53:14,247 P3644 [INFO] Installed:
2024-12-03 17:53:14,247 P3644 [INFO] falcon-sensor-7.20.0-17306.amzn2023.x8664
2024-12-03 17:53:14,247 P3644 [INFO]
2024-12-03 17:53:14,247 P3644 [INFO] [ Ok ]
2024-12-03 17:53:14,247 P3644 [INFO] Falcon Sensor Register ... [ Ok ]
2024-12-03 17:53:14,247 P3644 [INFO] Falcon Sensor Restart ... [ Ok ]
2024-12-03 17:53:14,247 P3644 [INFO] Falcon Sensor installed successfully.
2024-12-03 17:53:14,247 P3644 [INFO] ------------------------------------------------------------
2024-12-03 17:53:14,248 P3644 [INFO] Completed successfully.
```
Congratulations! The sensor was successfully installed.
[!TIP] You can further confirm this by querying for your instance in the Falcon console.
Other Deployment Options
AWS SSM
This method involves using AWS SSM distributor to deploy the Falcon sensor directly on the machine. An in depth guide can be found in this repository
Baked in AMI
This method involves creating custom AMIs with the Falcon sensor already installed using EC2 Image Builder, and using that AMI for your Elasticbeanstalk compute resources. An in depth guide can be found in this repository
Owner
- Name: CrowdStrike
- Login: CrowdStrike
- Kind: organization
- Email: github@crowdstrike.com
- Location: United States of America
- Website: https://www.crowdstrike.com
- Repositories: 183
- Profile: https://github.com/CrowdStrike
GitHub Events
Total
- Watch event: 1
- Delete event: 1
- Push event: 1
- Public event: 2
- Pull request event: 3
- Create event: 1
Last Year
- Watch event: 1
- Delete event: 1
- Push event: 1
- Public event: 2
- Pull request event: 3
- Create event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gax | g****o@c****m | 9 |
| dependabot[bot] | 4****] | 1 |
| Gabe Alford | r****s@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
Pull Request Authors
- gtheodorio (4)
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Flask ==2.2.5