Skip to main content

Simulate a TLS client and scan a TLS server

Project description

Build Status Coverage License Black

tlsmate

Overview

This project provides a python framework for simulating TLS endpoints. It provides a comfortable way of creating arbitrary TLS handshake scenarios and executes the scenarios against TLS servers or clients (well, at the current state of the project only client simulations are supported).

A plugin is provided which scans a TLS server for its configurations (i.e., support of TLS protocol versions, cipher suites, and much more) as well as for some commonly known TLS vulnerabilities.

A word of warning

This package is intended for test purposes only. Never ever use it to transmit sensitive data! Here are some reasons:

  • secret keying material isn’t appropriately protected, e.g., it is not deleted when not used anymore. Such sensitive data are even logged for debugging purpose.

  • quite a lot of checks are missing which are essential for productive use cases.

  • random values are not always random

  • side channels? Probably there are some.

  • Extensive tests and proven in practice? No!

  • etc.

Features

tlsmate comes with its own TLS protocol stack implementation. For a list of supported TLS protocol elements refer to TLS features .

The following basic features are supported:

  • TLS versions: SSLv2 (rudimentary only), SSLv3, TLS1.0, TLS1.1, TLS1.2, TLS1.3

  • arbitrary L4-ports are supported

  • customized trust store for root certificates

  • client authentication

  • certificate revocation check by CRL and via OCSP

  • scan result is provided as JSON/Yaml format to simplify tool-based post-processing

  • plugin concept for either proprietary test cases or for extending the scanner plugin

  • writing keying material to a key logging file to allow wireshark to decode encrypted packets

  • configuration of tlsmate through an ini-file or through environment variables

  • slowing down a scan to circumvent rate limitings

  • several logging levels

For creating customized handshake scenarios the following features are provided:

  • TLS messages can be sent/received in any arbitrary order

  • all TLS message parameters can be set to any arbitrary value

  • sending and receiving application data

  • predefined client profiles (legacy, interoperability, modern, TLS1.3-only)

  • basic settings (version, ciphersuites, etc.) can be taken from the server profile to minimize interoperability issues with the server

  • different levels for defining a handshake: from a one liner for the complete handshake to defining the deepest bit in a message

  • various conditions when waiting for a message (timeout, optional message)

  • background handling of some messages (e.g., NewSessionTicket)

  • simple python API to use tlsmate from other python applications

The following features are currently not yet supported but will likely be added in the future:

  • proxy support

  • simulating a TLS server (thus allowing to test TLS clients)

  • scan for more vulnerabilities

Installation

This package requires Python3.6 or higher. The recommended way installing tlsmate is using pip:

$ pip install tlsmate

Basic usage

For a full documentation of the tlsmate command refer to the documentation here. There you will find a detailed description how to use the package directly from other python applications.

In the following only some basic examples for using the CLI are given. Use the tlsmate --help command to get all supported subcommands. Well, currently there are not that many.

$ tlsmate scan --progress mytlsmatedomain.net

This command will perform a TLS scan against the domain mytlsmatedomain.net, and the result will be displayed as colored console output.

Using the tlsmate library from other python applications is described in the Python API documentation.

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

tlsmate-1.0.0rc1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

tlsmate-1.0.0rc1-py3-none-any.whl (152.4 kB view details)

Uploaded Python 3

File details

Details for the file tlsmate-1.0.0rc1.tar.gz.

File metadata

  • Download URL: tlsmate-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for tlsmate-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 a32b21c6f60b6c0377634ef3c3a928edf4257e010b57b6a57b7d974895baceba
MD5 b2790e5fba87df66bdfe9cb50b4a3ccb
BLAKE2b-256 e085fa00c20c6002cb055bc43854a9abfdc5e7ade2c4df4f235a19e967385a0e

See more details on using hashes here.

File details

Details for the file tlsmate-1.0.0rc1-py3-none-any.whl.

File metadata

  • Download URL: tlsmate-1.0.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 152.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

File hashes

Hashes for tlsmate-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4555c6845157bfef8c60da3867e491b908f3d4e1ddcff302d63162629384a64
MD5 404e934b714b459d2ccd74791ecb9682
BLAKE2b-256 db88bfa830e1d41a2f384d5ce964f9068772740d61886f3f790fc97fcdc00c4e

See more details on using hashes here.

Supported by

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