Skip to content

Introduction to Tuoni server Plugins

One of the cornerstones of the Tuoni C2 framework is its modular plugin architecture, which simplifies the implementation of new features. This architecture supports both first-party and third-party plugins. All listeners, commands, and payloads available out of the box for Tuoni are, in fact, plugins.

This documentation covers the various types of plugins, how to implement your own, and best practices for plugin development.

Disclaimer

ShellDot is not responsible for any harm caused by third-party plugins. Please carefully verify any third-party plugin that you use. Tuoni is strictly an educational and training tool. ShellDot does not endorse and actively discourages the development of plugins intended to cause monetary or other damages to individuals or organizations.

Backwards Compatibility

Warning

The Tuoni plugin SDK is under active development. While the ShellDot team strives to maintain backwards compatibility between SDK versions, we cannot guarantee that breaking changes won’t occur before version 1.0.0. In such cases, we will first deprecate the changing functionality in one release before removing it entirely.

When developing a plugin, please update to new SDK versions as they are released and refactor any code with deprecation warnings. This documentation will be updated with guides on how to migrate to new SDK versions.

Plugin Types

Currently, there are three types of plugins supported by the Tuoni Plugin SDK:

  • Command Plugins - Provide command templates for sending commands to agents.
  • Listener Plugins - Offer functionality to create listeners that communicate with agents.
  • Payload Plugins - Provide payload templates for generating payloads to create and start agents.

Each plugin can only be of one type; it is not possible for a plugin to simultaneously be a Command Plugin and a Listener Plugin. However, there is some overlap between the types. For example, Listener Plugins can also provide command templates if it makes sense for the listener type to have its own command for communication or relaying purposes.

Command Plugins

Command plugins in the Tuoni C2 framework are designed to provide the Tuoni server with Command Templates. These templates allow users to define new commands that can be sent to agents, facilitating customized agent-server interactions.

Command Templates provide users with a name, description, and configuration schema. Commands can have background logic and threads. Agent-side commands may be native commands implemented by the agent, legacy shellcode, or ExecUnits in a supported format such as a .NET assembly or native library. The plugin prepares executable code and configuration where needed and parses results sent back by agents.

Command Plugins do not handle transport between the server and agents; Listener Plugins manage that connection.

Listener Plugins

Listener plugins create listeners that manage communication with agents. Depending on the listener and payload, they can supply agent-side shellcode or a listener ExecUnit. Listeners track connected agents and relay commands and results.

Types of Listener Plugins:

  • Shellcode Listener - Provides shellcode for payloads that communicate with the listener. The agent's capabilities and the command plugin determine which command formats the server can send; the listener's shellcode format does not restrict commands to shellcode.

  • ExecUnit Listener - Provides a listener ExecUnit in a format supported by the payload, such as a .NET assembly or a native library. The payload embeds or launches this listener code to establish communication with the C2.

  • Generic Shell Listener - Expects agents that connect to it to not be initiated from Tuoni payloads and to have no inherent knowledge of Tuoni’s inner workings. Suitable for basic shell interactions, such as with netcat. The server can only send generic commands to agents of this listener.

  • External Listener - Facilitates communication with external integrations. Similar to Generic Shell Listeners in that it does not provide shellcode and does not rely on Tuoni payloads. Agents connected through this listener are expected to understand and interact with Tuoni, unlike generic shell listeners. Useful for managing other C2 frameworks and their agents via the Tuoni API/UI or for creating agents in environments where shellcode is not applicable (e.g., Python, JavaScript, or browser-based agents).

Payload Plugins

Payload plugins provide the Tuoni server with Payload Templates. These templates allow users to define new payloads that can be used to create agent executables.

Payload templates specify architecture and operating-system compatibility and which listener code formats they support. A generated payload can include legacy listener shellcode or a compatible listener ExecUnit; the agent then uses that listener code to connect to the C2 and receive commands.