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

add log poisonings #18

Closed
wants to merge 1 commit into from
Closed

add log poisonings #18

wants to merge 1 commit into from

Conversation

klaxon1
Copy link

@klaxon1 klaxon1 commented Oct 1, 2019

to resolve issue: #14

  • new command line argument --log-poisonings POISIONINGSLOG
$ dnsvalidator -h
usage: dnsvalidator [-h] [-t TARGET | -tL TARGET_LIST]
                    [-e EXCLUSION | -eL EXCLUSIONS_LIST] [-o OUTPUT]
                    [-r ROOTDOMAIN] [-q QUERY] [-threads THREADS]
                    [-timeout TIMEOUT] [--no-color] [-v | --silent]
                    [--log-poisonings POISONINGSLOG]

optional arguments:
  -h, --help            show this help message and exit
  -t TARGET             Specify a target DNS server to try resolving.
  -tL TARGET_LIST       Specify a list of target DNS servers to try to
                        resolve. May be a file, or URL to listing
  -e EXCLUSION          Specify an exclusion to remove from any target lists.
  -eL EXCLUSIONS_LIST   Specify a list of exclusions to avoid resolving. May
                        be a file or URL to listing
  -o OUTPUT, --output OUTPUT
                        Destination file to write successful DNS validations
                        to.
  -r ROOTDOMAIN         Specify a root domain to compare to (default:
  -q QUERY              Specify a resolver query to use (default:dnsvalidator)
  -threads THREADS      Specify the maximum number of threads to run
                        (DEFAULT:5)
  -timeout TIMEOUT      Command timeout in seconds (DEFAULT:600)
  --no-color            If set then any foreground or background colours will
                        be stripped out.
  -v, --verbose         If set then verbose output will be displayed in the
                        terminal.
  --silent              If set only findings will be displayed and banners and
                        other information will be redacted.
  --log-poisonings POISONINGSLOG
                        Destination file to write detected poisoned DNS
                        servers to.
  • with new argument
$ dnsvalidator --log-poisonings test.txt
=======================================================
dnsvalidator v0.1	by James McLean (@vortexau) 
                	& Michael Skelton (@codingo_)
=======================================================
[22:00:40] [INFO] [1.1.1.1] resolving baseline
[22:00:40] [INFO] [8.8.8.8] resolving baseline
[22:00:40] [INFO] [9.9.9.9] resolving baseline
[22:00:41] [INFO] [109.86.225.220] Checking...
...
[22:01:24] [ACCEPTED] [156.154.70.40] provided valid response
[22:01:24] [INFO] [208.93.4.81] Checking...
[22:01:24] [ERROR] [208.93.4.81] DNS poisoning detected, logging target to test.txt
[22:01:24] [INFO] [190.56.169.145] Checking...
$ cat test.txt 
208.93.4.81
  • without new argument
$ dnsvalidator
=======================================================
dnsvalidator v0.1	by James McLean (@vortexau) 
                	& Michael Skelton (@codingo_)
=======================================================
[22:04:56] [INFO] [1.1.1.1] resolving baseline
[22:04:57] [INFO] [8.8.8.8] resolving baseline
[22:04:57] [INFO] [9.9.9.9] resolving baseline
[22:04:57] [INFO] [193.36.189.34] Checking...
...
22:07:17] [INFO] [89.216.29.90] Checking...
[22:07:18] [ACCEPTED] [210.57.211.36] provided valid response
[22:07:18] [INFO] [82.99.211.195] Checking...
[22:07:19] [ERROR] [82.99.211.195] DNS poisoning detected, passing
[22:07:19] [INFO] [148.240.167.69] Checking...

@codingo
Copy link
Collaborator

codingo commented Oct 1, 2019

Don't have a chance to look at this currently, but before merging this should also be tested with --silent (should be suppressed).

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants