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 option to specify targets from file #27

Closed jiayuqi7813 closed 7 months ago

jiayuqi7813 commented 7 months ago

The DC is close ldap,cant get computers,but I have computers ip list in IP.txt,How do I operate

CaledoniaProject commented 7 months ago

The current scan target is populated from the ldap query. Need an cli argument to load the IP or FQDN from a file, one per line.

We're trying to create a periodic task to scan the shares for bad permissions / sensitive files. In a large corporation there could be tons of unwanted targets, so it's best to let the users to select the targets.

CaledoniaProject commented 7 months ago

You could also add an option to extract the targets from NMAP XML output, e.g protocol is SMB, or port is 445 when fingerprinting is not enabled

p0dalirius commented 7 months ago

Hi,

New features are now implemented in release 3.2 (753e277)

If you want to scan only one IP without using LDAP:

./FindUncommonShares.py -tt 192.168.1.12 -au "$USER" -ap "$PASSWORD" -ai "$DC_IP" -ns $DC_IP --no-ldap

If you want to scan only multiple IPs without using LDAP:

./FindUncommonShares.py -tt 192.168.1.12 -tt 192.168.1.13 -au "$USER" -ap "$PASSWORD" -ai "$DC_IP" -ns $DC_IP --no-ldap

If you want to scan only multiple IPs or CIDR ranges from a file without using LDAP:

./FindUncommonShares.py -tf targets.txt -au "$USER" -ap "$PASSWORD" -ai "$DC_IP" -ns $DC_IP --no-ldap

Let me know if you encounter any problem,

Best regards,