Skip to main content

Kestrel Threat Hunting Language

Project description

Kestrel Threat Hunting Language Python 3 Code Style: Black Code Coverage Latest Version PyPI Downloads Documentation Status

[News] Kestrel arsenal session coming to Black Hat USA 2022 (more talks at Talks And Demos)


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.

Try Kestrel in a cloud sandbox without install.

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 TTP 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

Talks And Demos

Visit Kestrel documentation on talks to learn more about the talks:

Connecting With The Community

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

kestrel-lang-1.4.1.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

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

kestrel_lang-1.4.1-py3-none-any.whl (73.0 kB view details)

Uploaded Python 3

File details

Details for the file kestrel-lang-1.4.1.tar.gz.

File metadata

  • Download URL: kestrel-lang-1.4.1.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for kestrel-lang-1.4.1.tar.gz
Algorithm Hash digest
SHA256 cae2dd2c697fa720cae443e2aa02ba070363208a01b670e786a365f01523cd43
MD5 c1c5f3a799216118ff276b3ceb817daf
BLAKE2b-256 7b555cf6744b97fb2ecd1d006af930172752bb2c57f2769b746a8e0e36b30764

See more details on using hashes here.

File details

Details for the file kestrel_lang-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: kestrel_lang-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 73.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for kestrel_lang-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a51f456a4d3878548729623a27c78f1946fb2e6b12eaf9468036ac1071ebc13
MD5 06afa671aa2666d50d5049c32267ba54
BLAKE2b-256 af40f1adbe6b5fc87d1d57ddf6e25235b5a39c1671cb59b876bafebef7ee3925

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