CrowdStrike Caracara
Project description
Caracara
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 caracara.hosts import HostsToolbox
from caracara.rtr import RTRToolbox
# 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
)
# Lookup the AID for our search string
target_aid = hosts.host.find_host_aid(hostname="SEARCH-STRING")
# Retrieve the hostname
hostname = hosts.host.get_host(target_aid)[0]["hostname"]
# RTR Single Target helper
target = rtr.single_target
# Initialize a RTR session
target_session = target.connect_to_host(target_aid)
# Execute a RTR command
command_result = target.execute_command("ifconfig", target_session)
# Disconnect from the RTR session
target.disconnect_from_host(target_session)
# Output the results
print(command_result)
Installation
python3 -m pip install caracara
Upgrading
python3 -m pip install caracara --upgrade
Removal
python3 -m pip uninstall caracara
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
caracara-0.0.31.tar.gz
(10.2 kB
view hashes)
Built Distribution
caracara-0.0.31-py3-none-any.whl
(12.4 kB
view hashes)
Close
Hashes for caracara-0.0.31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9dce905f8837ca40314d8afd7df843e4ad46633ea1602dcfaf51c06025c4538 |
|
MD5 | 3bc16e83cba3dbc6b9b75d0de7b0a22c |
|
BLAKE2b-256 | f80ed16914646783c5f2770faf40d0902ad69f666a4ef55f599fa1fbbee6c374 |