Commit Graph

232 Commits

Author SHA1 Message Date
Peter Mosmans
8e4970c408 Minor textual fix (added space) 2015-06-01 14:16:31 +02:00
Dirk
cac985967f - first prototype for using = in cmdline, see #108. Tests needed
- beautified big case loop
2015-06-01 12:01:38 +02:00
Dirk
452fd6762a - local dns matches don't need lookup anymore over net --> saves timeouts+time
- further banner tuning + funtion mybanner, 2 addtl global vars for debugging
- cosmetic improvements
2015-05-31 14:40:12 +02:00
Dirk
77ad7c9252 - the outsticking part was kind of not handy, see #113, remove commit message 2015-05-30 11:36:47 +02:00
Peter Mosmans
764f20dbcf FIX: Show version when specified on command line
ADDITION: Show git commit information, to support troubleshooting.
2015-05-30 11:13:57 +02:00
António Meireles
faa9c49a2b fix spelling typos.
Signed-off-by: António Meireles <antonio.meireles@reformi.st>
2015-05-29 18:56:57 +01:00
António Meireles
4064332234 trim all whitespace at EOL.
also, align comment blocks for better code readability.

Signed-off-by: António Meireles <antonio.meireles@reformi.st>
2015-05-29 18:44:32 +01:00
Dirk
9b2b897a43 - make date even more beautiful, see #110
- fix RUN_DIR
2015-05-29 14:12:22 +02:00
Dirk Wetter
e14453b607 Merge pull request #110 from AntonioMeireles/master
simplify life for OSX users running gnu's coreutils...
2015-05-29 11:01:47 +02:00
Dirk
41ee37f0dc - per default we do a allciphers run in the end
- option long changed to wide
- PFS now is per default not wide
- PFS comes after standard cipher lists
- debug output improved (in terms of privacy and additional info)
2015-05-29 10:36:14 +02:00
Dirk
2ac34c1424 - early check to make sure people really use bash, see #109 2015-05-29 10:08:17 +02:00
António Meireles
4063e38ccf simplify life for OSX users running gnu's coreutils...
Signed-off-by: António Meireles <antonio.meireles@reformi.st>
2015-05-28 16:56:37 +01:00
Dirk Wetter
8b10dc9638 - code improvements rc4, beast, logjam, freak 2015-05-27 23:31:25 +02:00
Dirk Wetter
f9605c4f35 - BEAST now also works in wide mode
- renamed --long in --wide
- added --show-each to help
- inserted help
2015-05-27 17:04:35 +02:00
Dirk Wetter
a76ca52c4c - first candidate for logjam (missing the precomuted primes though)
- 1024 DH is now brown instead of red, 768 will be red, 512 bold red
- dumped calls to ok()
- further cosmetic stuff
2015-05-27 14:28:18 +02:00
Dirk
ed38a365ae - fix regression on missing rfc cipher names
- cosmetic stuff
2015-05-27 11:19:30 +02:00
Dirk
060178071d - for pfs. allciphers and cipher_per_proto we WARN now because of weak DH param (if openssl supports it)
FIX #106, $85
- logjam not yet named *#105, #107) but addressed
- --openssl switch
- reorder find_openssl_binary / mybanner
- proper identation of help
2015-05-26 12:51:10 +02:00
Dirk
3c161f9ce4 - blanks in headlines added 2015-05-25 21:22:21 +02:00
Dirk
9c7d385098 - omit 1xblank in almost all colored output (and adjust the functions using it)
- little bit more robust for strange keysize and dh bits
- added ecdsa-with-SHA256 to Signature Algorithm
- FIX: no TLS1+SSL3 resulted in no output for BEAST
2015-05-25 21:14:59 +02:00
Dirk
e58b53eeae - dh key lenghth in negotiated cipher at first, see $85, #105, #106
- got rid of ok function calls in protocols
- detection of apache banner win32/win64
2015-05-25 15:10:09 +02:00
Dirk
a7a19428d6 - FIX for #104: check for hpkp pin match failed if \" was present 2015-05-18 23:10:34 +02:00
Dirk
0c4a36121e - NEW / FIX #104: check for hpkp pin match 2015-05-18 21:51:45 +02:00
Dirk
7cc15e5d4d - 2.4 2015-05-17 22:43:53 +02:00
Dirk
2919a7c40e - 2.4!
- FIX #92
- FIX for TLS time (difftime was too small for local clock skew)
- warning for freebsd/macosx w/o ports need now a "yes"
- TLS 1.0 not offered is not bold anymore
- output weirdness fixed for cipher order in spdy
2015-05-17 22:30:49 +02:00
Dirk
6e74b3bd5c - FIX of output whene there's no CBC cipher in BEAST
- FIX: 2 occurrances of OPENSSL calls had a hostname instead of an IP address
- FIX: starttls protocol correctly displayed
- NEW added duplicate detection for header flags
- NEW: added four GOST cipher to standard socket handshake
- recommends if openssl 1.0.2 is used and results were strange and IIS6 --> run wqith openssl 1.0.1
- declared some global vars as readonly
2015-05-15 21:32:11 +02:00
Dirk
16d2b33459 - Workarounds for IIS6 #99 : some places where openssl 1.0.2 cannot connect (as opposed
to =< 1.0.1) finding the right protocol before
- hints for IIS6+openssl 1.0.2 non-conformity #99
- version bumped up to 2.4rc2
- better formatting for BSD in cipher order
- FIX: 2x bug for cipher order + sslv2
- preambel revisited
2015-05-12 13:37:39 +02:00
Dirk
3a64bd1005 - WONTFIX remarks for #103 and #102
- better warning for openssl < 1.0
2015-05-11 16:58:57 +02:00
Dirk
35d8469f67 URL_PATH regression fixed 2015-05-11 10:47:26 +02:00
Dirk
08fe890d5f - two fixes from #40 reported by @salt-lick 2015-05-11 08:52:40 +02:00
Dirk
19fc021587 - FIX: 30x with BigIP doesn't have a date, handled properly now
- generic GET/HEAD is now always with URL_PATH
2015-05-10 23:38:06 +02:00
Dirk
0050df5529 - informative header extended 2015-05-10 20:54:43 +02:00
Dirk
2f79ba52fc - NUMEROUS FreeBSD9/Darwin FIXES #40
- http date
  - cipher list in preferences
- GET_REQ11 now closes the connection
- openssl_age comes afeter the banner so that help doesn't need to go thru this
- uname -s ==> SYSTEM
2015-05-10 19:20:55 +02:00
Dirk
0aa8ac7e76 - more robust wrt IIS6 (some stuff better with IIS7)
- X-Powered-By is easy to remove (PHP, ASP.NET), thus labelled as yellow
- same X-AspNet-Version (version # itself is brown)
- better addressed address resolution failures ;-)
- bumped up version to 2.4rc1
2015-05-06 18:48:51 +02:00
Dirk
f3f3967bd1 - FIX $87 (2), finally
- feature: integrated TLS+HTTP time into server defaults
- NEW: option: -U/vulnerable
- moved explanation for BREACH into result
- FREAK and CCS are not labled experimental anymore
- unifying of get request headers
- readability of help
2015-05-02 15:01:02 +02:00
Dirk Wetter
2aa82e5164 - partly FIX for #87 (removed SNI helps. Doesn't make sense anyway)
- changed order of Secure Renegotiation/Secure Client-Initiated Renegotiation
- readability improvements in renego
2015-05-01 12:18:43 +02:00
Dirk
d766a0b459 - fix additional \n in RC4 if no RC4 ciphers were detected 2015-04-28 08:04:09 +02:00
Dirk
1ea7a0947f - RC4 has now 2 CVEs and cipher per default are displayed short
- introducng a variable name LONG which for certain funcs shows broad output with hexc, cipher, KX, etc.
- FIX: regression not showing security headers
- introducing VULN_THRESHLD
2015-04-22 18:24:39 +02:00
Dirk
3891f5b13b - FIX #83
- emphasize also OS names in HTTP headers
2015-04-22 15:22:53 +02:00
Dirk
06bd8b2517 - FIX for complete bailing out 2015-04-22 11:56:13 +02:00
Dirk
bafce6edce - reordering code so that all attacks are together
- RC4 is now really omitted in PFS test
- cleanup of some comments
2015-04-22 10:33:44 +02:00
Dirk
5bec0a16c9 - better compatibility with windows 2003 server
- all long options are advertised now as with dashes and not underscore
- cosmetic stuff
2015-04-20 10:05:01 +02:00
Dirk
7b6dba6369 FIX for #82 2015-04-18 23:03:16 +02:00
Dirk
5625ee536e - BUGFIX: IIS server lead to false pisitive if SSLv3 was enabled
(timeout was faster then socket resply)
- FIX: CORS header not labeled as green
- NEW: Now also STARTTLS works with all cmd line options and is absolutely doing the same stuff!
  (integrated starttls() into parse_hn_port() )
- option --mx needed to be changed because of starttls
- regression fix: exec for socket doesn't play nice with stderr redirect
  (probably bash bug)
- added some env options to cmd line as long args (--assuming-http,--ssl_native,
  --color, debug, --sneaky, --warnings)
- threw away getent as it doesn't work under Linux && not network && localhost
  (replaced by grep)
- SSL-POODLE is not labeled anymore experimental
- HB+CCS are called while checking STARTTLS but given a hint that its not yet supported
- added more env vars to debug output
- cleanups
2015-04-16 20:36:17 +02:00
Dirk
f682c5ceea - FIX regression: more_flags execution was missing
- FIX regression: capitalized/all lowercase headers weren't detected
- if socksend is blocked (IDS) output looks better and is reported as test didn't succeed
- no secure cookie or Httponly will be marked as brown
- tput color yellow is now brown
2015-04-14 13:16:43 +02:00
Dirk
9d5168dbb5 - more robust grep >=2.20, e.g Debian 8.0 (thx @stevenb18)
- FIX: false positive for breach while testing google.com (referer header was hardcoded to google.com)
2015-04-14 10:15:07 +02:00
Dirk
683e9dccab - FIX (regression): -V
- logic of some ENV variables changed (attention!)
- included some ENV as long options (not in the help yet)
- decentralized http check for breach
- if openssl is not executable it bails out better now
- help function now exits
2015-04-13 22:55:40 +02:00
Dirk
a12d39769f - underline CN, SAN and issuer deutschepost case (see sourceforge.net/p/ssllabs/mailman/message/33764851/) 2015-04-10 15:15:47 +02:00
Dirk
53e0955dfb FIX: missing server preferences, NEW: each cipher server preferences per protocol! 2015-04-09 22:08:48 +02:00
Dirk
a98161acc9 - fixes to changes from Peter's better cmd line parsing
- cosmetc improvements (vulneraibilities)
2015-04-09 21:42:52 +02:00
Peter Mosmans
c8d169cc0f Removed GNU getopt
Minor fix to --poodle option
2015-04-07 18:05:52 +10:00
Peter Mosmans
9780e83895 Refactored major parts of code
Note that due to the refactoring of some status messages, the output will be slightly different (more verbose) than previous versions

Moved specific status messages to http_header()
Moved specific status messages to breach()
Moved specific status messages to ccs_injection()
Moved specific status messages to heartbleed()
Moved specific status messages to renego()
Moved specific status messages to crime()
Moved specific status messages to tls_poodle()
Moved specific status messages to freak()
Moved specific status messages to beast()

Added some more documentation for functions

Fixed typos in help

Created new function main:
This is the main function of testssl.sh
Refactored major part of the original main function

Created new function startup:
Parses the startup options

Created new function intialize_globals:
Initializes all used global variables

Created new function scanning_defaults:
Sets default scanning options when only one parameter (URI) is given

TODO: Refactor more/duplicate parts of functions

Note: For the new functions, fixed spaces (4) are used instead of tabs
2015-04-07 17:00:43 +10:00
Dirk
84aca9d9a3 FIX #80: show HTTP 401 2015-04-02 13:35:22 +02:00
Dirk
2cc56c4d1f NEW: added security headers 2015-04-02 13:04:57 +02:00
Dirk
8da96f78f2 - got rid of "strings" 2015-04-02 12:19:24 +02:00
Dirk
940f51e74b protocol check via sockets now also for SSLv3 2015-03-31 10:34:30 +02:00
Dirk
9ed58b6202 cleanups / bsd date in tls time 2015-03-30 23:09:19 +02:00
Dirk
d9ae35fc7e open fixes from Rechi (pull request $67) 2015-03-30 14:59:44 +02:00
Dirk Wetter
7f4fc5902e Merge pull request #75 from feld/tr
Using square brackets in tr results in trying to match/replace them
2015-03-19 09:14:54 +01:00
Dirk Wetter
f4c9f692d2 Merge pull request #76 from feld/printf
Fix variable directly referenced in printf
2015-03-19 09:14:32 +01:00
Mark Felder
819e6e6163 Fix variable directly referenced in printf 2015-03-18 15:43:06 -05:00
Mark Felder
63a1df1fe2 Using square brackets in tr results in trying to match/replace them 2015-03-18 15:42:21 -05:00
Dirk
2d0bfca343 - FIX for 3des cipher report (thx Дилян) 2015-03-17 22:12:25 +01:00
Dirk
ca6ca5d47e - added two pairs of ciphers to server preference (thx Dilian) 2015-03-17 22:02:23 +01:00
Dirk
2faad9de9a - working tls handshake with bash sockets (not yet in production, hint: see option "-q" in the bottom) 2015-03-17 18:11:18 +01:00
Dirk
c159af7f42 - check whether openssl is executable
- spaces to tabs
- adding hint to "aha" in help
2015-03-17 15:14:58 +01:00
Dirk
263535520f - FIX for date --> applied to other BSD systems too
- FIX for SNI output as it doensn';t make sense for non HTTP servives
- lines for RC4 and PFS shortenedA
- display all MX records to test before testing
- removed LOCERR, added CCS_MAX_WAITSOCK, HEARTBLEED_MAX_WAITSOCK
2015-03-17 12:22:21 +01:00
Dirk
f8ba69f9fb - some internal code internal cleanups
- minor cosmetic output corrections
- preparation for bash sockets for SSLv3 to TLS 1.2
2015-03-16 00:22:51 +01:00
Dirk
4556108a72 further improvements through shellcheck 2015-03-15 16:59:29 +01:00
Dirk
68695bbad3 FIX #74 for sed BSD: doesn't like inline \n
headline for BEAST was missing
2015-03-15 16:10:14 +01:00
Dirk
655944bd4d - FIX: regression for wc -l w/o cat (3x)
- removal of unneccessary waitpid, inline
2015-03-15 14:41:34 +01:00
Dirk
fbd383f345 - prework for checking hpkp fingerprints 2015-03-15 10:18:37 +01:00
Mark Felder
2684f5c392 Make date command work with both Linux and FreeBSD 2015-03-13 15:51:50 -05:00
Mark Felder
6f15652121 Merge branch 'master' of github.com:feld/testssl.sh 2015-03-13 15:24:37 -05:00
Mark Felder
8cdd516ad1 more ps >/dev/null fixes
more useless cat
2015-03-13 15:24:16 -05:00
Mark Felder
8d965f7c71 More useless cat 2015-03-13 15:19:47 -05:00
Mark Felder
7babe7478d Remove 2>&1 for the ps $pid lines; it's unnecessary 2015-03-13 15:16:21 -05:00
Mark Felder
c83e1b98e2 Merge branch 'master' of github.com:feld/testssl.sh 2015-03-13 15:12:45 -05:00
Mark Felder
8ad1cca0ab Remove useless kittens 2015-03-13 15:10:36 -05:00
Mark Felder
4cdc89aa61 Revert to 2>&1 > /dev/null order because it isn't behaving correctly. 2015-03-13 14:56:30 -05:00
Mark Felder
59ed025f36 Replace expr with $(( ))
https://github.com/koalaman/shellcheck/wiki/SC2003
2015-03-13 14:54:36 -05:00
Mark Felder
73202da2fd Fix missing single quote 2015-03-13 14:26:02 -05:00
Mark Felder
b7b88a03e7 Fix order of the redirect
https://github.com/koalaman/shellcheck/wiki/SC2069
2015-03-13 10:00:14 -05:00
Mark Felder
305fcca2ae Replace backticks with $(..)
https://github.com/koalaman/shellcheck/wiki/SC2006
2015-03-13 09:52:39 -05:00
Dirk
c1ca5a641b - FIX garbled output for servers with a TLS reply on SSLv2 socket call 2015-03-13 12:20:19 +01:00
Mark Felder
f037a3f811 Minor optimizations to redunce unnecessary forking 2015-03-11 12:13:38 -05:00
Dirk
d8d8318f6d FIX for #71 (proper workaround for lastpipe in rc4, pfs, and cbc) 2015-03-09 08:07:45 +01:00
Dirk
77e28922c1 - NEW: proper check for freak CVE-2015-0204
- NEW: check for number of keys for hpkp
- cleanup hsts+hpkp
2015-03-07 09:51:55 +01:00
Dirk
f23904b35f - MX record: the lower the # the higher the priority (thx, rechi) 2015-03-03 07:21:30 +01:00
Dirk
55e8908234 - finalize mx records, FIX: #41 2015-03-02 14:42:28 +01:00
Dirk Wetter
2614c093d7 Merge pull request #66 from Rechi/master
Check MX Records (#41)
2015-03-02 14:13:33 +01:00
Dirk
37fa44cecf - remark about rc4 rfc 2015-03-02 14:09:34 +01:00
Rechi
81afa43755 Check MX Records (#41) 2015-02-28 14:12:58 +01:00
Dirk
29214c7a1f - better detection for ssl poodle
- change of shorticut from zero to letter o
2015-02-27 21:21:39 +01:00
Marc Schütz
274ee394e8 Don't let error message slip through when no certs have been downloaded 2015-02-24 18:10:28 +01:00
Dirk Wetter
868c813055 Merge pull request #64 from PeterMosmans/spellingfix
FIX: minor spelling issue
2015-02-24 10:03:32 +01:00
Peter Mosmans
5440b24b92 FIX: minor spelling issue 2015-02-24 14:57:43 +10:00
Dirk
8aa8254c2d - FIX #62 (CentOS 7/RHEL: engine failure), was not usable b4 2015-02-23 10:40:10 +01:00
Dirk
d0d7bb47e2 - FIXED: #47 ("double" linefeed if RFC mapping file is not present) 2015-02-22 23:05:40 +01:00
Dirk
e2448ea95d - NEW: tells how many certificates provides (and grabs them with DEBUG=1)
- COLOR for no cipher order is red now
- "VULNERABLE" comes now always with "NOT ok"
2015-02-21 11:47:12 +01:00
Dirk
bacb3b69ba - FIXED: #38, new openssl from peter mosmans makes the workaround unneccessary 2015-02-21 10:38:04 +01:00