Skip to main content

Generaptor

Status Powered By: EDF License: MIT

CLI generator for Velociraptor offline collector


Demo

Introduction

Generaptor is a platform-agnostic command line tool to generate a Velociraptor offline collector based on pre-configured or customizable collection profiles.

All platforms (Linux, Windows and Darwin) can generate collectors for all targets (Linux, Windows and Darwin), there is no limitation thanks to Python on the generation side and velociraptor on the configuration repacking side.


Getting Started

Generaptor releases are available on Github and Pypi. The setup is the same for Linux, Windows and Darwin as long as Python 3.12+ is installed and available through the PATH environment variable. Using a Python virtual environment is recommended.

# Setup generaptor w/o interactive cli
python3 -m pip install generaptor
# Setup generaptor w/ interactive cli
python3 -m pip install generaptor[pick]
# Setup certifi (Darwin only)
python3 -m pip install certifi
# Setup configuration files and fetch latest stable release of velociraptor
generaptor update
# Create a collector for windows for instance
generaptor generate -o /tmp/generaptor windows
# Keep the private key secret in a password vault to be able to decrypt the archive
# /tmp/generaptor now contains a collector and its configuration file
# Perform collection on target
# Then retrieve collection archive and extract
generaptor extract \
           -o /tmp/collection \
           /tmp/generaptor/*.key.pem \
           Collection_*.zip
# Check integrated help for more options
generaptor -h
generaptor generate -h
generaptor generate linux -h
generaptor generate windows -h
generaptor generate darwin -h

Configuration

Generaptor can use optional configuration files put in $HOME/.config/generaptor directory to generate collectors.

Target and rules can be extended using this configuration directory.

VQL templates can also be modified to add custom artifacts or modify the collector behavior. Please refer to Velociraptor documentation to learn how to master VQL and write your own configuration files.

After starting generaptor for the first time, you can use the following commands to initialize the configuration directory

# Add variables for directories in current environment
export CACHE="${HOME}/.cache/generaptor"
export CONFIG="${HOME}/.config/generaptor"
# Create custom files and add some lines
generaptor new-rule etc_hosts sys_config /etc/hosts file |
    tee "${CONFIG}"/linux/rules.jsonl |
    jq
generaptor new-target sys_config $(jq -r .guid "${CONFIG}"/linux/rules.jsonl) |
    tee "${CONFIG}"/linux/targets.jsonl |
    jq
generaptor new-profile sys_config $(jq -r .guid "${CONFIG}"/linux/targets.jsonl) |
    tee "${CONFIG}"/linux/profiles.jsonl |
    jq
# Copy VQL templates then edit as needed
cp "${CACHE}/config/linux/collector.yml.jinja" "${CONFIG}/linux/"

License

Distributed under the MIT License.


Contributing

Contributions are welcome. See CONTRIBUTING.md.

Past contributors (until version 10.0.2)


Security

To report a (suspected) security issue, see SECURITY.md.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

generaptor-17.0.0-py3-none-any.whl (207.1 kB view details)

Uploaded Python 3

File details

Details for the file generaptor-17.0.0-py3-none-any.whl.

File metadata

  • Download URL: generaptor-17.0.0-py3-none-any.whl
  • Upload date:
  • Size: 207.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for generaptor-17.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef2f53fd0c8c85dd8a2aae0b48755ac2f05e5f5efa5a23aa10f83766dd56fa2
MD5 ec1939bd2443f08301e763f4f6ea1c9a
BLAKE2b-256 c0c0ff1e121a81443c0deb3b277959c8307f699a649cbe0ede9808ef36159cfd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

17.0.0 This release

1 file

16.1.0

1 file

16.0.0

1 file

15.4.0

1 file

15.3.0

1 file

15.2.0

1 file

15.1.2

1 file

10.0.2

1 file

9.1.2

1 file

9.1.1

1 file

6.0.4

1 file

3.1.2

1 file

3.1.1

1 file

3.0.2

1 file

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