Skip to main content
Kestrel Threat Hunting Language

Documentation Status Latest Version PyPI Downloads Code Coverage Code Style: Black


Kestrel is a threat hunting language aiming to make cyber threat hunting fast by providing a layer of abstraction to build reusable, composable, and shareable hunt-flow. Starting with:

  1. Black Hat USA 2022 session recording

  2. Black Hat USA 2022 Kestrel hunting lab

  3. Kestrel live tutorial in a cloud sandbox

The Goal

Software developers write Python or Swift than machine code to quickly turn business logic into applications. Threat hunters write Kestrel to quickly turn threat hypotheses into hunt-flow. We see threat hunting as an interactive procedure to create customized intrusion detection systems on the fly, and hunt-flow is to hunts as control-flow is to ordinary programs.

What does it mean by hunt fast?

  • Do NOT write the same IoB pattern in different data source queries.

  • Do NOT write one-time-use adapaters to connect hunt steps.

  • Do NOT waste your existing analytic scripts/programs in future hunts.

  • Do construct your hunt-flow from smaller reuseable hunt-flow.

  • Do share your huntbook with your future self and your colleagues.

  • Do get interactive feedback and revise hunt-flow on the fly.


Kestrel Hunting Demo

Kestrel in a Nutshell

Kestrel overview.
  • Kestrel language: a threat hunting language for a human to express what to hunt.

    • expressing the knowledge of what in patterns, analytics, and hunt flows.

    • composing reusable hunting flows from individual hunting steps.

    • reasoning with human-friendly entity-based data representation abstraction.

    • thinking across heterogeneous data and threat intelligence sources.

    • applying existing public and proprietary detection logic as analytic hunt steps.

    • reusing and sharing individual hunting steps, hunt-flow, and entire huntbooks.

  • Kestrel runtime: a machine interpreter that deals with how to hunt.

    • compiling the what against specific hunting platform instructions.

    • executing the compiled code locally and remotely.

    • assembling raw logs and records into entities for entity-based reasoning.

    • caching intermediate data and related records for fast response.

    • prefetching related logs and records for link construction between entities.

    • defining extensible interfaces for data sources and analytics execution.

Basic Concepts and Howto

Visit Kestrel documentation to learn Kestrel:

Kestrel Huntbooks And Analytics

Kestrel Hunting Blogs

  1. Building a Huntbook to Discover Persistent Threats from Scheduled Windows Tasks

  2. Practicing Backward And Forward Tracking Hunts on A Windows Host

  3. Building Your Own Kestrel Analytics and Sharing With the Community

  4. Setting Up The Open Hunting Stack in Hybrid Cloud With Kestrel and SysFlow

  5. Try Kestrel in a Cloud Sandbox

  6. Fun with securitydatasets.com and the Kestrel PowerShell Deobfuscator

  7. Kestrel Data Retrieval Explained

Talks And Demos

Talk summary (visit Kestrel documentation on talks to learn details):

Connecting With The Community

Release files for kestrel-jupyter 1.8.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kestrel-jupyter 1.8.7
File Size Uploaded
kestrel_jupyter-1.8.7.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kestrel-jupyter 1.8.7
File Interpreter ABI Platform
kestrel_jupyter-1.8.7-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / kestrel_jupyter-1.8.7.tar.gz

Download URL kestrel_jupyter-1.8.7.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e5421e382c88dbbfc6bc88ad881cd5c9f4f6a82d884f7ed211daeee90ad6f317
BLAKE2b-256 checksum
How to use checksums
260c3b5cfcf4a77dd86172df6a657ff20d9d8b41bdb913ce7ec45e6371040de4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release files / kestrel_jupyter-1.8.7-py3-none-any.whl

Download URL kestrel_jupyter-1.8.7-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc015edd9bb14000819361ca959bb305aa9491b1f28b4ff3115972a0d42d5589
BLAKE2b-256 checksum
How to use checksums
0cb8ed938d4ef1831820b04486e4ac488e0b882302a9cf169ef4ad1c03510822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

1.8.7 This release

2 release files

1.8.6

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page