p0dalirius / pyFindUncommonShares

FindUncommonShares is a Python script allowing to quickly find uncommon shares in vast Windows Domains, and filter by READ or WRITE accesses.
https://podalirius.net/
392 stars 47 forks source link

[enhancement] Add support of custom dns server instead of the DC #9

Closed CaledoniaProject closed 1 year ago

CaledoniaProject commented 1 year ago

Can you an argument to support custom dnsserver instead of dc-ip? Also, please print something when DNS resolve failed. Right now I had to modify the script to make it work.

p0dalirius commented 1 year ago

Good point, I'll add an option and debug info for this :)

p0dalirius commented 1 year ago

Implemented option in https://github.com/p0dalirius/FindUncommonShares/commit/38f05d53ee92079113b2b0eb894c7c589b1e51aa:

  -ns NAMESERVER, --nameserver NAMESERVER
                        IP of the DNS server to use, instead of the --dc-ip.

Example usage:

$ ./FindUncommonShares.py -u Administrator -p 'Admin123!' -d LAB.local --dc-ip 192.168.1.71 --show-share C$ --nameserver 192.168.1.21 
FindUncommonShares v2.5 - by @podalirius_

[>] Extracting all computers ...
[+] Found 2 computers in the domain. 

[>] Enumerating shares ...
[>] Found 'C$' on 'TDC01.DOMAIN.local' (comment: 'Default share')