Skip to main content

Scripting SDK for the Red Team Toolkit platform

Project description

RTT Platform Python SDK

This is the formally maintained Python SDK for interacting with a Red Team Toolkit (RTT) Platform C2 server.

This project is currently in BETA status and subject to significant change until finalized

This SDK is based on models generated from the OpenAPI specification for the latest platform server. It will continue to be updated and expanded as more features are finalized in the platform server.

Additional information can be found here

Installation

> pip install rtt-sdk

Examples

Collecting current session information

import asyncio
import rtt_sdk

async def main():
    client = rtt_sdk.SlingshotClient()
    user = await client.context_user(True)
    process = await client.context_process()
    print(f"Running as {user.username} in {process.process_id}")

asyncio.run(main())

Asyncronous Code

This SDK makes use of asyncio for executing tasks and returning results. Almost every function exposed on API clients is an asyncronous co-routine and requires an event loop for execution. The easiest way to accomplish this is to define a wrapper async main() function and use the new asyncio.run() function to establish an event loop, and execute your code within (as seen in the examples section)

Some useful primitives that can be used as part of async:

results = await foo()
await asyncio.waitfor(foo(), timeout=10)
await asyncio.gather([foo(), bar()])

More information can be found here

Requirements

  • Active RTT license and deployed RTT platform server
  • Python 3.7+

Project details


Download files

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

Source Distribution

rtt-sdk-0.2.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

rtt_sdk-0.2.0-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file rtt-sdk-0.2.0.tar.gz.

File metadata

  • Download URL: rtt-sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.11

File hashes

Hashes for rtt-sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 01574adf2bbaa9b72935e6302c5071f8cf77875fd9d50cd28b862fc8f3c27b5f
MD5 391328a1a8c4e5180c7ab5534b6aa0fb
BLAKE2b-256 68469846e722b167d68518ea575ed46fe86eb13131e82de69816b20d9b419028

See more details on using hashes here.

File details

Details for the file rtt_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rtt_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.11

File hashes

Hashes for rtt_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3bb7ff58202c6d901b1fd81c27d634aa23130bb0c5374ef54187749ecc953ee1
MD5 05df705c4c082de7d37890e4988b7a9f
BLAKE2b-256 adf3b48abe70113041a32927d0104af2d167f8226f99100fb1984c0ccafb9614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page