Exclusive access to integrating private tools into the Trickest platform is provided solely for Enterprise users. If you are interested in learning more about the Enterprise Edition, please contact us.
About Private Tools
Private Tools in Trickest allow for a tailored approach to security operations. Unlike public tools, private tools can be fully customized to meet specific automation needs and are not visible to the public within the Trickest Library. This feature enhances cybersecurity operations teams to tailor their security workflows with private CLI (Command Line) tools. Private tools is coming with Private Docker Registry. If you are interested in learning more check out Private Registry Tutorial.
Features and Benefits of the Private Tools
- Secured Environment: The Private tab ensures that the tools you import remain confidential and are not exposed to the public, safeguarding your custom solutions.
- Customization: It allows users to import and configure tools tailored to their unique operational needs, essential for specialized tasks that off-the-shelf software cannot address.
- Easy Management: Users can easily manage all of their private tools in one centralized location, simplifying the process of updating, configuring, and monitoring the usage of each tool.
- Integration:* Private tools can be integrated into custom workflows within the Trickest platform, providing the same automation and efficiency as public tools.
Prerequisites
Before proceeding, make sure you have:- A Trickest account with access to private tool import enabled.
- Trickest Client installed
- The tool you wish to import, compliant with Trickest’s specifications
- Basic familiarity with Trickest workflows.
Accessing the Library
After logging into your Trickest account, locate and click on the Library button in the navigation menu. You will see two primary tabs within the Library:Public
and Private
.
With private tooling, your entire team gains clear visibility into the tools being used and detailed insights on the authors and users of these tools, fostering transparency and collaboration across your projects.
Viewing Your Private Tools
Once in the Private section, you will have a grid of all the imported tools. If this is your first visit or you have not yet imported any tools, this area may be empty.
Tool Details and Management
Click on the tool’s card to manage or get more information about a specific tool. This will take you to a screen to see the tool’s description, version, and configuration options. Dockerfile and Trickest YAML Each tool will typically consist of files organized in a specific structure to ensure compatibility with Trickest’s system. Tool File Structure Overviewrun.sh
If the tool you use only supports stdin
as an input, check out Parameterizing stdin/stdout where you will learn how to create run.sh
and configure the tool to be compatible with Trickest platform.
It is important to remember to copy run.sh it to your Docker image and configure it as the image ENTRYPOINT
/hive/in
and /hive/out
in the final image. These will be used by the platform to store and manage the tool’s input/output.
Check out Arhitecture’s Inputs and Outputs to learn more about the file structure
- Compiled languages (e.g. golang)
- Python
-
You should almost always use
python:<version>-slim.
This is a variant that has less packages installed, resulting in a smaller image. - If you run into any problems with -slim, the official image should be your second choice.
-
Try to stay away from
alpine
, because it might cause some unexpected issues. - Tagging
trickest.yaml
file is essential for integrating tools into the Trickest platform, specifically designed for the Workflow Editor. This YAML file contains all the necessary data for the tool to be displayed appropriately and configured within the platform.
Overview of trickest.yaml Structure
The YAML file is structured to provide comprehensive details about the tool, including its functionality, usage, and output handling. Below is a detailed explanation of each field in the trickest.yaml file:
Example trickest.yaml
Name | Description | Required | Example |
---|---|---|---|
name | Name of the tool | Yes | amass |
description | Short description of the tool. The “About” section of GitHub is an excellent starting point if available | Yes | The OWASP Amass Project performs network mapping of attack surfaces and external asset discovery using open source information gathering and active reconnaissance techniques. |
category | High-level category of the tool | No | Recon |
source_url | Original repository’s URL | Yes | https://github.com/OWASP/Amass |
Name | Description | Required | Example |
---|---|---|---|
docker_image | Docker image URL. We use quay.io for hosting images | Yes | quay.io/trickest/amass:v3.10.5 |
command | Command that should be executed on the container when the node runs | Yes | /bin/amass enum |
output_parameter | Command line parameter that designates the tool’s output path | Yes | -o |
output_type | Output type (file or folder) | Yes | file |
license_info.name | Name of the tool’s license | Yes | Apache 2.0 |
license_info.url | URL of the tool’s license | Yes | https://github.com/OWASP/Amass/blob/main/LICENSE |
The docker_image value should always use a Versioning Conventions. Never use
:latest.
Name | Description | Example |
---|---|---|
command | Command line parameter used by the tool | -d |
name | Name to identify the parameter in the node | domain |
parameter_type | Type of the parameter (string, file, folder, or boolean) | string |
description | Short description of the parameter | Domain names separated by commas |
order | The index of the parameter. The order is followed when building the final command | 0 |
Versioning Conventions
Part of our quest for keeping workflows stable is proper versioning of the tools. It’s important to provide users with the latest and greatest updates to their tools by default but also allow them to revert to a previous version if need be. You must always tag your image before pushing it in at least one of the following ways: Git Commit Short Hash This is the recommended way that should be used for all tools as it’s a unique value and you can easily use it to match a container image to its source. If a tool is hosted on a public git repository, it should use this convention by default, preferably in addition to the others listed below.- If a tool has more than one active branch (e.g. main and dev), each branch should be treated as a separate tool.
- If a tool has more than one active fork, each one should be treated as a separate tool.
- No new tags should be created unless the code on the original repo (referenced in source_url in trickest.yaml) changes. Updates anywhere else should keep the same tag.
Parameterizing STDIN/STDOUT
The platform currently needs explicit command line parameters for input and output:STDIN/STDOUT
:
@
is a list of all the input parameters passed to the script.${@: 1:1}
follows the format${@: START:COUNT}
, which means “starting from the parameter atSTART
(index 1 here), getCOUNT
(1 in this case) parameters,” which is practically equivalent to$1
, the first parameter.- The first command
cat "${@: 1:1}"
will output the content of the file passed in the first parameter. $#
refers to the number of parameters passed to the script.tool "${@: 2:$#-2}"
passes all the parameters totool
except the first and last one.tee "${@: $#:1}"
passes the last command totee
.
STDIN
but accepts an output parameter, i.e., the original command follows this format:
STDOUT
, i.e., the original command follows this format:
STDIN
and writes the output to STDOUT
, i.e., the original command follows this format:
run.sh
and add it to the module’s folder (don’t forget to add the shebang #!/bin/bash
).
trickest.yaml
Main command
Use the script in the command
parameter.
Parameters
The input and output parameters must be adjusted as follows:
- The
output_parameter
should be set to>
. - The
output_type
should be set tofile
. - The input parameter’s command should be left empty.
run.sh
script should be copied to the docker image on build and used as an ENTRYPOINT
.
Example Tool Configuration and Import
trickest.yaml Thetrickest.yaml
file is a structured configuration that defines how a tool will be integrated and function within the Trickest platform.
This file includes essential details like the tool’s name, description, category, and technical specifics such as the Docker image URL and command execution parameters. It serves as a blueprint for the Trickest system to recognize and properly handle the tool, ensuring it operates seamlessly within your workflows.
Dockerfile
is essential for defining the environment in which your tool will run. It specifies the base image, necessary dependencies, build instructions, and how the tool should be executed. The Dockerfile ensures that your tool can be consistently deployed and run within the Trickest platform, regardless of the underlying infrastructure.
docker login
command to authenticate with the Docker registry where you intend to push your image.
docker build
command:
username
, tool-name
, and tag
with your Docker registry username, your tool’s name, and the image’s version or tag.
Push the Image to the Registry
After successfully building the image, push it to the Docker registry using docker push
:
cd
command to navigate to the directory where your trickest.yaml
file is located.
Run the Create Command
You will need to either pass your
TRICKEST_TOKEN
to Trickest CLI or have it set as an environment variable. You can find your token at this pageReplace
tool.yaml
with the path to your YAML file.Trickest-CLI
:
-
Update Tool: To update the tool, modify your
trickest.yaml
file and then run: -
List Tools: To list all your private tools, use:
Add
--json
to display the output in JSON format. -
Delete Tool: If you need to delete a tool, use: