hybridanalysis
Python library and CLI for the Hybrid Analysis (Falcon Sandbox) API v2
Overview
hybridanalysis is a Python toolkit to submit samples to and query the Hybrid Analysis (Falcon Sandbox) service through its API v2. It ships both a synchronous and an asynchronous client with identical surfaces, a full-featured CLI, and a typed exception hierarchy — covering every current (non-deprecated) endpoint across all ten API tags.
Key Features
| Feature | Description |
|---|---|
| Full API coverage | Every current v2 endpoint across feed, key, overview, quick-scan, submit, report, search, file-collection, abuse-reports, system |
| Sync + Async | HybridAnalysisClient (httpx) and AsyncHybridAnalysisClient (httpx async) with the same methods |
| CLI + Library | Use as the hybridanalysis command-line tool or as a Python package |
| Rich search | Query by domain, host/IP, URL, malware family, tag, MITRE ATT&CK technique, hash-similarity and more |
| File submission | Full sandbox and quick-scan multipart uploads |
| Multiple output formats | JSON, token-efficient TOON, and SARIF 2.1.0 for analysis results (--format) |
| Flexible config | Environment variables or a local TOML file |
Supported Surface
Clients HybridAnalysisClient (sync), AsyncHybridAnalysisClient (async)
Tags feed · key · overview · quick-scan · submit · report
search · file-collection · abuse-reports · system
Downloads sample, pcap, certificate, dropped files, memory strings (bytes/text)
Config HYBRIDANALYSIS env var · ~/.config/hybridanalysis/config.toml
Errors AuthenticationError · NotFoundError · RateLimitError · APIError
NetworkError · ConfigError (all subclass HybridAnalysisError)
Installation
From PyPI
pip install hybridanalysis # core
pip install 'hybridanalysis[toon]' # + TOON output (`--format toon`)
From Source
git clone https://github.com/seifreed/hybridanalysis.git
cd hybridanalysis
python3.14 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt # runtime + dev tooling; use `pip install -e .` for runtime only
Requires Python 3.14+. Runtime dependencies are
httpxandclick;--format toonneeds the optionaltoonextra (toon-format).
Configuration
The API key is resolved from, in order:
-
The
HYBRIDANALYSISenvironment variable. -
A local TOML file —
./.hybridanalysis.tomlor~/.config/hybridanalysis/config.toml:[hybridanalysis] api_key = "your-api-key" # base_url = "https://hybrid-analysis.com/api/v2" # optional # user_agent = "Falcon Sandbox" # optional # timeout = 60 # optional, seconds
Every field also has an environment variable that takes precedence over the file:
HYBRIDANALYSIS_URL, HYBRIDANALYSIS_USER_AGENT, and HYBRIDANALYSIS_TIMEOUT.
Quick Start
export HYBRIDANALYSIS="your-api-key"
# System / key info
hybridanalysis system version
hybridanalysis key current
# Submit a sample and poll its report
hybridanalysis submit file sample.exe environment_id=160
hybridanalysis report summary <job-id>
Usage
Command Line Interface
# Look up a hash (any format -> SHA256) and its reports
hybridanalysis search hash <md5|sha1|sha256>
# Search by behaviour / infrastructure
hybridanalysis search terms host=8.8.8.8
hybridanalysis search terms vx_family=nemucod verdict=5
hybridanalysis search terms uses_technique=T1055
# Submit for analysis
hybridanalysis submit file sample.exe environment_id=160
hybridanalysis quick-scan file sample.exe --scan-type all
# Download binary artifacts (to a file, or stdout when --out is omitted)
hybridanalysis report pcap <job-id> --out capture.pcap
hybridanalysis overview sample <sha256> --out sample.gz
--api-key, --base-url, and --config override the resolved configuration.
python -m hybridanalysis works as an alternative to the hybridanalysis command.
Output Formats
Every JSON-returning command accepts -f / --format:
hybridanalysis overview get <sha256> --format toon # token-efficient JSON
hybridanalysis report summary <job-id> --format sarif # SARIF 2.1.0 findings
| Format | Available on | Description |
|---|---|---|
json |
all commands (default) | Indented JSON. |
toon |
all commands | TOON — a compact, lossless JSON encoding that uses fewer tokens. Needs the toon extra: pip install 'hybridanalysis[toon]'. |
sarif |
analysis commands (feed, overview, search, quick-scan, report) |
SARIF 2.1.0: the verdict and each signatures[] entry become results, with levels derived from the verdict / threat level. The artifact location is taken from the command's SHA256 / report-id argument. |
Command Groups
| Command | Description |
|---|---|
hybridanalysis system |
Instance version, environments, action scripts, stats, config, queue |
hybridanalysis key |
API key info and submission quota |
hybridanalysis feed |
Recent detonation and quick-scan feeds |
hybridanalysis overview |
Aggregated report for a SHA256 (+ sample download) |
hybridanalysis search |
Hash lookup and multi-field term search |
hybridanalysis quick-scan |
Quick scans of files/URLs and result retrieval |
hybridanalysis submit |
Sandbox submission of files, URLs and dropped files |
hybridanalysis report |
Report state/summary and artifact downloads |
hybridanalysis file-collection |
Create, search, and manage file collections |
hybridanalysis abuse-reports |
Request report deletion; removed-hash feed |
Python Library
Synchronous
from hybridanalysis import HybridAnalysisClient
with HybridAnalysisClient.from_env() as client:
print(client.system.version())
# Submit a file and poll its report
submitted = client.submit.file("sample.exe", environment_id="160")
job_id = submitted["job_id"]
print(client.report.state(job_id))
print(client.report.summary(job_id))
# Download binary artifacts (returned as bytes)
pcap = client.report.pcap(job_id)
# Search (verdict is numeric 1-5, 5 = malicious)
client.search.terms(filetype="peexe", verdict="5")
Asynchronous
import asyncio
from hybridanalysis import AsyncHybridAnalysisClient
async def main():
async with AsyncHybridAnalysisClient.from_env() as client:
print(await client.system.version())
results = await asyncio.gather(*(client.overview.get(h) for h in hashes))
asyncio.run(main())
Errors raise subclasses of HybridAnalysisError: AuthenticationError,
NotFoundError, RateLimitError, APIError, NetworkError, and ConfigError.
Requirements
- Python 3.14+
- See pyproject.toml for dependencies and extras
Support the Project
If this project is useful in your workflows, you can support development:
License
This project is licensed under the MIT license. See LICENSE.
Attribution
- Author: Marc Rivero López | @seifreed
- Repository: github.com/seifreed/hybridanalysis
Built for practical malware analysis and security automation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hybridanalysis-0.1.2.tar.gz.
File metadata
- Download URL: hybridanalysis-0.1.2.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad18091ba8a6e6e39adeb0a0a1ed244ad0aed0a15dcfa14c0bec2c78d26255de
|
|
| MD5 |
3bd02a840dbb522a0b3194d2a88211ce
|
|
| BLAKE2b-256 |
c311ce5483a919bd249a02957cd96b1d833013c5f9a36cfda8763d4c5b591462
|
Provenance
The following attestation bundles were made for hybridanalysis-0.1.2.tar.gz:
Publisher:
release.yml on seifreed/hybridanalysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hybridanalysis-0.1.2.tar.gz -
Subject digest:
ad18091ba8a6e6e39adeb0a0a1ed244ad0aed0a15dcfa14c0bec2c78d26255de - Sigstore transparency entry: 2238276909
- Sigstore integration time:
-
Permalink:
seifreed/hybridanalysis@ae52643e2be745189b57d692e6850749ea371e91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/seifreed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae52643e2be745189b57d692e6850749ea371e91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hybridanalysis-0.1.2-py3-none-any.whl.
File metadata
- Download URL: hybridanalysis-0.1.2-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f87c12dd0a1b4f102dfefecffafefcb7cb737afb625b66824313a60d73ce11a
|
|
| MD5 |
b83e5e1abb8c52b4fcbcee476fc54021
|
|
| BLAKE2b-256 |
f363d3f160fc28c66b409ee2b13c953b701710e8d4d068b8fd88913c25dec8b9
|
Provenance
The following attestation bundles were made for hybridanalysis-0.1.2-py3-none-any.whl:
Publisher:
release.yml on seifreed/hybridanalysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hybridanalysis-0.1.2-py3-none-any.whl -
Subject digest:
1f87c12dd0a1b4f102dfefecffafefcb7cb737afb625b66824313a60d73ce11a - Sigstore transparency entry: 2238277717
- Sigstore integration time:
-
Permalink:
seifreed/hybridanalysis@ae52643e2be745189b57d692e6850749ea371e91 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/seifreed
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae52643e2be745189b57d692e6850749ea371e91 -
Trigger Event:
push
-
Statement type: