Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testssl.sh/testssl.sh -t smtp -pretty-json - multiple servers #598

Closed
rzmf opened this issue Jan 25, 2017 · 6 comments
Closed

testssl.sh/testssl.sh -t smtp -pretty-json - multiple servers #598

rzmf opened this issue Jan 25, 2017 · 6 comments

Comments

@rzmf
Copy link

rzmf commented Jan 25, 2017

If a scan is performed against a domain with multiple Mailservers the generated json is imho not very useful:
`
"scanResult" : {

                "service"           : [],

                "protocols"         : [...],

                ....
                "serverDefaults" : [.... id cn <hostname> ],
                ...........
                "service"           : [],
                "protocols"         : [...],
                ....
                "serverDefaults" : [.... id cn <hostname2> ]

`

no way to match any info out of serverDefaults to a specific host or do i have a false understanding of the output?

@drwetter
Copy link
Collaborator

I think the latter but you gotta throw more info in here ;), see https://github.com/drwetter/testssl.sh/wiki/Bug-reporting. At least the cmd line and your expectation. IP is the bottom, cmd line incl. host see top.

@rzmf
Copy link
Author

rzmf commented Jan 26, 2017

testssl version from the banner (testssl.sh -b 2>/dev/null | head -4 | tail -2)

$ ./testssl.sh -b 2>/dev/null | head -4 | tail -2 testssl.sh 2.9dev from https://testssl.sh/dev/ (bc31639 2017-01-24 20:26:05 -- )

target IP
testssl.sh command line

./testssl.sh -t smtp --jsonfile-pretty ../out/test --mx mailbox.org

openssl version used (testssl.sh -b 2>/dev/null | head -16 | tail -3)

testssl.sh -b 2>/dev/null | head -16 | tail -3

Using "OpenSSL 1.0.2-chacha (1.0.2i-dev)" [~183 ciphers] on ......:$PWD/bin/openssl.Linux.x86_64 (built: "Jun 22 19:32:29 2016", platform: "linux-x86_64")

Your operating system (uname -a)

Linux ....... 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

what was happening (output is useful!) and what did you expect

happening:
`{
"Invocation" : "testssl.sh -t smtp --jsonfile-pretty ../out/test --mx mailbox.org",
"at" : "l.....................:$PWD/bin/openssl.Linux.x86_64",
"version" : "2.9dev bc31639 from 2017-01-24",
"openssl" : "1.0.2-chacha from Jun 22 19:32:29 2016",
"target host" : "",
"port" : "25",
"startTime" : "1485413349",
"scanResult" : {
"service" : [

                ],
                "protocols"         : [
                        {
                            "id"           : "sslv2",
                            "severity"     : "OK",
                            "finding"      : "SSLv2 is not offered"

                ..................... repeated for each MX .....
                "service"           : [

                ],
                "protocols"         : [
                        {
                            "id"           : "sslv2",
                            "severity"     : "OK",
                            "finding"      : "SSLv2 is not offered"

}`

In the whole output there is no indication of the actual server(s) tested, and no way to distinguish the results for the different servers.

expecting:
useful json for parsing out cipher & other infos per MX host

(note that mailbox.org is just a random example and has nothing to do with me, i am not even a customer there)

@drwetter
Copy link
Collaborator

drwetter commented Jan 26, 2017 via email

@AlGreed
Copy link
Contributor

AlGreed commented Jan 28, 2017

The problem is in --json-pretty, cos it does not support multiple servers.

you won't have this problem with --json. Each block has an ip address:

[
        {
              "id"           : "sslv2",
              "ip"           : "server1",
              "port"         : "25",
              "severity"     : "OK",
              "finding"      : "SSLv2 is not offered"
         }
,        {
              "id"           : "sslv3",
              "ip"           : "server2",
              "port"         : "25",
              "severity"     : "OK",
              "finding"      : "SSLv3 is not offered"
         }

P.S.: i ll take a look if it is possible to add this feature for json-pretty.

@drwetter
Copy link
Collaborator

i ll take a look if it is possible to add this feature for json-pretty.

the charming thing with json-pretty is that it is (now) being defined upfront.

@drwetter
Copy link
Collaborator

closed via 2ea3789 . Thx @AlGreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants