spotlight

CrowdStrike FalconPy
CrowdStrike FalconPy

CrowdStrike Subreddit

Falcon Spotlight Vulnerabilities samples

The examples within this folder focus on leveraging CrowdStrike's Falcon Spotlight Vulnerabilities API.

Identify hosts with vulnerabilities by CVE

Retrieves a list of hosts with vulnerabilities matching the CVE(s) specified. Also provides remediation recommendations when available.

Dependencies

This sample is dependent upon the python-tabulate library.

Installing tabulate

Tabulate can be installed using the Python Package Index:

Running the program

In order to run this demonstration, you you will need access to CrowdStrike API keys with the following scopes:

Service Collection
Scope

Hosts

READ

Spotlight Vulnerabilities

READ

Execution syntax

The following command will retrieve a list of hosts matching the specified CVE.

Basic usage

You do not need to prepend the CVE- string to your CVE ID. Both formats are accepted.

You can search for multiple CVEs by passing a comma delimited string for the -c argument.

Excluding columns

You can exclude columns from the result display using the -x argument.

Enabling the progress indicator

To show a progress indicator, use the -p option.

Changing the sort

By default, results are sorted by creation date (created_on). You can specify the column to sort by using the -o argument.

Available sort columns

  • cve

  • score

  • severity

  • cve_description

  • created_on

  • updated_on

  • hostname

  • local_ip

  • os_version

  • service_provider

  • remediation

By default, results are sorted in ascending order. You can change this behavior using the -r argument.

Changing the tabular display format

Multiple formats are supported for displaying results. You can change format using the -f argument. Invalid selections are ignored.

Available table formats

  • plain

  • simple

  • github

  • grid (Default)

  • fancy_grid

  • pipe

  • orgtbl

  • jira

  • presto

  • pretty

  • psql

  • rst

  • mediawiki

  • moinmoin

  • youtrack

  • html

  • unsafehtml

  • latex

  • latex_raw

  • latex_booktabs

  • latex_longtable

  • textile

  • tsv

Command-line help

Command-line help is available via the -h argument.

Example source code

The source code for this example can be found here.

Spotlight Quick Report

Produce a quick report of CVE vulnerabilities discovered within your Falcon tenant.

Running the program

In order to run this demonstration, you you will need access to CrowdStrike API keys with the following scopes:

Service Collection
Scope

Hosts

READ

Spotlight Vulnerabilities

READ

Execution syntax

The following command will generate a Spotlight quick report based upon the details available within your tenant.

Basic usage

Saving results

Output the results of the report to JSON format using the -o argument.

Reviewing saved results

You can consume a saved report and print the results using the -f argument.

Adjusting the date range

Specify the number of days backwards in time for hosts last seen using the -d argument.

Duplicates

If you wish to allow duplicate matches to be present within your report, pass the -a argument.

Debugging

If you want to debug code and quickly find errors within code --debug argument.

Command-line help

Command-line help is available via the -h argument.

Example source code

The source code for this example can be found here.

Last updated

Was this helpful?