Commit Graph
100 Commits
Author SHA1 Message Date
Dirk WetterandGitHub e62a9b8446 Merge pull request #1721 from drwetter/run_ws_default_fix
Winshock should now run also per default
2020-09-09 15:30:05 +02:00
Dirk Wetter 2bdcdd5371 Winshock should now run also per default 2020-09-09 15:29:12 +02:00
Dirk WetterandGitHub 4a120d9a45 Merge pull request #1720 from drwetter/winshock_fingerprint_improvements
Remove false positive for winshock bc of wrong protocol
2020-09-09 13:22:07 +02:00
Dirk Wetter 023005f011 remove false positive for winshock bc of wrong protocol
Also a cipher exclusion list was added, see #1719
2020-09-09 12:15:23 +02:00
Dirk WetterandGitHub edf669711f Merge pull request #1718 from drwetter/winshock
New feature: winshock
2020-09-08 22:11:36 +02:00
Dirk Wetter 0e54075a6a Reverse double dash option for vulnerabilities (cmd line) 2020-09-08 22:09:57 +02:00
Dirk Wetter 1f8e65104c Add winshock to documentation 2020-09-08 22:08:05 +02:00
Dirk WetterandGitHub 794bbe30af Merge pull request #1710 from tosticated/3.1dev
Added check for certificate validity longer than 398 days
2020-09-08 15:37:07 +02:00
Dirk Wetter fe7b51a3e2 remove hint in winshock 2020-09-08 13:42:50 +02:00
Dirk Wetter a1a0605082 add winshock 2020-09-08 13:42:33 +02:00
Dirk Wetter a511da4ce8 New feature: winshock
This commit implements a detection of Winshock from 2014 (aka MS14-066, CVE-2014-6321).

It does that by analyzing
* the ciphers supported -- MS' rollup patch introduced new GCM ciphers
* AND grabbing the server banner which should match IIS 8.0 oder IIS 8.5

Admittedly this is not a strong detection. But it worked in the cases I tested
(no RDP  yet). The other known method remotely testing for it against IIS is
using a patched openssl binary (see https://github.com/drwetter/testssl.sh/issues/331#issuecomment-211534954)
-- the diff "jules" (hi) provided a while back. That seems to stem from securitysift
albeit his decription was not complete and he didn't provide a PoC (I've
seen also polarssl +  a little bit of python here: https://vimeo.com/112089813

The catch is securitysift's method, is not as trivial to implement and it dosses the
sass.exe process, see: http://www.securitysift.com/exploiting-ms14-066-cve-2014-6321-aka-winshock/.

* Todo: man page

This commit also removes -BB from the help. We haven't settled yet finally
where we go with short options for the cmd line for vulnerabilities. One
is for sure though: Using one letter uppercase doesn't scale. As winshock
can be executed with --WS and --winshock --BB brings that in line. For now
also -BB works (as -WS) but it isn't advertised anymore.
2020-09-08 12:37:50 +02:00
Dirk WetterandGitHub b6bab1e1b5 Merge pull request #1715 from drwetter/not_run_allciphers_et_al
Modify default for full 9 yrds run
2020-09-07 21:17:01 +02:00
Dirk Wetter e5d0b3eeac Modify default for full 9 yrds run
We don't need to execute run_cipher_per_proto() in addition here
2020-09-07 09:54:34 +02:00
Dirk WetterandGitHub d424b0c649 Merge pull request #1711 from dcooper16/fix1699
Fix #1699
2020-08-31 17:08:10 +02:00
Dirk WetterandGitHub 09fb279510 Merge pull request #1707 from geert-hendrickx-be/3.1dev
`hostname` is not defined by POSIX, use portable `uname -n` instead.
2020-08-26 18:59:43 +02:00
Dirk WetterandGitHub b4cbe7674a Merge pull request #1704 from drwetter/add_ca_dir
Allow dir with PEM files for --add-CA
2020-08-20 09:19:25 +02:00
Dirk Wetter ecc6cd8160 Allow dir with PEM files for --add-CA
Idea which popped up while following #1700
2020-08-18 21:52:59 +02:00
Dirk WetterandGitHub 565c93e53b Merge pull request #1703 from drwetter/rapydblok
Add https://inspect.rapydblok.com
2020-08-14 10:21:36 +02:00
Dirk WetterandGitHub 7830a22b27 Merge pull request #1702 from drwetter/unrecognized_option--version
Phrase cmd line option "--version" & friends as standalone
2020-08-14 10:20:48 +02:00
Dirk e76de12047 Add https://inspect.rapydblok.com
Fixes #1689
2020-08-13 20:58:15 +02:00
Dirk Wetter 1d954233bd Document is in utf-8
See #1701
2020-08-13 20:43:54 +02:00
Dirk Wetter 953e1bd0ff Phrase --version & friends as standalone
This PR fixes #1671.

Primarily there's now an additional case statement in the main while loop
which just calls fatal() when it detects --help -b --banner -v or --version.

The documentation was also updated to reflect that.

(Some grammar and other errors which I stumbled over were corrected too)
2020-08-13 20:41:57 +02:00
Dirk WetterandGitHub a2929211b2 Merge pull request #1697 from drwetter/no_starttls_detection2
Trying to address no STARTTLS offerings (2)
2020-08-11 16:27:24 +02:00
Dirk WetterandGitHub ee7a21ef76 Merge pull request #1698 from drwetter/mitigate_javastore4rating
Don't penalize rating for CAs which aren't in the Java store
2020-08-11 16:25:25 +02:00
Dirk Wetter 1915a7b624 STARTTLS 2020-08-11 15:41:20 +02:00
Dirk Wetter 4653613211 Add mitigate_javastore4rating 2020-08-11 15:36:43 +02:00
Dirk Wetter c4841c83eb Don't penalize rating for CAs which aren't in the Java store
This fixes #1648.

Java store doesn't seem to be as complete. No downgrading of trust rating
to T but we still need to raise a red flag for some Java clients
2020-08-11 15:30:53 +02:00
Dirk Wetter ac6b64ce36 Trying to address no STARTTLS offerings (2)
This PR will replace #1566. It addresses that if the server side doesn't show STARTTLS
testssl.sh should exit and label it accordingly (see #1536).

For this to achieve starttls_just_send() was were changed so that a return value from of 3
signals the STARTTLS pattern wasn't found is passed back to the parent fd_socket() whcih
will then act accordingly.

Also:
  * starttls_full_read() + starttls_just_send() were improved for readability and debugging.
  * The caller of starttls_full_read() + starttls_just_send() had redundant indentations which were moved to the callee
  * minor bugs were squashed (e.g. ``fd_socket()``'s return values =!0 always  were referring to STARTTLS also when no STARTTLS was requested)

This was tested (negative + test and positive) for FTP and SMTP which worked as expected. For POP, IMAP and NNTP it should work
accordingly but I had trouble finding a server whcih DID NOT support STARTTLS.

All other protocols basically should also cause testssl.sh to bail out but haven't been tested either. However
here starttls_io() won't return 3. It returns 1 in a case of problems. It uses NR_STARTTLS_FAIL. If it's encountered 2+
times that STARTTLS fails it early exists using fatal(). So we maybe want to consider changing starttls_io() in the future
to also use return 3 in the case STARTTLS is not offered.
2020-08-11 12:01:28 +02:00
Dirk WetterandGitHub 186dcfa735 Merge pull request #1696 from dcooper16/fewer_external_function_calls
Use fewer external function calls
2020-08-07 13:17:38 +02:00
Dirk WetterandGitHub d2a44122f2 Merge pull request #1693 from drwetter/more_verbose_starttls
Better debugging of STARTTLS commands
2020-08-04 22:12:36 +02:00
Dirk WetterandGitHub 2e6f912cef Merge pull request #1694 from dcooper16/alpn_grease
Align ALPN GREASE test with RFC 8701
2020-08-04 22:11:12 +02:00
Dirk WetterandGitHub 4da37d9ece Merge pull request #1695 from dcooper16/etls_ossl30
Update ETSI ETS test
2020-08-04 22:06:23 +02:00
Dirk e8a930088c Better debugging of STARTTLS commands
Improved:

* readability of my old code
* readability of debugging statements
* honor $SNEAKY for SMTP greeting
* hook (arg2 to starttls_smtp_dialog() ), if we plan to add / replace SMTP greeting at some point
2020-08-03 23:11:00 +02:00
Dirk WetterandGitHub c3fbc52c07 Merge pull request #1692 from dcooper16/grease_update
Update GREASE reference
2020-08-03 17:17:58 +02:00
Dirk WetterandGitHub 57c2ab1ba1 Merge pull request #1690 from a1346054/3.1dev
Fix minor spelling issue
2020-08-03 08:29:45 +02:00
Dirk WetterandGitHub 7f071ddbb9 Merge pull request #1688 from drwetter/squash_GOST_msg
Squash "No engine or GOST support via engine..."
2020-07-20 20:14:37 +02:00
Dirk 161567f9d2 add quotes 2020-07-20 20:13:41 +02:00
Dirk WetterandGitHub 43c62b13d9 Merge pull request #1687 from drwetter/polish_1686
Polish completion of json/csv output
2020-07-20 15:54:56 +02:00
Dirk a51a0a73a7 Squash "No engine or GOST support via engine..."
This is a legacy warning and seems only needed in a very few cases
whereas in other few cases we don't issue such warnings. So to be
consistent it's right to remove this message as it confuses users
unnecessarily,

It'll appear in debug mode though.

See https://github.com/drwetter/testssl.sh/issues/1119#issuecomment-656271849
2020-07-20 11:43:52 +02:00
Dirk 86c730b74e Polish completion of json/csv output
To be more consistent with the screen output:

* grade --> overall grade
* add rating doc url
2020-07-20 11:34:44 +02:00
Dirk WetterandGitHub 1f388d8b94 Merge pull request #1686 from magnuslarsen/3.1dev
[Rating] Added complete json/csv output
2020-07-20 11:28:35 +02:00
Dirk WetterandGitHub 00779eb639 Merge pull request #1685 from dcooper16/bad_ocsp
Check for bad OCSP intermediate certificates
2020-07-16 19:50:48 +02:00
Dirk WetterandGitHub 19f2c2872a Merge pull request #1680 from drwetter/badocspcert
Implementation of hanno's bad OCSP intermediate CA detector
2020-07-15 11:51:34 +02:00
Dirk d07d1f102e Works now
* open: generation of intermediate certificate files. We do that
  at several places. But for some reasons I do not understand currently
  we remove those files.
* we don't name the offending certificate
2020-07-14 23:42:06 +02:00
Dirk eb7b0c9644 add hash file 2020-07-14 22:26:23 +02:00
Dirk 903eeec97b Start of implementing of hanno's bad OCSP intermediate CA detector
see https://github.com/hannob/badocspcert
2020-07-14 22:23:11 +02:00
Dirk WetterandGitHub 41ac04ef27 Merge pull request #1677 from drwetter/breach2medium
Revised risk for BREACH --> medium
2020-07-10 19:56:53 +02:00
Dirk cec5726f30 Revised risk for BREACH --> medium 2020-07-10 19:52:47 +02:00
Dirk WetterandGitHub b941d7db4a Merge pull request #1674 from dcooper16/rate_ciphers_in_json
Include cipher quality in JSON and CSV
2020-07-10 12:34:06 +02:00
Dirk WetterandGitHub 6071ae9883 Merge pull request #1672 from dcooper16/fix_unrecognized_option
Fix printing of unrecognized option
2020-07-07 15:53:49 +02:00
Dirk WetterandGitHub d881140cac Merge pull request #1669 from dcooper16/separate_pr_cipher_quality
Separate pr_cipher_quality() into two functions
2020-07-07 08:36:31 +02:00
Dirk WetterandGitHub 9122ffec1d Merge pull request #1668 from drwetter/1657_polish
Polish STARTTLS rating output
2020-06-26 10:02:23 +02:00
Dirk Wetter 7c75993746 remove unused spaces var 2020-06-25 20:54:43 +02:00
Dirk Wetter 288223c707 Polish STARTTLS rating output
Moved the sentence ~i "A grade better than T would lead to a false sense of security"
to the documentation. No reason for excuses in the output. ;-) Explanation fits
better in the doc.

See also #1657
2020-06-25 20:47:51 +02:00
Dirk WetterandGitHub ae72592959 Merge pull request #1666 from dcooper16/fix1665
Fix #1665
2020-06-25 20:45:19 +02:00
Dirk WetterandGitHub b1f64a50df Merge pull request #1663 from dcooper16/fix1662
Fix #1662
2020-06-25 13:39:58 +02:00
Dirk Wetter b2d41330e0 port typo fixes to html and roff doc 2020-06-25 13:05:47 +02:00
Dirk WetterandGitHub 55f7f7d69a Merge pull request #1657 from magnuslarsen/3.1dev
[Rating] STARTTLS output styling
2020-06-24 09:51:21 +02:00
Dirk WetterandGitHub 3c30887f39 Merge pull request #1659 from csett86/wireshark-android-7-0
Add wiresharked Android 7.0 (native)
2020-06-24 09:49:24 +02:00
Dirk WetterandGitHub e9d6462ee9 Merge pull request #1656 from magnuslarsen/3.1dev
[Rating] Clearer grade cap reasons
2020-06-19 09:50:24 +02:00
Dirk WetterandGitHub d19aed2345 Merge pull request #1652 from dcooper16/fix_wildcard
Fix and enhance CN matching
2020-06-09 10:48:59 +02:00
Dirk WetterandGitHub 4f13298938 Merge pull request #1651 from dcooper16/missing_space
Fix missing spaces
2020-06-09 09:17:37 +02:00
Dirk WetterandGitHub 6a91dadb31 Merge pull request #1637 from magnuslarsen/3.1dev
[Rating] simple DH group length
2020-06-02 16:48:45 +02:00
Dirk WetterandGitHub 9a22e9af1a Merge pull request #1649 from dcooper16/SC2034
Fix Shellcheck SC2034 issues
2020-06-02 11:08:33 +02:00
Dirk WetterandGitHub 4f9c5158dc Merge pull request #1646 from drwetter/get_TXT_record
Add get_txt_record(), fix variable declaration in get_mx_record()
2020-05-25 21:31:18 +02:00
Dirk a4ae05c90c Add get_txt_record(), fix variable declaration in get_mx_record()
This commit adds a function for querying the TXT DNS record, so
that subsequently we'll can build on top of that a function for
checking MTA-STS, see #1073.

Also it modifies a local variable mxs in get_mx_record() which
was declared as mx but mxs was used. (That is pending an backport
to 3.0.)
2020-05-25 13:23:49 +02:00
Dirk WetterandGitHub e87880ee92 Merge pull request #1643 from dcooper16/EdDSA
Support EdDSA
2020-05-18 14:39:33 +02:00
Dirk WetterandGitHub 42386e512b Merge pull request #1642 from dcooper16/peer_signature_type
Extract server's signature algorithm
2020-05-16 12:46:55 +02:00
Dirk WetterandGitHub 2022754b4a Merge pull request #1636 from drwetter/breach_improvements
Improve compression detection for BREACH
2020-05-12 10:16:14 +02:00
Dirk WetterandGitHub 7fbb79b147 Merge pull request #1638 from dcooper16/fix_show_sigalgo
Fix $SHOW_SIGALGO
2020-05-12 10:13:22 +02:00
Dirk Wetter 78a95d73c8 Add BREACH extension 2020-05-11 14:07:02 +02:00
Dirk Wetter 25f87455a4 Amendment for compression detection (BREACH)
This commit saves more or less time for a detection of the compression.

First it assembles the GET command with all available compressions and send them all.
If the result is negative: we can just tell the finding and return. If it's
positive: We already have identified 1x compression. Then we cycle through the
remaining compressions with single GET requests.

In order to not duplicate code we introduced a helper function sub_breach_helper()
which takes care sending the request and analysis the result.

We treat now failed requests differently: When the first fails we don't
continue anymore.
2020-05-11 13:57:50 +02:00
Dirk Wetter 825cbf7b1d Improve compression detection for BREACH
This commit tries to enummerate through all possible compressions
instead of just raising the arm because of the first one detected.

As far as the performance is concerned there's room for improvements
which subsequent commits will address.
2020-05-11 10:41:48 +02:00
Dirk WetterandGitHub 78612c86a0 Merge pull request #1635 from drwetter/dockerfile+_31dev
Better Dockerfile: doesn't require "git clone"
2020-05-09 13:18:57 +02:00
Dirk d065bda3b8 Better Dockerfile: doesn't require "git clone"
.. see also #1559.

It "mkdirs" the needed etc and bin directories first, then copies
stuff over. It also reduces a few layers.

Also it corrects a mistake in the Readme.md (docker exec --> run)

Thanks for the discussion @Alex131089
2020-05-09 13:17:02 +02:00
Dirk WetterandGitHub bbd46b4e03 Merge pull request #1631 from dcooper16/has_sigalgs
Implement $HAS_SIGALGS
2020-05-09 10:38:03 +02:00
Dirk WetterandGitHub cc8a83ccc0 Merge pull request #1630 from dcooper16/cipher_pre_check_local_problem
Fix "local problem" output in ciher_pref_check()
2020-05-09 10:36:17 +02:00
Dirk WetterandGitHub 6897b4abeb Merge pull request #1632 from unit193/3.1dev
Fix a couple typos in the documentation.
2020-05-09 10:34:44 +02:00
Dirk WetterandGitHub 4f868a76a7 Merge pull request #1629 from dcooper16/bad_exponent_rating
Rate RSA e=1 as CRITICAL
2020-05-08 17:13:09 +02:00
Dirk WetterandGitHub d16f8a20c5 Merge pull request #1621 from drwetter/drwetter-patch-1
Labelling, look @ 3.0.2
2020-05-07 19:57:49 +02:00
Dirk WetterandGitHub e53ea4a115 Merge pull request #1623 from dcooper16/fix_cp_error
Fix copy and paste error
2020-05-07 19:38:28 +02:00
Dirk WetterandGitHub a137f73926 Merge pull request #1620 from dcooper16/improve_key_exchange_grading
Improve key exchange grading
2020-05-07 19:37:36 +02:00
Dirk WetterandGitHub e243b3d77a Merge pull request #1619 from dcooper16/fix_1576
Fix #1576
2020-05-07 19:35:42 +02:00
Dirk Wetter 6fa82ea2f7 Fix typos 2020-05-07 17:15:11 +02:00
Dirk WetterandGitHub 7b3adf8195 Labelling, look @ 3.0.2
* label 3.1dev it as a ~rolling release
* outlook to 3.0.2 (~tomorrow)
2020-05-07 10:50:41 +02:00
Dirk WetterandGitHub f492cf0336 Merge pull request #1616 from dcooper16/tls_sockets_return_value
tls_sockets() return value
2020-05-06 16:34:40 +02:00
Dirk WetterandGitHub 7c5fc48d25 Merge pull request #1618 from dcooper16/fix_1433
Fix #1433
2020-05-06 15:42:05 +02:00
Dirk WetterandGitHub 693cb216f7 Merge pull request #1615 from drwetter/license_patch3.1dev
Amendment to "Relax the possible GPL license contradiction"
2020-05-06 09:18:51 +02:00
Dirk 908975380d Amendment to "Relax the possible GPL license contradiction"
fix it also in the man pages. See #1590 / #1593
2020-05-06 09:17:42 +02:00
Dirk WetterandGitHub 41259d2f1b Merge pull request #1612 from drwetter/TYPO3-Parsetime
Add X-TYPO3-Parsetime
2020-05-05 19:53:15 +02:00
Dirk Wetter 918d358e95 Add X-TYPO3-Parsetime 2020-05-05 13:37:58 +02:00
Dirk WetterandGitHub ec37a6e1bd Merge pull request #1610 from drwetter/xmpp_improvements
Fix STARTTLS pretests, improve XMPP handshakes
2020-05-05 08:47:34 +02:00
Dirk Wetter d949b305c0 Fix STARTTLS pretests, improve XMPP handshakes
There was a empty variable in determine_optimal_proto() which prevented to save
STARTTLS_OPTIMAL_PROTO. This is fixed.

The buffers and return codes for XMPP in starttls_io() were under not every
circumstances correct. This fixes those cases and making that in general more
robust (hopefully).  (There's still code commented out which I'll leave it for
now).

When openssl did not support -starttls xmpp-server there was a copy
and paste error saying that -xmpphost option was not supported.
2020-05-04 22:38:02 +02:00
Dirk WetterandGitHub 1a0ade585e Merge pull request #1609 from dcooper16/check_server_response
Check server's response
2020-05-04 21:35:50 +02:00
Dirk WetterandGitHub 308582bd0e Merge pull request #1608 from drwetter/1590_2_3.1dev
Address further potential license restriction
2020-05-04 20:35:37 +02:00
Dirk cdc1a08819 Address further potential license restriction
.. see https://github.com/drwetter/testssl.sh/issues/1590#issuecomment-623526604

Added some formatting and verbal improvements in the intruductory comment section.
2020-05-04 20:34:32 +02:00
Dirk WetterandGitHub 934c5fc60c Merge pull request #1603 from drwetter/aes_cgm_doc
Fix typo in docs: Strong grade Ciphers / AEAD
2020-05-02 19:54:54 +02:00
Dirk 381fdfa985 Fix typo in docs: Strong grade Ciphers / AEAD 2020-05-02 19:49:01 +02:00
Dirk WetterandGitHub 8e6c80ffba Merge pull request #1601 from drwetter/xmpp_server_polish
STARTTLS xmpp-server polish
2020-05-02 19:41:24 +02:00
Dirk 7981a238a5 Comment out S2S XMPP server test for now 2020-05-02 19:40:45 +02:00