- How to Test a Server for TLS 1.2/1.3 Support in Linux
- 1. openssl
- 2. nmap
- 3. Testing an Accepted cipher
- 4. Online Tools for SSL/TLS Testing
- How To Use OpenSSL s_client To Check and Verify SSL/TLS Of HTTPS Webserver?
- Check TLS/SSL Of Website
- Check TLS/SSL Of Website with Specifying Certificate Authority
- Connect Smtp and Upgrade To TLS
- Connect HTTPS Site Disabling SSL2
- Connect HTTPS Only TLS1 or TLS2
- Specify Cipher or Encryption Type
- Connect HTTPS Only RC4-SHA
- Debug SSL/TLS To The HTTPS
- 🔐 Как проверить сервер на поддержку TLS на Linux
- Предпосылки
- Проверим поддержку TLS с помощью Openssl
- В дистрибутивах на основе Ubuntu / Debian:
- В дистрибутивах на основе CentOS / Red Hat:
- Проверим поддержку TLS с помощью Nmap
- В дистрибутивах на основе Ubuntu / Debian:
- В дистрибутивах на основе CentOS / Red Hat:
- Заключение
- Как узнать версию TLS и как обновить ее до TLS v1.3
- 3 ответа
- How to check TLS/SSL certificate expiration date from command-line
- How to check TLS/SSL certificate expiration date from command-line
- Check the expiration date of an SSL or TLS certificate
- Understanding openssl command options
- Finding SSL certificate expiration date from a PEM encoded certificate file
How to Test a Server for TLS 1.2/1.3 Support in Linux
To test a server for TLS 1.2/1.3 support in Linux, try these following methods.
1. openssl
OpenSSL is a full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols, and is installed on many distributions of Linux by default.
Run the following command in terminal, replacing google.com with your own domain:
If you get a certificate chain and handshake like below, you know the server in question supports TLS 1.2/1.3. If you don’t see a certificate chain, and instead something similar to “handshake error”, you know the server does not support TLS 1.2/1.3. You can also test for TLS 1 or TLS 1.1 with -tls1 or -tls1_1 respectively.
2. nmap
Nmap, or Network Mapper, is an open source Linux command line tool for network exploration and security auditing. It is not usually installed by default on Linux distributions, but you can install it by running:
Once installed, you can test a remote server for TLS support by running:
If TLS is supported, it will return the TLS version along with the ciphers supported.
3. Testing an Accepted cipher
We can also test for a particular cipher using openssl , in this case we are testing for the cipher ECDHE-RSA-AES256-SHA .
If the cipher is supported, you will see a successful handshake:
4. Online Tools for SSL/TLS Testing
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
Источник
How To Use OpenSSL s_client To Check and Verify SSL/TLS Of HTTPS Webserver?
OpenSSL provides different features and tools for SSL/TLS related operations. s_lient is a tool used to connect, check, list HTTPS, TLS/SSL related information. Simply we can check remote TLS/SSL connection with s_client . In these tutorials, we will look at different use cases of s_client .
Check TLS/SSL Of Website
The basic and most popular use case for s_client is just connecting remote TLS/SSL website. We will provide the web site with the HTTPS port number. In this example we will connect to the poftut.com .
Check TLS/SSL Of Website with Specifying Certificate Authority
If the web site certificates are created in house or the web browsers or Global Certificate Authorities do not sign the certificate of the remote site we can provide the signing certificate or Certificate authority. We will use -CAfile by providing the Certificate Authority File.
Connect Smtp and Upgrade To TLS
We can use s_client to test SMTP protocol and port and then upgrade to TLS connection. We will use -starttls smtp command. We will use the following command.
Connect HTTPS Site Disabling SSL2
HTTPS or SSL/TLS have different subversions. We can enable or disable the usage of some of them. In this example, we will disable SSLv2 connection with the following command.
Connect HTTPS Only TLS1 or TLS2
Like the previous example, we can specify the encryption version. In this example, we will only enable TLS1 or TLS2 with the -tls1_2 .
Specify Cipher or Encryption Type
We can specify the cipher with the -cipher option like below.
Connect HTTPS Only RC4-SHA
We can also specify the hash algorithm of the encryption protocol. In this example, we will only enable RC4-SHA hash algorithm for SSL/TLS connection. We will use -cipher RC4-SHA . All other encryption and Cipher types will be denied and the connection will be closed.
Debug SSL/TLS To The HTTPS
While a SSL/TLS connection is made there is a lot of operation under the hood. If we have some problems or we need detailed information about the SSL/TLS initialization we can use -tlsextdebug option like below.
Источник
🔐 Как проверить сервер на поддержку TLS на Linux
TLS – это аббревиатура от Transport Layer Security.
TLS обеспечивает безопасную связь между компьютерами в Интернете.
На момент написания этой статьи TLS 1.3 является последней версией.
В этом руководстве объясняется, как проверить, какие версии TLS ваш сервер или веб-сайт поддерживает в системе Linux, а также используемый алгоритм шифрования (Cipher).
Предпосылки
- Машина с Linux
- Пользователь с привилегиями sudo
Проверим поддержку TLS с помощью Openssl
Openssl – это инструмент с открытым исходным кодом для реализации безопасного обмена данными в Интернете.
Инструмент openssl доступен во всех основных дистрибутивах Linux.
Если инструмент openssl еще не установлен на вашем компьютере с Linux, вы можете установить его следующим образом:
В дистрибутивах на основе Ubuntu / Debian:
В дистрибутивах на основе CentOS / Red Hat:
- -tls1_2 для TLSv1.2
- -tls1_1 для TLSv1.1
- -tls1 для TLSv1
Проверим поддержку TLS с помощью Nmap
Nmap – это инструмент, который в основном используется для поиска доступных служб и портов в сети.
Выполните команду показанную ниже, чтобы установить Nmap.
В дистрибутивах на основе Ubuntu / Debian:
В дистрибутивах на основе CentOS / Red Hat:
Заключение
- Аудит ИБ (44)
- Вакансии (10)
- Закрытие уязвимостей (98)
- Книги (27)
- Мануал (1 937)
- Медиа (66)
- Мероприятия (38)
- Мошенники (22)
- Обзоры (724)
- Обход запретов (33)
- Опросы (3)
- Скрипты (106)
- Статьи (292)
- Философия (77)
- Юмор (17)
Anything in here will be replaced on browsers that support the canvas element
Источник
Как узнать версию TLS и как обновить ее до TLS v1.3
У меня есть сервер Ubuntu 16.04, и я хотел бы знать, что версия TLS уже установлена на моем сервере.
И как перейти на версию 1.3, если версия версии под v1.3
3 ответа
Хотя вы не указываете это, вы, вероятно, спрашиваете о поддержке TLS на вашем веб-сервере и / или почтовом сервере. Для распространенных серверов в Linux поддержка реализована с помощью OpenSSL. Поскольку вы используете Ubuntu 16.04, у вас по умолчанию установлена версия OpenSSL 1.0.2, которая поддерживает TLS до TLS 1.2. Но учтите, что конфигурация серверов может привести к ограничению фактической поддержки протокола.
Официального TLS 1.3 пока нет, то есть протокол еще не завершен. Ожидается, что поддержка TLS 1.3 будет доступна в OpenSSL 1.1.1, которая все еще находится в разработке.
Обнюхивание пакетов с помощью какого-либо приложения, такого как Wireshark, выявит информацию; версия протокола, используемая в соединении, указана в сообщении ServerHello или используйте инструмент http://ssl-checker.online-domain-tools.com, чтобы проверить
Я бы посоветовал вам использовать тестовый сайт SSL от Qualys. Если вы запустили свой веб-сервер с SSLProtocol +All для простого теста, он сообщит вам, какие протоколы SSLP обслуживаются вашими страницами, и даст рекомендации о том, какие из них следует и не следует использовать.
Кстати, я сделал повторяющуюся задачу для проверки своих сайтов; Даже сегодня я нашел что-то, что изменилось с тех пор, как я последний раз проверял 3 месяца назад.
Источник
How to check TLS/SSL certificate expiration date from command-line
H ow do I check the TLS/SSL certificate expiration date from my Linux or Unix shell prompt? How can I find the TLS certificate expiry date from Linux or Unix shell scripts?
We can quickly solve TLS or SSL certificate issues by checking the certificate’s expiration from the command line. Let us see how to determine TLS or SSL certificate expiration date from a PEM encoded certificate file and live production website/domain name too when using Linux, *BSD, macOS or Unix-like system.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | No |
Requirements | openssl command on Linux, macOS, *BSD or Unix-like OS |
Est. reading time | 3 minutes |
How to check TLS/SSL certificate expiration date from command-line
To check the SSL certificate expiration date, we are going to use the OpenSSL command-line client. OpenSSL client provides tons of data, including validity dates, expiry dates, who issued the TLS/SSL certificate, and much more.
Check the expiration date of an SSL or TLS certificate
Open the Terminal application and then run the following command:
$ openssl s_client -servername < SERVER_NAME >-connect < SERVER_NAME >: < PORT >| openssl x509 -noout -dates
$ echo | openssl s_client -servername < SERVER_NAME >-connect < SERVER_NAME >: < PORT >| openssl x509 -noout -dates
Let us find out expiration date for www.nixcraft.com, enter:
Sample outputs indicating dates and other information:
Add the echo command to avoid pressing the CTRL+C. For instance:
OpenSSL in action: Check the TLS/SSL certificate expiration date and time
Understanding openssl command options
The openssl is a very useful diagnostic tool for TLS and SSL servers. The openssl command-line options are as follows:
- s_client : The s_client command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS.
- -servername $DOM : Set the TLS SNI (Server Name Indication) extension in the ClientHello message to the given value.
- -connect $DOM:$PORT : This specifies the host ( $DOM ) and optional port ( $PORT ) to connect to.
- x509 : Run certificate display and signing utility.
- -noout : Prevents output of the encoded version of the certificate.
- -dates : Prints out the start and expiry dates of a TLS or SSL certificate.
Finding SSL certificate expiration date from a PEM encoded certificate file
The syntax is as follows query the certificate file for when the TLS/SSL certifation will expire
$ openssl x509 -enddate -noout -in$ openssl x509 -enddate -noout -in /etc/nginx/ssl/www.cyberciti.biz.fullchain.cer.ecc
$ openssl x509 -enddate -noout -in /etc/nginx/ssl/www.nixcraft.com.fullchain.cer
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
We can also check if the certificate expires within the given timeframe. For example, find out if the TLS/SSL certificate expires within next 7 days (604800 seconds):
$ openssl x509 -enddate -noout -in my.pem -checkend 604800
# Check if the TLS/SSL cert will expire in next 4 months #
openssl x509 -enddate -noout -in my.pem -checkend 10520000
Finding out whether the TLS/SSL certificate has expired or will expiery so within the next N days in seconds.
Источник