ioc
Falcon IOC samples
The examples within this folder focus on leveraging CrowdStrike's Falcon IOC API.
Create Indicator of Compromise
Demonstrates the creation of a single IOC using either the Service or Uber Class. Indicator detail is loaded from an external file that can be specified via the command line.
Running the program
In order to run this demonstration, you you will need access to CrowdStrike API keys with the following scopes:
IOC
WRITE
Execution syntax
This sample leverages simple command-line arguments to implement functionality.
Basic usage
Create an indicator using sample indicator file example_indicator.json. The default method uses the Service Class to interact with the CrowdStrike API.
Perform the operation using the Uber class instead with the
-margument.
Load a custom indicator file with the
-iargument. (Indicator should be in JSON format.)
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.
IOC Audit
This program will output a list of IOCs and their details for either the current CID or in each Child CID (Flight Control scenarios). This can be used for regular audits of IOCs across multiple CIDs.
Running the program
In order to run this demonstration, you you will need access to CrowdStrike API keys with the following scopes:
IOC
READ
Flight Control
READ
Sensor Download
READ
[!NOTE] This program can be executed using an API key that is not scoped for the Flight Control (MSSP) and Sensor Download service collections, but will be unable to lookup the current CID (Sensor Download) or access child CIDs (Flight Control).
Execution syntax
This sample leverages simple command-line arguments to implement functionality.
Basic usage
Execute the default example. This will output results to a CSV file named iocs.txt.
This sample supports Environment Authentication, meaning you can execute any of the command lines shown below without providing credentials if you have the values
FALCON_CLIENT_IDandFALCON_CLIENT_SECRETdefined in your environment.
Change the output destination with the -o argument.
Enable MSSP mode and audit all Flight Control children with the -m argument.
Enable MSSP mode and audit a specific Flight Control child with the -c argument.
API debugging can be enabled using the
-dargument.
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.
IOC Restore
This program will restore deleted IOCs based upon specified filter criteria.
Running the program
In order to run this demonstration, you you will need access to CrowdStrike API keys with the following scopes:
IOC
READ, WRITE
Required packages
In order to run this sample, you will need to have the tabulate package installed.
Execution syntax
This sample leverages simple command-line arguments to implement functionality.
Basic usage
Execute the default example. This will default to looking for IOCs that were applied globally and deleted as of today's date.
[!NOTE] Times are in UTC.
This sample supports Environment Authentication, meaning you can execute any of the command lines shown below without providing credentials if you have the values
FALCON_CLIENT_IDandFALCON_CLIENT_SECRETdefined in your environment.
Change the CrowdStrike region with the -b argument.
Search for deleted IOCs modified by a specific user with the -m argument.
Search for deleted IOCs on a specific day using the -dt argument.
[!TIP] This argument should be in YYYY-mm-dd format.
Search for deleted IOCs targeting a specific Host Group (by ID) using the -hg argument.
Search for deleted IOCs targeting a specific Host Group (by Host Group name) using the -g argument.
List all deleted IOCs discovered but take no action with the -l argument.
[!TIP] Multiple command line parameters may be provided to refine search results.
API debugging can be enabled using the -d argument.
Adjust the output table format using the -t 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?

