Generaptor
CLI generator for Velociraptor offline collector
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.
Metadata
Release files for generaptor 17.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| generaptor-17.0.0-py3-none-any.whl | Python 3 | none | any | Details for generaptor-17.0.0-py3-none-any.whl |
Release files / generaptor-17.0.0-py3-none-any.whl
| Download URL | generaptor-17.0.0-py3-none-any.whl |
|---|---|
| Size | 207.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ef2f53fd0c8c85dd8a2aae0b48755ac2f05e5f5efa5a23aa10f83766dd56fa2
|
|
BLAKE2b-256 checksum How to use checksums |
c0c0ff1e121a81443c0deb3b277959c8307f699a649cbe0ede9808ef36159cfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for generaptor 17.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.