Skip to main content

CrowdStrike FalconPy Tools

Project description

CrowdStrike Falcon Twitter URL

FalconPy Tools

Pylint Flake8 Bandit CodeQL Maintained

A collection of tools for interacting with the CrowdStrike Falcon API.

Basic usage example

The following example demonstrates using the Hosts Toolbox to retrieve a host AID, and then using the RTR Toolbox to initiate a session and execute ifconfig.

import os
from falconpytools.hosts import HostsToolbox, Host
from falconpytools.rtr import RTRToolbox, SingleTarget

# Open the RTR toolbox
rtr = RTRToolbox(os.environ["FALCON_CLIENT_ID"],
                 os.environ["FALCON_CLIENT_SECRET"],
                 verbose=True
                 )
# Open the Hosts toolbox
hosts = HostsToolbox(auth_object=rtr.api.rtr.auth_object,
                     verbose=True
                     )
# Host helper
host = Host(api=hosts.api, verbose=hosts.verbose)
# Lookup the AID for our search string
target_aid = host.find_host_aid(hostname="SEARCH-STRING")
hostname = host.get_host(target_aid)[0]["hostname"]
# RTR Single Target helper
target = SingleTarget(api=rtr.api, verbose=rtr.verbose)
# Initialize a RTR session
target_session = target.connect_to_host(target_aid)
# Execute a RTR command
command_result = host.execute_command("ifconfig", target_session)
# Disconnect from the RTR session
host.disconnect_from_host(target_session)
# Output the results
print(command_result)

Installation

python3 -m pip install crowdstrike-falconpy-tools

Upgrading

python3 -m pip install crowdstrike-falconpy-tools --upgrade

Removal

python3 -m pip uninstall crowdstrike-falconpy-tools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crowdstrike-falconpy-tools-0.0.12.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crowdstrike_falconpy_tools-0.0.12-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file crowdstrike-falconpy-tools-0.0.12.tar.gz.

File metadata

  • Download URL: crowdstrike-falconpy-tools-0.0.12.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for crowdstrike-falconpy-tools-0.0.12.tar.gz
Algorithm Hash digest
SHA256 c0e255cc8f8a0e8df7e1a8025a62df2638790c648db8cf11fab4dd32099eeedf
MD5 320a7d85e144a71f52c9a0f21a2c22a9
BLAKE2b-256 9bf70335029bb35cc6dad7bec45707f054dfed577b2b1a84def130daec6ac340

See more details on using hashes here.

File details

Details for the file crowdstrike_falconpy_tools-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: crowdstrike_falconpy_tools-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for crowdstrike_falconpy_tools-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 46f177e67f765438011143bd7a5012aa7d21642fd024d8c42ad35d73de8068df
MD5 7d0d2796d5c80cc27b9814753015b09d
BLAKE2b-256 a46cf081f4ec77f70d31f66aa099881749782796cb689d80d555044819100474

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page