Skip to content

Commit e1a43e6

Browse files
authored
Merge branch '3.1dev' into starttls_injection
2 parents 7c66535 + ffe223f commit e1a43e6

24 files changed

+442
-97
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ addons:
77
packages:
88
- dnsutils
99
- jsonlint
10+
before_install:
11+
- if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md)|(.pem)|(.pdf)|(.html)|^(LICENSE)|^(docs)|^(utils)|^(bin)|(Dockerfile)'
12+
then
13+
echo "no code was updated, not running the CI."
14+
exit
15+
fi
1016
install:
1117
- cpanm --notest Test::More
1218
- cpanm --notest Data::Dumper

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
* Added environment variable for amount of attempts for ssl renegotiation check
2828
* Added --user-agent argument to support using a custom User Agent
2929
* Added --overwrite argument to support overwriting output files without warning
30-
* Headerflag X-XSS-Protection is labeled as INFO
30+
* Headerflag X-XSS-Protection is now labeled as INFO
31+
* Client simulation runs in wide mode which is even better readable
32+
* Added --reqheader to support custom headers in HTTP requests
33+
3134

3235
### Features implemented / improvements in 3.0
3336

CREDITS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Full contribution, see git log.
4242
* Jim Blankendaal
4343
- maximum certificate lifespan of 398 days
4444
- ssl renegotiation amount variable
45+
- custom http request headers
4546

4647
* Frank Breedijk
4748
- Detection of insecure redirects
@@ -181,4 +182,3 @@ Probably more I forgot to mention which did give me feedback, bug reports and he
181182
* Ivan Ristic/Qualys for the liberal license which made it possible to make partly use of the client data
182183

183184
* My family for supporting me doing this work
184-

Dockerfile.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1-
## Usage:
1+
## Usage
2+
3+
### From git directory
4+
5+
```
6+
docker build .
7+
```
8+
9+
Catch is when you run without image tags you need to catch the ID when building
10+
11+
```
12+
[..]
13+
---> 889fa2f99933
14+
Successfully built 889fa2f99933
15+
```
16+
17+
More comfortable is
218

3-
(in git directory):
419
```
520
docker build -t mytestssl .
621
docker run --rm -t mytestssl example.com
@@ -13,22 +28,22 @@ docker run -t mytestssl --help
1328
docker run --rm -t mytestssl -p --header example.com
1429
```
1530

16-
or pull the image from dockerhub and run:
31+
### From dockerhub
32+
33+
You can pull the image from dockerhub and run:
1734

1835
```
19-
docker run --rm -t drwetter/testssl.sh --pfs example.com
36+
docker run --rm -t drwetter/testssl.sh --fs example.com
2037
```
2138

22-
Tags supported are: ``latest``, ``stable`` which _for now_ are all the same and point to ``3.0``.
39+
Supported tages are: ``3.1dev`` and ``latest`, which are the same, i.e. the rolling release. ``3.0`` is the latest stable version from git which might have a few improvements (see git log) over the released version 3.0.X.
2340

2441
``docker run --rm -t drwetter/testssl.sh:stable example.com``.
2542

26-
And for the indomitable users who prefer to run old stuff you can use the tag ``2.9.5``. Please note ``2.9dev`` should not be used anymore.
27-
28-
Keep in mind that any output file (--log, --html, --json etc.) will be created in the container. If you wish to have this created in a local directory you can mount a volume into the container and change the output prefix where the container user has write access to, e.g.:
43+
Keep in mind that any output file (--log, --html, --json etc.) will be created within the container. If you wish to have this created in a local directory on your host you can mount a volume into the container and change the output prefix where the container user has write access to, e.g.:
2944

3045
```
3146
docker run --rm -t -v /tmp:/data drwetter/testssl.sh --htmlfile /data/ example.com
3247
```
3348

34-
which writes the output to ``/tmp/example.com_p443-<date>-<time>.html.`` The uid/gid is the one from the docker user but normally the file is 644. testssl.sh's docker container uses a non-root user (usually with user/groupid 1000:1000).
49+
which writes the HTML output to ``/tmp/example.com_p443-<date>-<time>.html.`` The uid/gid is the one from the docker user. Normally the file is 644. testssl.sh's docker container uses a non-root user (usually with user/groupid 1000:1000).

Readme.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ to get bugfixes, other feedback and more contributions.
4040
Testssl.sh is working on every Linux/BSD distribution out of the box. Latest by 2.9dev
4141
most of the limitations of disabled features from the openssl client are gone
4242
due to bash-socket-based checks. As a result you can also use e.g. LibreSSL or OpenSSL >=
43-
1.1.1 . testssl.sh also works on other unixoid system out of the box, supposed they have
43+
1.1.1 . testssl.sh also works on other unixoid systems out of the box, supposed they have
4444
`/bin/bash` >= version 3.2 and standard tools like sed and awk installed. An implicit
4545
(silent) check for binaries is done when you start testssl.sh . System V needs probably
4646
to have GNU grep installed. MacOS X and Windows (using MSYS2, Cygwin or WSL) work too.
@@ -53,33 +53,31 @@ You can download testssl.sh branch 3.1dev just by cloning this git repository:
5353

5454
git clone --depth 1 https://github.com/drwetter/testssl.sh.git
5555

56-
Think of 3.1dev like a rolling release, see below. For the stable version help yourself by downloading the [ZIP](https://github.com/drwetter/testssl.sh/archive/3.0.2.zip) or [tar.gz](https://github.com/drwetter/testssl.sh/archive/3.0.2.zip) archive. Just ``cd`` to the directory created (=INSTALLDIR) and run it off there.
56+
Think of 3.1dev like a rolling release, see below. For the stable version help yourself by downloading the [ZIP](https://codeload.github.com/drwetter/testssl.sh/zip/3.0.4) or [tar.gz](https://codeload.github.com/drwetter/testssl.sh/tar.gz/3.0.4) archive. Just ``cd`` to the directory created (=INSTALLDIR) and run it off there.
5757

5858
#### Docker
5959

60-
Testssl.sh has minimal requirements. As stated you don't have to install or build anything. You can just run it from the pulled/cloned directory. Still if you don't want to pull the github repo to your directory of choice you can pull a container from dockerhub and run it:
60+
Testssl.sh has minimal requirements. As stated you don't have to install or build anything. You can just run it from the pulled/cloned directory. Still if you don't want to pull the github repo to your directory of choice you can pull a container from dockerhub and run it:
6161

6262
```
63-
docker run --rm -ti drwetter/testssl.sh:3.1dev <your_cmd_line>
63+
docker run --rm -ti drwetter/testssl.sh <your_cmd_line>
6464
```
6565

6666
Or if you have cloned this repo you also can just ``cd`` to the INSTALLDIR and run
6767
```
68-
docker build .
68+
docker build . -t imagefoo && docker run --rm -t imagefoo example.com
6969
```
7070

71-
followed by ``docker run -ti <ID> <your_cmd_line>`` where ``ID`` is the identifier in the last line from the build command like
71+
For more please consult [Dockerfile.md](https://github.com/drwetter/testssl.sh/blob/3.1dev/Dockerfile.md).
7272

73-
```
74-
---> 889fa2f99933
75-
Successfully built 889fa2f99933
76-
```
7773

7874
### Status
7975

80-
We're currently in the development phase, version 3.1dev. 3.1dev will eventually become 3.2. Bigger features are developed in a separate branch before merged into 3.1dev to avoid hiccups or inconsistencies. Albeit we try to keep 3.1dev as solid as possible things will certainly change in 3.1dev. So if you need stability the 3.0 branch is better for you. Think of the 3.1dev branch like a rolling release.
76+
We're currently in the development phase, version 3.1dev. 3.1dev will eventually become 3.2. Bigger features are developed in a separate branch before merged into 3.1dev to avoid hiccups or inconsistencies. Albeit we try to keep 3.1dev as solid as possible things will certainly change in 3.1dev. Think of the 3.1dev branch like a rolling release. So if you need stability the 3.0 branch is better for you.
77+
78+
Version 3.0.X receives bugfixes, labeled as 3.0.1, 3.0.2 and so on. This will happen until 3.2 is released.
8179

82-
Support for 2.9.5 has been dropped. Supported is 3.0.x only.
80+
Support for 2.9.5 has been dropped. Supported is >= 3.0.x only.
8381

8482
### Documentation
8583

@@ -90,7 +88,7 @@ Support for 2.9.5 has been dropped. Supported is 3.0.x only.
9088

9189
### Contributing
9290

93-
Contributions are welcome! See [CONTRIBUTING.md](https://github.com/drwetter/testssl.sh/blob/3.0/CONTRIBUTING.md) for details.
91+
Contributions are welcome! See [CONTRIBUTING.md](https://github.com/drwetter/testssl.sh/blob/3.1dev/CONTRIBUTING.md) for details. Please also have a look at the [Coding Convention](https://github.com/drwetter/testssl.sh/blob/3.1dev/Coding_Convention.md}.
9492

9593
### Bug reports
9694

doc/testssl.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ Please note that \fBfname\fR has to be in Unix format\. DOS carriage returns won
136136
.P
137137
\fB\-\-basicauth <user:pass>\fR This can be set to provide HTTP basic auth credentials which are used during checks for security headers\. BASICAUTH is the ENV variable you can use instead\.
138138
.
139+
.P
140+
\fB\-\-reqheader <header>\fR This can be used to add additional HTTP request headers in the correct format \fBHeadername: headercontent\fR\. This parameter can be called multiple times if required\. For example: \fB\-\-reqheader \'Proxy\-Authorization: Basic dGVzdHNzbDpydWxlcw==\' \-\-reqheader \'ClientID: 0xDEADBEAF\'\fR\. REQHEADER is the corresponding environment variable\.
141+
.
139142
.SS "SPECIAL INVOCATIONS"
140143
\fB\-t <protocol>, \-\-starttls <protocol>\fR does a default run against a STARTTLS enabled \fBprotocol\fR\. \fBprotocol\fR must be one of \fBftp\fR, \fBsmtp\fR, \fBpop3\fR, \fBimap\fR, \fBxmpp\fR, \fBxmpp-server\fR, \fBtelnet\fR, \fBldap\fR, \fBirc\fR, \fBlmtp\fR, \fBnntp\fR, \fBpostgres\fR, \fBmysql\fR\. For the latter four you need e\.g\. the supplied OpenSSL or OpenSSL version 1\.1\.1\. Please note: MongoDB doesn\'t offer a STARTTLS connection, LDAP currently only works with \fB\-\-ssl\-native\fR\. \fBtelnet\fR and \fBirc\fR is WIP\.
141144
.

doc/testssl.1.html

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/testssl.1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ The same can be achieved by setting the environment variable `WARNINGS`.
110110

111111
`--basicauth <user:pass>` This can be set to provide HTTP basic auth credentials which are used during checks for security headers. BASICAUTH is the ENV variable you can use instead.
112112

113+
`--reqheader <header>` This can be used to add additional HTTP request headers in the correct format `Headername: headercontent`. This parameter can be called multiple times if required. For example: `--reqheader 'Proxy-Authorization: Basic dGVzdHNzbDpydWxlcw==' --reqheader 'ClientID: 0xDEADBEAF'`. REQHEADER is the corresponding environment variable.
114+
113115

114116
### SPECIAL INVOCATIONS
115117

etc/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ If you want to check trust against e.g. a company internal CA you need to use ``
2828

2929
* ``cipher-mapping.txt`` contains information about all of the cipher suites defined for SSL/TLS
3030

31+
* ``curves-mapping.txt`` contains information about all of the eliptic curves defined by IANA
32+
3133
* ``ca_hashes.txt`` is used for HPKP test in order to have a fast comparison with known CAs. Use
3234
``~/utils/create_ca_hashes.sh`` for an update
3335

etc/client-simulation.wiresharked.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The whole process is done manually.
1414
* Retrieve "handshakebytes" by marking the Record Layer --> Copy --> As a hex stream.
1515
* Figure out "protos" and "tlsvers" by looking at the supported_versions TLS extension (43=0x002b). May work only on modern clients. Be careful as some do not list all TLS versions here (OpenSSL 1.1.1 lists only TLS 1.2/1.3 here)
1616
* Adjust "lowest_protocol" and "highest_protocol" accordingly.
17-
* Get "curves" from at the supported groups TLS extension 10 = 0x00a. Omit any GREASE.
17+
* For "curves" mark the supported groups TLS extension --> Copy --> As a hex stream, remove any leading GREASE ciphers (?a?a) and supply it to `~/utils/hexstream2curves.sh`
1818
* Retrieve "alpn" by looking at the alpn TLS extension 16 (=0x0010).
1919
* Review TLS extension 13 (=0x000d) whether any SHA1 signature algorithm is listed. If not "requiresSha2" is true
2020
* Leave "maxDhBits"/"minDhBits" and "minRsaBits"/"maxRsaBits" at -1, unless you know for sure what the client can handle

0 commit comments

Comments
 (0)