Commit Graph
100 Commits
Author SHA1 Message Date
Dirk WetterandGitHub bddf5b2404 Merge pull request #775 from dcooper16/hpkp_bugfix
run_hpkp() bug fix
2017-07-11 23:21:51 +02:00
Dirk deb7fd52a9 making some socket timeouts configurable through ENV, thus synching it with the documentation 2017-07-11 10:03:33 +02:00
Dirk 637812a022 bali out if both flat and pretty JSON outout was specified 2017-07-10 10:57:48 +02:00
Dirk bc0c1dc553 FIX #779 2017-07-06 13:02:27 +02:00
Dirk WetterandGitHub 7aaadf731c Merge pull request #773 from sdann/postgres_cleanup
Postgres cleanup
2017-07-01 10:43:05 +02:00
Dirk WetterandGitHub 4cb48a1399 Merge branch '2.9dev' into postgres_cleanup 2017-07-01 10:25:28 +02:00
Dirk 02488884bb added experimental label for MySQL STARTTLS protocol 2017-07-01 10:11:34 +02:00
Dirk WetterandGitHub 152c5c225c Merge pull request #774 from sdann/mysql_starttls
Add mysql (openssl) starttls support
2017-07-01 10:05:05 +02:00
Dirk 2d007e4c8b increased verbosity for some standard cipher lists 2017-06-29 17:58:58 +02:00
Dirk 62ce04adf0 remove redundant option "false" in --warnings 2017-06-28 20:28:23 +02:00
Dirk 9d699d1248 straighten server header markup 2017-06-22 13:39:37 +02:00
Dirk ff63700c6e add few more header flags, work on #765 2017-06-20 23:18:15 +02:00
Dirk 4cb435a549 added several insecurity headers 2017-06-20 11:31:22 +02:00
Dirk f53c3c1377 removed separate option for SPDY and HTTP/2 , addressing #767 2017-06-20 08:43:35 +02:00
Dirk 4c73afeef8 fix for nmap file parser (not properly assigned ip variable) 2017-06-14 09:24:20 +02:00
Dirk 7094c4436f also now honor different ports per host from nmap file.
testssl.sh is taking an educated guess which port makes sense to scan,
which one not and for which one to use which starttls handshake upfront.
This minimizes needless sscans and error messages.
2017-06-13 18:42:07 +02:00
Dirk 531b4453ef new function for guessing "port --> invoking" assignments 2017-06-13 15:19:28 +02:00
Dirk WetterandGitHub 18cbdcc272 Will Hunt 2017-06-13 08:41:32 +02:00
Dirk WetterandGitHub 0488ef1a5f Will Hunt 2017-06-13 08:40:31 +02:00
Dirk WetterandGitHub ff37bc3bef Create Readme.md 2017-06-13 00:29:44 +02:00
Dirk f7fdefcdc0 mass testing nmap grep(p)able prefers now hostname instead of ip address in nmap file
--serial is now a shortcut for --mode=serial
2017-06-12 22:56:36 +02:00
Dirk e0960c5379 --parallel is now shortcut for --mode=parallel 2017-06-12 19:07:58 +02:00
Dirk 241b6e4d2e parallel mass testing mode, Ticketbleed+client auth, parallel mode also for nmap
Parallel mass testing mode is now not anymore experimental. To
use it a separate flag ``--mode=parallel`` was introduced. Serial
is still the default for now to avoid unexpected conditions.
Both the mode arguement and the default is subject to change.

The parallel mass testing mode can now also make use of a
nmap file. Also the functional test for nmap file was put
into a separate function and made more user safe. Open point is
that we better should use the hostname if the forward DNS record matches.

Fixed logical inconsistency: Ticketbleed was not being tested against a server with client authentication

Some variables in the beginning reordered
2017-06-12 18:23:55 +02:00
Dirk 1b0ac5ffd6 first version of implicit parsing for nmap greppable files (-oG)
Currently for serial scanning only.
2017-06-12 17:09:52 +02:00
Dirk 30d3233cb4 Merge branch 'SAN_preferred' into 2.9dev 2017-06-09 13:48:28 +02:00
Dirk 69fa8ca378 several improvements
timeout: the TLS ticket check has a timeout, so that early on non-reachable hosts
are determined. If it is running into the timeout, it quits early. The
timeout is configurable via environment e.g. TIMEOUT=16 ./ticketbleed.bash <host>

Also other ports are allowed albeit it probably it is of limited use

Supplying no arg is now more user-friendly
2017-06-09 12:45:22 +02:00
Dirk 15219475e9 strip supplied port automatically 2017-06-09 11:27:59 +02:00
Dirk b69505223a added "gmap2testssl.sh": utility which converts grepable nmap output to testssl's file input 2017-06-09 11:22:11 +02:00
Dirk 53b6e2cfe8 changed PoC to a 3 rounder test (like testssl.sh) to increase reliability.
If different memory is returned each try it is for sure vulnerable. This
helps getting weird servers properly tested and weeds out false positives.
2017-06-07 18:16:18 +02:00
Dirk 5bb5c19e63 cleanup before addressing #592 2017-06-07 09:54:24 +02:00
Dirk WetterandGitHub 861b38bce5 Merge pull request #761 from dcooper16/SAN_preferred_update
SAN_preferred updates
2017-06-07 09:38:22 +02:00
Dirk a8ffa66cad output polishing for must staple 2017-06-01 18:15:44 +02:00
Dirk 63cb4ffc5e improved high level sections of DNS in determine_ip_addresses()
FIX #668

Polishing ``get_*_record()``

Simplfied ``main`` a bit
2017-06-01 18:08:13 +02:00
Dirk a90eb8c9be FIX #744 2017-06-01 16:24:45 +02:00
Dirk WetterandGitHub f3f29cd85c Merge pull request #760 from dcooper16/fix_757
Fix #757
2017-06-01 15:51:21 +02:00
Dirk e4f64463a4 FIX #758 2017-06-01 15:47:38 +02:00
Dirk a73a92b64d Merge branch 'SAN_preferred' of github.com:drwetter/testssl.sh into SAN_preferred 2017-06-01 15:20:36 +02:00
Dirk e035dabb13 Trying to address #733, not complete yet (see also #735).
Open issues: 1) The SNI logic 2) The fileout logic. 3) another section with ``trust_nosni -eq 4/8``

For 2): fileout is a general finding MEDIUM [1] which isn't in line now with the pr_*finding
in the section above anymore. It would make sense to punish HTTP services more than others.
Unfortunately he fileout statement cannot be moved below pr_svrty_medium/pr_svrty_high as
trustfinding_nosni hasn't been determined yet.

Fast solution would be probably to move the trustfinding_nosni section above the trustfinding
section.

Still 3) and a different trust over non-SNI makes it difficult -- e.g. Server has CN match only over
SNI but without SNI SAN matches. That's an edge case though which probably doesn't exist (like Bielefeld)

[1] That was WARN before. WARN should indicate a status of testssl that it cannot perform a check
2017-06-01 15:19:21 +02:00
Dirk 252cceb5dd Trying to address #735, not complete yet.
Open issues: 1) The SNI logic 2) The fileout logic. 3) another section with ``trust_nosni -eq 4/8``

For 2): fileout is a general finding MEDIUM [1] which isn't in line now with the pr_*finding
in the section above anymore. It would make sense to punish HTTP services more than others.
Unfortunately he fileout statement cannot be moved below pr_svrty_medium/pr_svrty_high as
trustfinding_nosni hasn't been determined yet.

Fast solution would be probably to move the trustfinding_nosni section above the trustfinding
section.

Still 3) and a different trust over non-SNI makes it difficult -- e.g. Server has CN match only over
SNI but without SNI SAN matches. That's an edge case though which probably doesn't exist (like Bielefeld)

[1] That was WARN before. WARN should indicate a status of testssl that it cannot perform a check
2017-06-01 14:52:19 +02:00
Dirk 5890677d85 chmodded 2017-06-01 11:14:52 +02:00
Dirk de5b2aa042 readded basic check from seccubus whether check via starttls works 2017-06-01 11:14:04 +02:00
Dirk WetterandGitHub bd015b9129 Merge pull request #753 from dcooper16/mass_testing_command_line_error
Massing testing with command line error
2017-05-31 21:37:54 +02:00
Dirk 91b9236055 PoC for unit test in bash 2017-05-31 10:30:02 +02:00
Dirk WetterandGitHub 55b89ee131 Rename 02_http.t to 32_http.t 2017-05-30 22:15:13 +02:00
Dirk WetterandGitHub 4afedb45b1 Rename 01_badssl.com.t to 31_badssl.com.t 2017-05-30 22:14:19 +02:00
Dirk WetterandGitHub 8e1ace839f Merge pull request #755 from dcooper16/stop_parent
Stop parent if child encounters parsing error
2017-05-30 21:05:05 +02:00
Dirk de177a774c fix formatting problem in run_client_simulation() wide mode when CHACHA20/POLY1305-OLD ciphers
are encountered and remove 4 columns before protocols.

mimor readability improvements in prepare_array() and run_client_simulation()
2017-05-22 23:04:58 +02:00
Dirk WetterandGitHub 26bf3300e8 Delete mapping.txt
has been replaced in 2.9dev by cipher-mapping.txt
2017-05-22 11:38:23 +02:00
Dirk d64fabafd5 completed the commit 601c810240
started to use the ip parameter to decide where the dns resoultion
takes place (see #739 and #748). --ip=proxy or DNS_VIA_PROXY=true
will mean DNS resolutioni is done by proxy,

furthermore: swapped a few pr_magenta by pr_warning. Generally
testssl.sh should use for warnings a warning function and not
directly a color (we want to be flexible). There are still a few
remainders for fatal() which use bold magenta and thus I haven't
changed yet.

Also html_reserved() is being called also if no html output
is being requested. This could be fixed better probably.
2017-05-19 20:28:18 +02:00
Dirk 601c810240 add stderr to line showing "Waiting for test" FIX #750 2017-05-19 17:09:47 +02:00
Dirk 041abd57ce FIX #749 and #751
Additionally fix a probable cmd line parsing problem where an argument '--file' was supplied with '='
2017-05-19 17:00:30 +02:00
Dirk 83b3be5636 update to also reflect dcooper16's work 2017-05-17 18:56:07 +02:00
Dirk WetterandGitHub a3c318655d Merge pull request #745 from dcooper16/run_mass_testing_parallel2
More improvements to mass testing in parallel
2017-05-17 18:34:13 +02:00
Dirk WetterandGitHub a5e224b082 Update Readme.md 2017-05-17 09:03:15 +02:00
Dirk dfda82aa7d Merge branch '2.9dev' of github.com:drwetter/testssl.sh into 2.9dev 2017-05-16 09:46:55 +02:00
Dirk 3b1638f603 small performance improvement for prepare_arrays() by replacing grep + awk by awk only 2017-05-16 09:45:16 +02:00
Dirk 59a175cba3 changed to Linux 2017-05-15 20:53:09 +02:00
Dirk WetterandGitHub 5bb1a67dde Update Readme.md 2017-05-15 20:14:11 +02:00
Dirk e8b5a82c7e Considerable reliability improvements for ticketbleed: if a handshake server hello
was received, testssl.sh tries 3 times to get memory from the server, If
the server returns different memory it's highly likely vulnerable.
(some more vulnerable devices to test against would be appreciated).

This is the default now -- all other hosts are mostly labled as OK.

Parsing SERVICE should be a little faster and more reliable

Increased needed debug level for output @ parse_tls_serverhello
2017-05-15 19:47:13 +02:00
Dirk b694930fc2 RFC 5077 states that the server MAY give a hint of the lifetime of the ticket.
Sometimes it just does not. In those case also sometimes session resumption
via tickets is supported.

This fixes the output for Session Ticket RFC 5077 and doesn't draw the wrong
conclusion from a missing lifetime hint.

It also tests for ticketbleed first whether there's a session ticket TLS
extension.
2017-05-15 13:18:20 +02:00
Dirk 49b1be9f34 fix json/csv output for ticketbleed 2017-05-15 10:08:34 +02:00
Dirk b4889a731b Upgraded proxy sockets to use CONNECT 1.0 to avoid proxy problems -- for the time being (see also #741/ #739) 2017-05-12 18:31:59 +02:00
Dirk 2aa68827b9 don't do double work, reordering stuff 2017-05-12 17:58:20 +02:00
Dirk f70bc4e08f better platform support, revert to pure /bin/sh, better verbosity... 2017-05-12 17:21:45 +02:00
Dirk WetterandGitHub bed1f8cc0d Merge pull request #743 from dcooper16/broken_pipe
Prevent broken pipe error
2017-05-12 16:18:18 +02:00
Dirk WetterandGitHub 2750febb2f Merge pull request #740 from dcooper16/run_mass_testing_parallel
Improvements to mass testing in parallel
2017-05-10 18:49:55 +02:00
Dirk 2936a42bc7 address #626 2017-05-09 21:58:03 +02:00
Dirk 9ed47eaa19 FIX #718 (added TLS padding to ticketbleed handshake). Also added TLS extension Signature Algorithms 2017-05-09 17:29:57 +02:00
Dirk 23e6209beb Merge branch '2.9dev' of github.com:drwetter/testssl.sh into 2.9dev 2017-05-08 23:55:19 +02:00
Dirk ebd9e6ae65 manually merged #728 (see #423), credits also to @seccubus. Unfortunately the unit tests don't make so much sense atm 2017-05-08 23:51:37 +02:00
Dirk WetterandGitHub 53da6da77b Merge pull request #730 from typingArtist/729_catch_read_timeout
correctly capture return code in starttls_full_read
2017-05-04 22:32:23 +02:00
Dirk 699b48c8b8 lowering severity and taking other clients as browsers into account #735 2017-05-04 12:34:20 +02:00
Dirk WetterandGitHub 19052da1a5 Merge pull request #735 from tkaehn/alert_on_missing_sans
Alert on missing SANs
2017-05-04 11:52:47 +02:00
Dirk WetterandGitHub c9b6ee25b1 Delete 11_hpkp.t 2017-05-04 10:29:06 +02:00
Dirk 7d8479f55e temporary disabled until either an replacement has been coded or host is up again 2017-05-04 10:14:42 +02:00
Dirk ba9c056dfc renamed browser --> client simulation 2017-04-28 20:35:07 +02:00
Dirk WetterandGitHub ef10fc3119 Merge pull request #726 from oerdnj/2.9dev-no-downgrade-breach
Revert "Downgrade BREACH attack to MEDIUM severity"
2017-04-25 23:10:11 +02:00
Dirk WetterandGitHub bd4575e14d Merge pull request #724 from oerdnj/2.9dev
Fix prln usage to outln
2017-04-25 16:27:47 +02:00
Dirk 8ea8513529 fixed in Testing server preferences --> Negotiated cipher the empty TMPfile which led to an ugly error
fixed in Session Resumption  for tickets if no extension=no resumption: there was 1x LF too much
2017-04-24 19:18:39 +02:00
Dirk WetterandGitHub 7a99549e80 Merge pull request #721 from dcooper16/client_simulation_wide_option
Add wide option for client simulations
2017-04-24 16:26:08 +02:00
Dirk 01489b9ca1 special treatment for empty serverhello for ticketbleed 2017-04-24 09:25:23 +02:00
Dirk 2db8e8e8b1 use HAS_NO_SSL2 2017-04-22 22:14:06 +02:00
Dirk c8cd1318e9 FIX #719, still work to do for ticketbleed (#655) 2017-04-22 15:39:18 +02:00
Dirk f8e1ad0b7f add missing # 2017-04-22 15:19:39 +02:00
Dirk 584c933493 updated user agent for sneaky 2017-04-21 11:31:42 +02:00
Dirk 7de5e0113b check in 2017-04-21 11:29:20 +02:00
Dirk 28660f7a77 corrected pr_warningln 2017-04-20 17:29:07 +02:00
Dirk 1d992f3620 preview from clientsim branch, important to add now 2017-04-20 17:24:07 +02:00
Dirk 7c676dfc63 FIX #717 -- doubel meaning fo '-h' 2017-04-19 19:46:54 +02:00
Dirk WetterandGitHub 869ec9b9c3 Merge pull request #685 from dcooper16/openssl_location
Populate OPENSSL_LOCATION in find_openssl_binary
2017-04-19 18:23:14 +02:00
Dirk WetterandGitHub 219a07a620 Merge pull request #716 from gniltaws/2.9dev
Use $TESTSSL_INSTALL_DIR instead of $RUN_DIR in find_openssl_binary() - Second Try
2017-04-19 18:05:03 +02:00
Dirk WetterandGitHub 828dda79f3 Merge pull request #715 from dcooper16/travis_check_for_html
Add Travis test for HTML output
2017-04-19 16:01:07 +02:00
Dirk c4a2ba8b49 vuln count adjusted 2017-04-19 01:21:13 +02:00
Dirk WetterandGitHub 51497c9dfb Merge pull request #714 from drwetter/revert-712-travis_check_for_html
Revert "Add Travis test for HTML output"
2017-04-19 00:55:35 +02:00
Dirk WetterandGitHub 9164230186 Revert "Add Travis test for HTML output" 2017-04-19 00:53:38 +02:00
Dirk WetterandGitHub 5285c26759 Merge pull request #712 from dcooper16/travis_check_for_html
Add Travis test for HTML output
2017-04-19 00:38:27 +02:00
Dirk 9ff868b083 fix travis 2017-04-19 00:35:55 +02:00
Dirk 2469603a7f save also 1x connect for heartbleed() by reusing a previoulsy identified protocol 2017-04-19 00:30:09 +02:00
Dirk de79bd6b0e implemented ticketbleed (experimental). Renamed other vulnerabilty checks to easier memorize each check:
-H is now --heartbleed instead of --headers,
-B is now --breach instead of --heartbleed,
-T is now --ticketbleed (was previously --breach)

bugs fix for run_ccs_injection() where the tls protocols wa not properly passed to the ClientHello

Made use of already determined protocol ( this time only from determine_optimal_proto() ) ==> we shpould use this in run_protocols() too!)
for run_ccs_injection + run_ticketbleed(). For achieving this determine_optimal_proto() needed to be modified so that it adds a protocol
to PROTOS_OFFERED (all_failed is now boolean there)

added two easy functions for converting dec to hex

sockread_fast() is for testing which should make socket erads faster -- albeit it could potentially block the whole thing
2017-04-18 23:15:32 +02:00
Dirk ac5b9a8a78 minor polishing, correct handshake length 2017-04-18 23:06:12 +02:00