Forcepoint NGFW Custom Response Integration

Forcepoint NGFW Custom Response Integration

This article shows how to leverage Forcepoint NGFW provided by the SMC (Security Manager Center) API and Lumu Defender API to enhance your Response capabilities.

Response integration between Forcepoint NGFW and Lumu

A typical Forcepoint NGFW deployment relies on a manager, Forcepoint Security Management Center (SMC), and one or multiple Forcepoint NGFW engines. This integration works with the SMC component.

Requirements

  • A Forcepoint SMC with administrative access.
  • Lumu Defender API key
    • To retrieve an API token, please refer to the Defender API document.
  • Script host.
    • A scripting host is required to deploy the integration. This host must have Internet visibility over Lumu Defender API endpoints and Forcepoint SMC. According to the deployment model you select, you will need a host with:
      • Python 3.10+
                                    OR
      • A Docker-enabled host.

Contacted hosts

Allow all the traffic to the following hosts. These are required for the operation of this integration:

  • Forcepoint SMC IP address
  • defender.lumu.io

Prepare Forcepoint SMC for Lumu integration

Before you deploy and implement the Lumu Integration, you need to prepare your Forcepoint SMC to ensure the integration works as expected.

Enable Change Management Approbation

If you want to commit changes made by the integration script automatically, you need to check the option of allowing a user admin to approve their own changes. Go to your Forcepoint SMC console and follow these steps:

1. Go to Menu (Hamburger Icon) > System Tools > Global System Properties.
2. Click on the Change Management Tab and check on Allow to Administration to Approve Their own Changes.

Enable SMC API

You need to enable SMC API to allow requests from the integration script. Go to your Forcepoint SMC console and follow these steps:

1. Go to Configuration > Network Elements > Servers

2. Right-click on the management server object and click on Properties…

3. Locate yourself on the SD-WAN Manager Console API tab

4. Modify the configuration following these directions:

a. Click on the Enable checkbox

b. You can change the Port Number. Make sure you take note of the configured port

c. Enable TLS encryption by selecting a Server Credentials record

d. Select a Server TLS Cryptographic Suite Set

5. Save the configuration by clicking on the OK button

It’s strongly recommended to create a custom administrator role to be used by the integration to limit the permissions over your Forcepoint deployment to just the required ones. Create a role within your Forcepoint SMC console following these steps:

1. Go to Configuration > Administration > Access Rights > Administrator Roles

2. Right-click on the role list and click on New Administrator Role

3. Fill in the required data. Make sure the following permissions are assigned to the role.

SectionPermission
Element Rights for Granted ElementsApprove Changes
Element Rights for Granted ElementsDelete Elements
Element Rights for Granted ElementsEdit Element Properties
Element Rights for Granted ElementsView Element Contents
Action RightsCreate Elements
Action Rights
Refresh Policies

Your new role must look as follows:


4. Click on the OK button to save your new role

Create an API Account

To create a Forcepoint SMC API account, follow these steps on your Forcepoint SMC console: 

1. Go to Configuration > Administration > Access Rights > API Clients

2. Right-click on the Api Clients list and click on New API Client

3. Fill in the API client information.

4. Under the Permissions tab, check the Restricted Permissions option, then select the role created in the previous step

Before clicking on the OK button, make sure to save the Authentication Key from the General tab. If you forget to do this step, you will need to regenerate it by checking the properties and clicking on the Generate Authentication Key button.

If you are managing multiple domains with the same Forcepoint SMC, make sure you assign permissions over all the required domains to the API user.



Pushing changes to your deployment

If you enabled the Forcepoint SMC API, it’s probable you will need to deploy the changes to your deployment. Check the Engine dashboard within your Forcepoint SMC console to verify if you need to do so. Deploy the changes to the management server if it’s indicated by the SMC console.

Collect the required data from Lumu portal

The integration set-up process needs you to collect this information from Lumu portal:

  • Lumu Defender API key
  • Company UUID

Log in to your Lumu portal and run the following procedures to collect these data.

Collect the Lumu Defender API key

To collect the Lumu Defender API key, refer to the Defender API document.

Collect your Lumu company UUID

To collect your Lumu company UUID, log in to your Lumu portal. Once you are in the main window, copy the string below your company name.


Deploy the integration

There are 2 environment options to deploy the script, select the one that best fits your current infrastructure.

  • Run it as a Python script executing the install.sh bash file
    • Creates a Python virtual run time and its dependencies for you
    • Installs the crontab line in the host
  • Run it as a Docker container.

Whichever alternative you select, you need to first unpack the integration package shared by our Support team.

Unpack the deployment package provided by Lumu in your preferred path/folder. Keep in mind this location, as it will be required for further configurations. From now on, we will refer to this folder as <app_lumu_root>.

If you use the install script, use the uninstall.sh bash file to remove the integration from the host

Set up the configuration files

To set up the integration, you need to add and edit two configuration files:

  • companies.yml: this file contains the information collected from the Lumu portal
  • integrations.yml: this file contains the information collected from your Forcepoint SMC

Inside the integration package, you will find sample files you can use to build your configuration files. These files are companies_template.yml and integration_template.yml.

Complete the companies file

The companies file is in charge of defining how the integration connects to Lumu and extracts the information of the incidents and related indicators of compromise.

  1. -
    lumu:
    uuid: "<COMPANY-UUID>"
    [name: "<COMPANY-NAME>"]
    [contact_name: "<CONTACT_NAME>"]
    [contact_email: "<CONTACT_EMAIL>"]
    defender_key: "<DEFENDER_API_KEY>"
    hash_type: "<HASH_ALG>" # sha256 | sha1 | md5
    ioc_types: # list of ioc types, option one, many or all
    - ip
    - domain
    - url
    - hash
    adversary: # list of adversary types, option one, many or all
    - C2C
    - Malware
    - Mining
    - Spam
    - Phishing
    days: 30 # MIN 1, MAX 30
Within this file, COMPANY_UUID and DEFENDER_API_KEY fields are mandatory. Please use the values captured in the previous steps. The ioc_types values must match with the IOC types required by the integration.

Complete the integrations file

The integration file contains the information required for the integration to connect and interact with your Forcepoint FMC deployment:

  1. -
    lumu:
    uuid: "<COMPANY_UUID>"
    days: 10 # INTEGER=(get incidents from X days of the ioc manager local db)
    app:
    name: "<CLIENT-NAME>" # Name of the headquarters, branch, office, client
    clean: false # true # either clean the instance IOC or not
    GlobalList: false # true # either append the instance IOC to global list in the same Management Server or not
    ioc: # ["ip", "domain", "url"] list of one, many or all ioc types
    - ip
    - domain
    - url
      engines: # list of the Engine Names (Case Sensitive) | null (include all Elements related engine)
    - "ENGINE-NAME-1"
    - "ENGINE-NAME-2"
    - "ENGINE-NAME-X"
    - ...
    commit_strategy: integration-only # STRING Options: all | integration-only | null

    api:
    url: "<PROTO://IP_HOSTNAME:PORT>"
    api_key: "<API-KEY>"
    verify_cert: false # true
    version: "<API-VERSION>" # e.g NUMBER=(float, int) 7.2 | null

Deploy Integration as script

To deploy the integration as script, you need to run the install.sh script inside the integration package.

Make sure the install.sh script has the execution permission before running it.

To run the installation script, locate yourself in the app_lumu_root folder, then execute this line through CLI.

./install.sh all

The installation script will set up the Python environment and two different cron jobs.

If you want to modify the default running interval set up by the installation script, you can modify the latest crob job entries based on your environment requirements.

if you want to restart or uninstall the integration run the ./restart all and ./uninstall all respectively

Script details

To use the script, you must locate yourself on the path selected for deployment (<app_lumu_root>). Use the following command to show all options available for the package:

python forcepoint_smc_lumu.py -h

Usage:

uforcepoint_smc_lumu [-h] [--config CONFIG] [--ioc-manager-db-path IOC_MANAGER_DB_PATH] [-v] [-c] [-l {screen,file}] [--hours HOURS]

Options

Description

-h, --helpshow this help message and exit
--config CONFIGdefault: integrations.yml, CONFIG FILE PATH of the companies, follow the nex YML template.
--ioc-manager-db-path IOC_MANAGER_DB_PATHdefault path: ./db.sqlite, PATH where the integration goes to read the Lumu Incidents
--logging {screen,file}Logging option (default screen).
-c, --cleanthe flag means Clean all integration and override the yml clean field
--verbose, -vVerbosity level.
--hours HOURSkeep db log record from [x hours], for auto maintenance local db purpose

Usage Examples

Task: query IOC related to Lumu incidents with default options

To query all the IOC related to Lumu incidents triggered in the last 30 days, run the following command.

python3 forcepoint_smc_lumu.py

Task: query IOC related to specific parameters

By default, the integration script will query incidents related to all adversary types. If you need to filter the query to specific adversary types, you can use the --adversary-types flag as follows

python3 forcepoint_smc_lumu.py --config integrations.yml --ioc-manager-db-path /<ioc-manager-path>/db.sqlite

Task: Clean records

To clean the existing records in Elastic, just set up the clean flag in the integrations.yml file to true.

clean: true

Then, run the integration script as follows:

python3 forcepoint_smc_lumu.py [--config CONFIG] [--ioc-manager-db-path IOC_MANAGER_DB_PATH]

Or you can run the clean command directly to clean all the companies

python3 forcepoint_smc_lumu.py –clean [--config CONFIG] [--ioc-manager-db-path IOC_MANAGER_DB_PATH]

The records not manipulated by the integration will be preserved

Other tasks

According to your needs, you can combine the examples shown, also, adding the –logging {file, screen} and –verbose argument can be used for better understanding of what can be rolling wrong.

Deploy as a Docker container (Optional)

If you have a Docker environment, you can select this option to run the integration as a Docker process. To deploy and run your integration as a docker container, locate yourself at the <app_lumu_root> folder, and follow these instructions:

1. Build the container by running the following command.

docker build [--build-arg IOC_MAN_CONFIG='companies.yml'] [--build-arg APP_CONFIG='integrations.yml'] --tag python-lumu-forcepoint-smc-response --file DockerfileAllInOne .
Do not forget the dot "."

2. Run the container by using the following command.

docker run -d --restart unless-stopped --name lumu-forcepoint-smc-response python-lumu-forcepoint-smc-response

With this mode, your integration will run every 30 minutes.

Troubleshooting

For troubleshooting purposes, you can run the following commands:

To log in to your container using an interactive shell:

docker exec -it lumu-forcepoint-smc-response

To collect integration logs:

docker logs -f lumu-forcepoint-smc-response

Expected results

After running the integration, you will see new objects under the Configuration section in your Forcepoint SMC. You need to reference these in your policies according to your needs.

Remember, you need to set a traffic inspection policy to analyze and act on encrypted traffic.

Make sure you don’t manage directly these elements. Doing so can create issues in how the integration operates.

Category


IP address list

Domain Names

Groups

Company Group

Global Group

URL list

Troubleshooting and known issues

To identify failures in the script execution, use the -v flag. The script execution log will show more detailed information.

The application logs will be redirected to lumu.log file. The file errors.log stores only the errors to make them easier to find and aid the troubleshooting process.

Another instance is running

If you receive the following error.

Stopping the integration 695407, it might have another older instance running, check if is feasible or not
older pid: 695404 - cwd: /home/lumu/Documents/repos/forcepoint-smc-response - since: 2024-02-26 11:13:15.420000  
cmdline: /home/lumu/Documents/repos/forcepoint-smc-response/venv3109/bin/python /home/lumu/Documents/repos/forcepoint-smc-response/forcepoint_smc_lumu.py -c

There could be another instance running. To check this, open the pid.pid file in the integration folder. This file stores the process ID if it’s running.


        • Related Articles

        • Forcepoint Web Security Cloud Custom Response Integration

          This article shows how to leverage the Lumu Defender API and Forcepoint Web Security Cloud to mitigate security risks. Forcepoint Web Security Cloud service doesn't have a REST API, so this script simulates the actions run by an admin user to feed a ...
        • Bitdefender Custom Response Integration

          Bitdefender Custom Response Integration This article shows how to leverage the Lumu Defender API and Bitdefender API to mitigate security risks. Requirements GravityZone Business Security Enterprise, cloud version, ...
        • Infoblox Custom Response Integration

          Before going through this article, check our Out-of-the-box App Integrations category. This is the recommended way to integrate the components of your cybersecurity stack with Lumu. If the product you are looking to integrate is there, it is advised ...
        • Akamai SIA Custom Response Integration

          This article shows how to leverage the Lumu Defender API and Akamai SIA (ETP) Configuration API to mitigate security risks. Requirements An Akamai SIA subscription. An Akamai Control Center access is required for setting up and collecting Akamai ...
        • CylanceENDPOINT Custom Response Integration

          This article shows how to leverage the Lumu Defender API and CylanceENDPOINT API to mitigate security risks. Requirements CylanceENDPOINT subscription A CylanceENDPOINT Standard subscription or above is required (formerly CylancePROTECT) Lumu ...