Top Related Projects
Testing TLS/SSL encryption anywhere on any port
Nmap - the Network Mapper. Github mirror of official SVN repository.
A command-line reference-implementation client for SSL Labs APIs, designed for automated and/or bulk testing.
Fast and powerful SSL/TLS scanning library.
sslscan tests SSL/TLS enabled services to discover supported cipher suites
My simple Swiss Army knife for http/https troubleshooting and profiling.
Quick Overview
testssl.sh is a command-line tool that checks a server's SSL/TLS configuration and vulnerabilities. It provides detailed information about supported protocols, ciphers, and potential security issues, making it valuable for system administrators and security professionals to assess and improve the security of their SSL/TLS implementations.
Pros
- Comprehensive analysis of SSL/TLS configurations
- No dependencies other than OpenSSL
- Supports various output formats (plain text, JSON, CSV, HTML)
- Regularly updated to include checks for new vulnerabilities
Cons
- Can be slow when scanning multiple hosts or ports
- Requires some technical knowledge to interpret results
- May produce false positives in certain scenarios
- Limited graphical interface options
Getting Started
To use testssl.sh, follow these steps:
-
Clone the repository:
git clone https://github.com/drwetter/testssl.sh.git
-
Change to the testssl.sh directory:
cd testssl.sh
-
Make the script executable:
chmod +x testssl.sh
-
Run a basic scan:
./testssl.sh example.com
For more options and advanced usage, refer to the project's documentation on GitHub.
Competitor Comparisons
Testing TLS/SSL encryption anywhere on any port
Pros of testssl.sh
- Actively maintained and regularly updated
- Comprehensive SSL/TLS testing capabilities
- Extensive documentation and community support
Cons of testssl.sh
- Can be resource-intensive for large-scale scans
- Requires some technical knowledge to interpret results
- May produce false positives in certain scenarios
Code Comparison
Both repositories contain the same codebase, as they are mirrors of the same project. Here's a sample from the main script:
#!/usr/bin/env bash
#
# testssl.sh - Testing TLS/SSL encryption anywhere on any port
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
Since both repositories are identical, there are no significant differences in the code structure or content. The testssl.sh project is a single repository mirrored in two locations, rather than two separate projects.
Nmap - the Network Mapper. Github mirror of official SVN repository.
Pros of Nmap
- Comprehensive network scanning and discovery capabilities
- Extensive scripting engine for custom vulnerability checks
- Cross-platform support (Windows, macOS, Linux)
Cons of Nmap
- Steeper learning curve for advanced features
- Can be resource-intensive for large-scale scans
- May trigger security alerts or be blocked by firewalls
Code Comparison
Nmap (using NSE script):
local shortport = require "shortport"
local sslcert = require "sslcert"
local stdnse = require "stdnse"
portrule = shortport.ssl
action = function(host, port)
local cert = sslcert.getCertificate(host, port)
return stdnse.format_output(true, cert)
end
testssl.sh:
#!/usr/bin/env bash
# Get server certificate
get_server_certificate() {
local servername="$1"
local port="$2"
openssl s_client -connect "$servername:$port" </dev/null 2>/dev/null | openssl x509 -text
}
Both tools can perform SSL/TLS analysis, but Nmap offers a more extensive set of network scanning features, while testssl.sh focuses specifically on SSL/TLS testing with a simpler, bash-based approach. Nmap's scripting engine provides more flexibility for custom checks, whereas testssl.sh is more specialized and easier to use for SSL/TLS-specific tasks.
A command-line reference-implementation client for SSL Labs APIs, designed for automated and/or bulk testing.
Pros of ssllabs-scan
- Utilizes Qualys SSL Labs' comprehensive SSL/TLS testing infrastructure
- Provides detailed grading and analysis of server configuration
- Offers a more user-friendly JSON output format
Cons of ssllabs-scan
- Relies on external servers, which may raise privacy concerns
- Can be slower due to the dependency on SSL Labs' infrastructure
- Limited to testing publicly accessible servers
Code Comparison
testssl.sh:
#!/usr/bin/env bash
# testssl.sh - Testing TLS/SSL encryption
ssllabs-scan:
package main
import (
"github.com/ssllabs/ssllabs-scan/v3"
)
Key Differences
- testssl.sh is written in Bash, while ssllabs-scan is written in Go
- testssl.sh performs local scans, while ssllabs-scan leverages SSL Labs' API
- testssl.sh offers more flexibility for testing internal systems
- ssllabs-scan provides a standardized grading system based on industry best practices
Both tools are valuable for assessing SSL/TLS configurations, but they serve different use cases. testssl.sh is better suited for local, detailed testing, while ssllabs-scan excels at providing a comprehensive, externally-validated assessment of public-facing servers.
Fast and powerful SSL/TLS scanning library.
Pros of sslyze
- Written in Python, offering better cross-platform compatibility
- Provides a more comprehensive and detailed analysis of SSL/TLS configurations
- Offers both command-line and API usage, allowing for integration into other tools
Cons of sslyze
- May be slower for quick scans compared to testssl.sh
- Requires Python and additional dependencies to be installed
- Less frequent updates compared to testssl.sh
Code Comparison
testssl.sh (Bash):
#!/usr/bin/env bash
# testssl.sh - Testing TLS/SSL encryption
sslyze (Python):
#!/usr/bin/env python3
# sslyze - Fast and powerful SSL/TLS scanning library
Both tools are designed for SSL/TLS testing, but their implementation languages differ. testssl.sh is written in Bash, making it more lightweight and easier to run on systems with Bash installed. sslyze, being Python-based, offers more advanced features and better extensibility.
testssl.sh excels in quick, command-line based scans and is often preferred for its simplicity and ease of use. It's frequently updated and maintained, ensuring compatibility with the latest SSL/TLS vulnerabilities and best practices.
sslyze, on the other hand, provides a more comprehensive analysis and is better suited for integration into other tools or automated workflows due to its API. It offers more detailed reports and can be easily extended with custom plugins.
sslscan tests SSL/TLS enabled services to discover supported cipher suites
Pros of sslscan
- Written in C, offering faster execution compared to the shell-based testssl.sh
- Provides a more concise output, focusing on key SSL/TLS information
- Easier to install and use on various systems due to its compiled nature
Cons of sslscan
- Less comprehensive in its checks compared to testssl.sh
- May not be as frequently updated or maintained as testssl.sh
- Limited customization options for scans compared to testssl.sh's extensive flags
Code Comparison
sslscan (C):
int main(int argc, char **argv)
{
struct sslCheckOptions options;
memset(&options, 0, sizeof(struct sslCheckOptions));
options.host = NULL;
options.showCertificate = false;
// ... (initialization continues)
}
testssl.sh (Shell):
main() {
if [[ -z "$1" ]]; then
help
exit $ERR_USAGE
fi
parse_cmd_line "$@"
# ... (main function continues)
}
The code snippets show the entry points for both tools. sslscan uses a C structure to manage options, while testssl.sh relies on shell scripting for parameter parsing and execution flow. This difference reflects the overall design philosophy of each tool, with sslscan focusing on performance and testssl.sh on flexibility and extensive feature set.
My simple Swiss Army knife for http/https troubleshooting and profiling.
Pros of htrace.sh
- More focused on HTTP/HTTPS analysis and debugging
- Provides detailed information about HTTP headers and redirects
- Offers a user-friendly, colorful output format
Cons of htrace.sh
- Less comprehensive SSL/TLS testing compared to testssl.sh
- Fewer options for customizing the scan process
- Not as actively maintained as testssl.sh
Code Comparison
htrace.sh:
_init_cmd
_load_config
_get_http_headers
_get_ssl_data
_show_results
testssl.sh:
initialize_globals
parse_cmd_line
prepare_logging
run_server_tests
run_client_tests
Feature Comparison
testssl.sh:
- Extensive SSL/TLS protocol and cipher suite testing
- Vulnerability checks (e.g., Heartbleed, POODLE)
- Support for multiple targets and mass scanning
htrace.sh:
- Detailed HTTP header analysis
- Visualization of redirect chains
- DNS resolution and geolocation information
Community and Support
testssl.sh:
- Large user base and active community
- Regular updates and bug fixes
- Comprehensive documentation and wiki
htrace.sh:
- Smaller community but growing interest
- Less frequent updates
- Basic documentation with room for improvement
Both tools offer valuable insights into web server configurations and security, with testssl.sh focusing more on SSL/TLS aspects and htrace.sh emphasizing HTTP analysis. The choice between them depends on the specific requirements of the user and the depth of analysis needed in each area.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Intro
testssl.sh
is a free command line tool which checks a server's service on
any port for the support of TLS/SSL ciphers, protocols as well as some
cryptographic flaws.
Key features
- Clear output: you can tell easily whether anything is good or bad.
- Machine readable output (CSV, two JSON formats), also HTML output.
- No need to install or to configure something. No gems, CPAN, pip or the like.
- Works out of the box: Linux, OSX/Darwin, FreeBSD, NetBSD, MSYS2/Cygwin, WSL (bash on Windows). Only OpenBSD needs bash.
- A Dockerfile is provided, there's also an official container build @ dockerhub and GHCR.
- Flexibility: You can test any SSL/TLS enabled and STARTTLS service, not only web servers at port 443.
- Toolbox: Several command line options help you to run your test and configure your output.
- Reliability: features are tested thoroughly.
- Privacy: It's only you who sees the result, not a third party.
- Freedom: It's 100% open source. You can look at the code, see what's going on.
- The development is free and open @ GitHub and participation is welcome.
- Unit tests ensure maturity (output is consistent, JSON is valid, runs under Linux+MacOS etc)
License
This software is free. You can use it under the terms of GPLv2, see LICENSE.
Attribution is important for the future of this project -- also in the internet. Thus if you're offering a scanner based on testssl.sh as a public and/or paid service in the internet you are strongly encouraged to mention to your audience that you're using this program and where to get this program from. That helps us to get bugfixes, other feedback and more contributions.
Compatibility
Testssl.sh is working on every Linux/BSD distribution and MacOS out of the box. Latest by 2.9dev
most of the limitations of disabled features from the openssl client are gone
due to bash-socket-based checks. An old OpenSSL-bad version is supplied but
but you can also use any LibreSSL or OpenSSL version.
testssl.sh also works on other unixoid systems out of the box, supposed they have
/bin/bash
>= version 3.2 and standard tools like sed and awk installed. An implicit
(silent) check for binaries is done when you start testssl.sh . System V needs probably
to have GNU grep installed. Windows (using MSYS2, Cygwin or WSL) work too.
Update notification can be found here or most important ones @ mastodon or bluesky. twitter is not being used anymore.
Installation
You can download testssl.sh branch 3.2 just by cloning this git repository:
git clone --depth 1 https://github.com/testssl/testssl.sh.git
3.2 is now the latest stable branch which evolved from 3.1dev. There will be one last bugfix release for the former stable version named old-stable, which will be 3.0.10.
Docker
Testssl.sh has minimal requirements. As stated you don't have to install or build anything. You can just run it from the pulled/cloned directory. Still if you don't want to pull the GitHub repo to your directory of choice you can pull a container from dockerhub and run it:
docker run --rm -ti drwetter/testssl.sh <your_cmd_line>
or from GHCR (GitHub Container Registry which supports more platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v7, linux/arm/v6, linux/ppc64le):
docker run --rm -it ghcr.io/testssl/testssl.sh <your_cmd_line>
Or if you have cloned this repo you also can just cd
to the INSTALLDIR and run
docker build . -t imagefoo && docker run --rm -t imagefoo testssl.net
For more please consult Dockerfile.md.
No Warranty
Usage of the program is without any warranty. Use it at your own risk.
Testssl.sh is intended to be used as a standalone CLI tool. While we tried to apply best practise security measures and sanitize external input, we can't guarantee that the program is without any vulnerabilities. Running as a web service may pose security risks and you're advised to apply additional security measures. Validate input from the user and from all services which are queried.
Status
This is the stable version 3.2. Please use it now, as 3.0.x will not get any updates after 3.0.10, with the current manpower we only support n-1 versions. There will be soon a separate 3.3.dev branch where further development takes place before 3.4 becomes the stable version and 3.2 becomes old-stable.
Documentation
- .. it is there for reading. Please do so :-) -- at least before asking questions. See man page in groff, html and markdown format in
~/doc/
. - https://testssl.sh/ will help to get you started.
- There's also a [https://deepwiki.com/testssl/testssl.sh](AI generated doc), see also below.
- Will Hunt provides a longer description for an older version (2.8), including useful background information.
Contributing
A lot of contributors already helped to push the project where it currently is, see CREDITS.md. Your contribution would be also welcome! There's an issue list. To get started look for issues which are labeled as good first issue, for grabs or help wanted. The latter is more advanced. You can also lookout for documentation issues, or you can help with unit testing or improving github actions.
It is recommended to read CONTRIBUTING.md and please also have a look at he Coding Convention. Before you start writing PRs with hundreds of lines, better create an issue first.
In general there's also some maintenance burden, like maintaining handshakes and CA stores etc. . If you believe you can contribute and be responsible to one of those maintenance task, please speak up. That would free resources that we could use for development.
Bug reports
Bug reports are important. It makes this project more robust.
Please file bugs in the issue tracker @ GitHub. Do not forget to provide detailed information, see the template for issues, and further details @ https://github.com/testssl/testssl.sh/wiki/Bug-reporting. Nobody can read your thoughts -- yet. And only agencies your screen ;-)
You can also debug yourself, see here.
External/related projects
Please address questions not specifically to the code of testssl.sh to the respective projects below.
AI powered docs @ DeepWiki
Web frontend
Mass scanner w parallel scans and elastic searching the results
Privacy checker using testssl.sh
Nagios / Icinga Plugins
- https://github.com/dnmvisser/nagios-testssl (Python 3)
- https://gitgud.malvager.net/Wazakindjes/icinga2_plugins/src/master/check_testssl.sh (Shell)
pentest2xlsx: generate Excel sheets from CSV
Brew package
Daemon for batch execution of testssl.sh command files
Daemon for batch processing of testssl.sh JSON result files for sending Slack alerts, reactive copying etc
GitHub Actions
Top Related Projects
Testing TLS/SSL encryption anywhere on any port
Nmap - the Network Mapper. Github mirror of official SVN repository.
A command-line reference-implementation client for SSL Labs APIs, designed for automated and/or bulk testing.
Fast and powerful SSL/TLS scanning library.
sslscan tests SSL/TLS enabled services to discover supported cipher suites
My simple Swiss Army knife for http/https troubleshooting and profiling.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot