Skip to content

Quick Scan

Joshua Hiller edited this page Oct 19, 2021 · 22 revisions

CrowdStrike Falcon Twitter URL

Using the Quick Scan service collection

Uber class support Service class support Documentation Version

Table of Contents

Operation ID Description
GetScansAggregates
PEP 8 get_scans_aggregates
Get scans aggregations as specified via json in request body.
GetScans
PEP 8 get_scans
Check the status of a volume scan. Time required for analysis increases with the number of samples in a volume but usually it should take less than 1 minute
ScanSamples
PEP 8 scan_samples
Submit a volume of files for ml scanning. Time required for analysis increases with the number of samples in a volume but usually it should take less than 1 minute
QuerySubmissionsMixin0
PEP 8 query_submissions
Find IDs for submitted scans by providing an FQL filter and paging details. Returns a set of volume IDs that match your criteria.

GetScansAggregates

Get scans aggregations as specified via json in request body.

PEP8 method name

get_scans_aggregates

Content-Type

  • Consumes: application/json
  • Produces: application/json

Keyword Arguments

Name Service Uber Type Datatype Description
body
Service Class Support

Uber Class Support
body string Full body payload in JSON format.
date_ranges
Service Class Support

Uber Class Support
body list of dictionaries
field
Service Class Support

Uber Class Support
body string
filter
Service Class Support

Uber Class Support
body string FQL syntax
interval
Service Class Support

Uber Class Support
body string
min_doc_count
Service Class Support

Uber Class Support
body integer Minimum number of documents required to match.
missing
Service Class Support

Uber Class Support
body string
name
Service Class Support

Uber Class Support
body string
q
Service Class Support

Uber Class Support
body string FQL syntax
ranges
Service Class Support

Uber Class Support
body list of dictionaries
size
Service Class Support

Uber Class Support
body integer
sort
Service Class Support

Uber Class Support
body string FQL syntax
time_zone
Service Class Support

Uber Class Support
body string
type
Service Class Support

Uber Class Support
body string

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

date_ranges = [
    {
        "from": "2021-05-15T14:55:21.892315096Z",
        "to": "2021-05-17T13:42:16.493180643Z"
    }
]

ranges = [
    {
        "From": 1,
        "To": 100
    }
]

response = falcon.get_scans_aggregates(date_ranges=date_ranges,
                                       field="string",
                                       filter="string",
                                       interval="string",
                                       min_doc_count=integer,
                                       missing="string",
                                       name="string",
                                       q="string",
                                       ranges=ranges,
                                       size=integer,
                                       sort="string",
                                       time_zone="string",
                                       type="string"
                                       )
print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

date_ranges = [
    {
        "from": "2021-05-15T14:55:21.892315096Z",
        "to": "2021-05-17T13:42:16.493180643Z"
    }
]

ranges = [
    {
        "From": 1,
        "To": 100
    }
]

response = falcon.GetScansAggregates(date_ranges=date_ranges,
                                     field="string",
                                     filter="string",
                                     interval="string",
                                     min_doc_count=integer,
                                     missing="string",
                                     name="string",
                                     q="string",
                                     ranges=ranges,
                                     size=integer,
                                     sort="string",
                                     time_zone="string",
                                     type="string"
                                     )
print(response)
Uber class example
from falconpy import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

date_ranges = [
    {
        "from": "2021-05-15T14:55:21.892315096Z",
        "to": "2021-05-17T13:42:16.493180643Z"
    }
]

ranges = [
    {
        "From": 1,
        "To": 100
    }
]

BODY = {
    "date_ranges": date_ranges,
    "field": "string",
    "filter": "string",
    "interval": "string",
    "min_doc_count": 0,
    "missing": "string",
    "name": "string",
    "q": "string",
    "ranges": ranges,
    "size": 0,
    "sort": "string",
    "time_zone": "string",
    "type": "string"
}

response = falcon.command("GetScansAggregates", body=BODY)
print(response)

GetScans

Check the status of a volume scan. Time required for analysis increases with the number of samples in a volume but usually it should take less than 1 minute

PEP8 method name

get_scans

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Datatype Description
ids
Service Class Support

Uber Class Support
query string or _list of strings) ID of a submitted scan to retrieve.
parameters
Service Class Support

Uber Class Support
query string Full query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.get_scans(ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.GetScans(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("GetScans", ids=id_list)
print(response)

ScanSamples

Submit a volume of files for ml scanning. Time required for analysis increases with the number of samples in a volume but usually it should take less than 1 minute

PEP8 method name

scan_samples

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Datatype Description
body
Service Class Support

Uber Class Support
body string Full body payload in JSON format.
samples
Service Class Support

Uber Class Support
body string or list of strings Submit a batch of SHA256s for ml scanning. The samples must have been previously uploaded through UploadSampleV3.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

sample_list = "SHA1,SHA2,SHA3"  # Can also pass a list here: ['SHA1', 'SHA2', 'SHA3']

response = falcon.scan_samples(samples=sample_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

sample_list = "SHA1,SHA2,SHA3"  # Can also pass a list here: ['SHA1', 'SHA2', 'SHA3']

response = falcon.ScanSamples(samples=sample_list)
print(response)
Uber class example
from falconpy import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

sample_list = ['SHA1', 'SHA2', 'SHA3']

BODY = {
    "samples": sample_list
}

response = falcon.command("ScanSamples", body=BODY)
print(response)

QuerySubmissionsMixin0

Find IDs for submitted scans by providing an FQL filter and paging details. Returns a set of volume IDs that match your criteria.

PEP8 method name

query_submissions

Content-Type

  • Produces: application/json

Keyword Arguments

Name Service Uber Type Datatype Description
filter
Service Class Support

Uber Class Support
query string Optional filter and sort criteria in the form of an FQL query.

Additional information about FQL queries can also be found in here (Customer login required).
limit
Service Class Support

Uber Class Support
query integer Maximum number of volume IDs to return. Max: 5000.
offset
Service Class Support

Uber Class Support
query string The offset to start retrieving submissions from.
sort
Service Class Support

Uber Class Support
query string Sort order: asc or desc.
parameters
Service Class Support

Uber Class Support
query string Full query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

response = falcon.query_submissions(filter="string",
                                    offset="string",
                                    limit=integer,
                                    sort="string"
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScan

falcon = QuickScan(client_id="API_CLIENT_ID_HERE",
                   client_secret="API_CLIENT_SECRET_HERE"
                   )

response = falcon.QuerySubmissionsMixin0(filter="string",
                                         offset="string",
                                         limit=integer,
                                         sort="string"
                                         )
print(response)
Uber class example
from falconpy import APIHarness

falcon = APIHarness(client_id="API_CLIENT_ID_HERE",
                    client_secret="API_CLIENT_SECRET_HERE"
                    )

PARAMS = {
    "filter": "string",
    "offset": "string",
    "limit": integer,
    "sort": "string"
}

response = falcon.command("QuerySubmissionsMixin0", parameters=PARAMS)
print(response)

CrowdStrike Falcon

Clone this wiki locally