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

DNS operation timed out #23

Closed
airwawekz opened this issue Mar 21, 2020 · 6 comments
Closed

DNS operation timed out #23

airwawekz opened this issue Mar 21, 2020 · 6 comments

Comments

@airwawekz
Copy link

Hi, I got this error:

https://prnt.sc/rkc05a

How can I solve that?

@initstring
Copy link
Owner

Thanks for opening an issue!

I'd rather not click that link. Can you please paste in the text of the command that you ran and also the full text of the error?

Thanks!

@airwawekz
Copy link
Author

airwawekz commented Mar 21, 2020

Sure!

input: python3 cloud_enum.py -k sitename -k site.com -k blockchaindoohickey --logfile LOGFILE -t 100

output:



++++++++++++++++++++++++++
       azure checks
++++++++++++++++++++++++++

[+] Checking for Azure Storage Accounts
[*] Brute-forcing a list of 894 possible DNS names
Traceback (most recent call last):
  File "cloud_enum.py", line 234, in <module>
    main()
  File "cloud_enum.py", line 221, in main
    azure_checks.run_all(names, args)
  File "/root/tools/cloud_enum/enum_tools/azure_checks.py", line 291, in run_all
    args.nameserver)
  File "/root/tools/cloud_enum/enum_tools/azure_checks.py", line 78, in check_storage_accounts
    threads=threads)
  File "/root/tools/cloud_enum/enum_tools/utils.py", line 139, in fast_dns_lookup
    results = pool.map(dns_lookup_params, batch)
  File "/usr/lib/python3.7/multiprocessing/pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
  File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/root/tools/cloud_enum/enum_tools/utils.py", line 113, in dns_lookup
    res.query(name)
  File "/usr/lib/python3/dist-packages/dns/resolver.py", line 992, in query
    timeout = self._compute_timeout(start, lifetime)
  File "/usr/lib/python3/dist-packages/dns/resolver.py", line 799, in _compute_timeout
    raise Timeout(timeout=duration)
dns.exception.Timeout: The DNS operation timed out after 30.001579761505127 seconds
root@kali:~/tools/cloud_enum# 

@initstring
Copy link
Owner

initstring commented Mar 22, 2020

For some reason, your operating systems is not able to contact the default DNS server the tool uses (8.8.8.8).

Can you try running the tools with the -ns switch and provide your own DNS server?

Also, maybe try less than 100 threads. Start with 5 and go from there.

@airwawekz
Copy link
Author

I have the same error on Kali VMware and DigitalOcean with my DNS server and low threads no. :(

@initstring
Copy link
Owner

Hmmmm...

Well, DNS enumeration is only needed for Azure. So let's try this to quickly test:

python3 cloud_enum.py --disable-aws --disable-gcp -t 5 -k test

That will use the built-in 8.8.8.8 DNS server. If it fails, you can then do this:

dig test.com @8.8.8.8

Do they both fail? Then, you can try them again with another nameserver:

python3 cloud_enum.py --disable-aws --disable-gcp -t 5 -k test -ns 1.1.1.1
dig test.com @1.1.1.1

If you consistently get failures from both dig and cloud_enum, then you need to troubleshoot your access to the DNS servers you are providing. If you are getting only errors from cloud_enum, then let me know.

Also, does the error come up right away when it gets to DNS? Or does it make some process at all before crashing?

Thanks!

@airwawekz
Copy link
Author

That works without AWS. Thank you!

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

2 participants