CrowdStrike Falcon CrowdStrike Subreddit

Using the Quick Scan Pro service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
UploadFileQuickScanPro
PEP 8upload_file
Uploads a file to be further analyzed with QuickScan Pro. The samples expire after 90 days.
DeleteFile
PEP 8delete_file
Deletes file by its sha256 identifier.
GetScanResult
PEP 8get_scan_result
Gets the result of an QuickScan Pro scan.
LaunchScan
PEP 8launch_scan
Starts scanning a file uploaded through UploadFileQuickScanPro.
DeleteScanResult
PEP 8delete_scan_result
Deletes the result of an QuickScan Pro scan.
QueryScanResults
PEP 8query_scan_results
Gets QuickScan Pro scan jobs for a given FQL filter.

Passing credentials

WARNING

client_id and client_secret are keyword arguments that contain your CrowdStrike API credentials. Please note that all examples below do not hard code these values. (These values are ingested as strings.)

CrowdStrike does not recommend hard coding API credentials or customer identifiers within source code.

UploadFileQuickScanPro

Uploads a file to be further analyzed with QuickScan Pro. The samples expire after 90 days.

PEP8 method name

upload_file

Endpoint

MethodRoute
POST/quickscanpro/entities/files/v1

Required Scope

quick-scan-pro:write

Content-Type

  • Consumes: multipart/form-data
  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
fileService Class SupportUber Class SupportformDatafileBinary file to be uploaded. Max file size: 256 MB.
file_nameService Class SupportUber Class SupportquerystringName of the file being uploaded.
scanService Class SupportUber Class SupportformDatabooleanIf True, after upload, it starts scanning immediately. Default scan mode is False.
passwordService Class SupportUber Class SupportformDatastringMULTIPART ONLY - Password for encrypted archives (use for multipart/form-data uploads). If scan is true, the value is used for the scan just starting.
x_file_passwordService Class SupportUber Class SupportheaderstringOCTET-STREAM ONLY - Password for encrypted archives (use for octet-stream uploads). If scan is true, the value is used for the scan just starting.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

scan_file = "file_to_scan.ext"

with open(scan_file, "rb") as file_upload:
    response = falcon.upload_file(file=file_upload.read(), file_name=scan_file, scan=boolean)

print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

scan_file = "file_to_scan.ext"

with open(scan_file, "rb") as file_upload:
    response = falcon.UploadFileQuickScanPro(file=file_upload.read(), file_name=scan_file, scan=boolean)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

scan_file = "file_to_scan.ext"

form_payload = {
    "file_name": scan_file,
    "scan": boolean
}

with open(scan_file, "rb") as file_upload:
    response = falcon.command("UploadFileQuickScanPro",
                              files=[("file", ("UploadedFile", file_upload.read()))],
                              data=form_payload
                              )
print(response)

Back to Table of Contents

DeleteFile

Deletes file by its SHA256 identifier.

PEP8 method name

delete_file

Endpoint

MethodRoute
DELETE/quickscanpro/entities/files/v1

Required Scope

quick-scan-pro:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsFile's SHA256
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.delete_file(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.DeleteFile(ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.command("DeleteFile", ids=id_list)

print(response)

Back to Table of Contents

GetScanResult

Gets the result of an QuickScan Pro scan.

PEP8 method name

get_scan_result

Endpoint

MethodRoute
GET/quickscanpro/entities/scans/v1

Required Scope

quick-scan-pro:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsScan job IDs previously created by LaunchScan.
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.get_scan_result(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.GetScanResult(ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.command("GetScanResult", ids=id_list)

print(response)

Back to Table of Contents

LaunchScan

Starts scanning a file uploaded through '/quickscanpro/entities/files/v1'.

PEP8 method name

launch_scan

Endpoint

MethodRoute
POST/quickscanpro/entities/scans/v1

Required Scope

quick-scan-pro:write

Content-Type

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

Keyword Arguments

NameServiceUberTypeData typeDescription
bodyService Class SupportUber Class SupportbodydictionaryFull body payload in JSON format.
sha256Service Class SupportUber Class SupportbodystringFull body payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.launch_scan(sha256="string")

print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.LaunchScan(sha256="string")

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

body_payload = {
    "resources": [
        {
            "sha256": "string"
        }
    ]
}

response = falcon.command("LaunchScan", body=body_payload)

print(response)

Back to Table of Contents

DeleteScanResult

Deletes the result of an QuickScan Pro scan.

PEP8 method name

delete_scan_result

Endpoint

MethodRoute
DELETE/quickscanpro/entities/scans/v1

Required Scope

quick-scan-pro:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
idsService Class SupportUber Class Supportquerystring or list of stringsScan job IDs previously created by LaunchScan
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.delete_scan_result(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.DeleteScanResult(ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

response = falcon.command("DeleteScanResult", ids=id_list)

print(response)

Back to Table of Contents

QueryScanResults

Gets QuickScan Pro scan jobs for a given FQL filter.

PEP8 method name

query_scan_results

Endpoint

MethodRoute
GET/quickscanpro/queries/scans/v1

Required Scope

quick-scan-pro:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterService Class SupportUber Class SupportquerystringRequired. FQL query which mentions the SHA256 field. Empty value means to not filter on anything. Available filter fields that support match (~): _all, mitre_attacks.description. Available filter fields that support exact match: cid, sha256, id, status, type, entity, executor, verdict, verdict_reason, verdict_source, file_size, file_type_short, artifacts.file_artifacts.sha256, artifacts.file_artifacts.filename, artifacts.file_artifacts.verdict, artifacts.file_artifacts.verdict_reasons, artifacts.url_artifacts.url, artifacts.url_artifacts.verdict, artifacts.url_artifacts.verdict_reasons, mitre_attacks.attack_id, mitre_attacks.attack_id_wiki, mitre_attacks.tactic, mitre_attacks.technique, mitre_attacks.capec_id, mitre_attacks.parent.attack_id, mitre_attacks.parent.attack_id_wiki, mitre_attacks.parent.technique. Available filter fields that support wildcard (*): mitre_attacks.description. Available filter fields that support range comparisons (>, <, >=, <=): created_timestamp, updated_timestamp, file_size. All filter fields and operations support negation (!). _all field is used to search between all fields.
offsetService Class SupportUber Class SupportqueryintegerThe offset to start retrieving ids from.
limitService Class SupportUber Class SupportqueryintegerMaximum number of IDs to return. Max: 5000. Default: 50.
sortService Class SupportUber Class SupportquerystringSort order: asc or desc. Sort supported fields created_timestamp
parametersService Class SupportUber Class SupportquerydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import QuickScanPro

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

# Do not hardcode API credentials!
falcon = QuickScanPro(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

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

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("QueryScanResults",
                          filter="string",
                          offset=integer,
                          limit=integer,
                          sort="string"
                          )

print(response)

Back to Table of Contents