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

scripts archival projection profiles charts sequences interactive generic hacking shellcodes
Last synced: 11 months ago · JSON representation

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
Archived
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme

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)

Configuration

  1. First, add the Falcon client id and secret to Secrets Manager.

  2. Create a scripts folder. 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.

  1. Create a .ebextensions directory 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

  1. Open the AWS console ans navigate to Secrets Manager.

  2. Click on Store a new secret.

  3. Under Secret type Choose Other type of secret

  4. Create an entry for FALCONCLIENTID and FALCONCLIENTSECRET with their respective values

  5. Under Secret Name enter ebs/falcon/credentials

  6. 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

  1. In the AWS Console, navigate to EC2

  2. Under Network and security click Key Pairs

  3. Click Create key pair

  4. Give your key pair a suitable name.

  5. Click Create key pair as save your key to a secure location.

Step 3: Create an Instance profile

  1. Navigate to IAM in the AWS console.

  2. Click Roles and Create role

  3. Under Select trusted entity choose AWS Service

  4. Under Use case choose EC2 then click Next

  5. Select the AWSElasticBeanstalkWebTier and SecretsManagerReadWrite managed policies. Click Next

  6. Give your role a name then click Create role

Step 4: Create Elastic Beanstalk Environment

  1. 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

  1. Navigate back to the environment we created in Elastic Beanstalk.

  2. Click Upload and deploy.

  3. Select the hello_world.zip file we created.

  4. Click Deploy

Step 7: Verify the application deployment

  1. Click the url under Domain

  2. You should see a simple webpage with a Hello World! message

Step 8: Verify the Falcon sensor installation

  1. In the logs tab, click Request logs and then Full

  2. Download and unzip the contents

  3. 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.x86
64
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

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

All Time
  • Total Commits: 11
  • Total Committers: 3
  • Avg Commits per committer: 3.667
  • Development Distribution Score (DDS): 0.182
Past Year
  • Commits: 11
  • Committers: 3
  • Avg Commits per committer: 3.667
  • Development Distribution Score (DDS): 0.182
Top Committers
Name Email 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 (1)

Dependencies

requirements.txt pypi
  • Flask ==2.2.5