From d5924eedc420b1a04e908d38bad4e4a62687232e Mon Sep 17 00:00:00 2001 From: Dirk Date: Tue, 20 Jan 2015 21:59:21 +0100 Subject: [PATCH] - BEAST finally works - handling of spaces in output - different ciphers - FIX: setopt also for RC4 (proper handling of ret value) --- testssl.sh | 78 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/testssl.sh b/testssl.sh index 120c15c..d48cf3f 100755 --- a/testssl.sh +++ b/testssl.sh @@ -86,10 +86,11 @@ HEADER_MAXSLEEP=${HEADER_MAXSLEEP:-3} # we wait this long before killing the pr NPN_PROTOs="spdy/4a2,spdy/3,spdy/3.1,spdy/2,spdy/1,http/1.1" RUN_DIR=`dirname $0` +BLA="" # make sure that temporary files are cleaned up after use -trap cleanup QUIT EXIT +trap "cleanup" QUIT EXIT # The various hexdump commands we need to replace xxd (BSD compatability)) HEXDUMPVIEW=(hexdump -C) # This is used in verbose mode to see what's going on @@ -1231,13 +1232,13 @@ pfs() { rc4() { + shopt -s lastpipe outln blue "--> Checking RC4 Ciphers" ; outln $OPENSSL ciphers -V 'RC4:@STRENGTH' >$TMPFILE [ $SHOW_LOC_CIPH = "1" ] && echo "local ciphers available for testing RC4:" && echo `cat $TMPFILE` $OPENSSL s_client -cipher `$OPENSSL ciphers RC4` $STARTTLS -connect $NODEIP:$PORT $SNI &>/dev/null $TMPFILE 2>/dev/null $TMPFILE 2>/dev/null /dev/null >$TMPFILE $TMPFILE 2>/dev/null URI <-C|--compression|--crime> tests only for CRIME vulnerability <-T|--breach> tests only for BREACH vulnerability <-0|--poodle> tests only for POODLE vulnerability + <-A|--beast> tests only for BEAST vulnerability <-s|--pfs|--fs|--nsa> checks (perfect) forward secrecy settings <-4|--rc4|--appelbaum> which RC4 ciphers are being offered? <-H|--header|--headers> check for HSTS, HPKP and server/application banner string @@ -2243,7 +2267,7 @@ case "$1" in parse_hn_port "$2" pfs exit $? ;; - -q|--beast) + -A|--beast) maketempf parse_hn_port "$2" beast @@ -2284,8 +2308,8 @@ case "$1" in renego ; ret=`expr $? + $ret` crime ; ret=`expr $? + $ret` [[ $SERVICE == "HTTP" ]] && breach "$URL_PATH" ; ret=`expr $? + $ret` - beast ; ret=`expr $? + $ret` poodle ; ret=`expr $? + $ret` + beast ; ret=`expr $? + $ret` if [[ $SERVICE == "HTTP" ]]; then outln; blue "--> Testing HTTP Header response" @@ -2301,6 +2325,6 @@ case "$1" in exit $ret ;; esac -# $Id: testssl.sh,v 1.167 2015/01/15 19:29:45 dirkw Exp $ +# $Id: testssl.sh,v 1.169 2015/01/20 20:59:20 dirkw Exp $ # vim:ts=5:sw=5