p0dalirius/pyFindUncommonShares 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 GNU General Public License v2.0 许可证,目前获得 440 个 Star、51 次 Fork。
仓库全名
p0dalirius/pyFindUncommonShares
README 摘要
The script FindUncommonShares.py is a Python equivalent of PowerView 's Invoke-ShareFinder.ps1 allowing to quickly find uncommon shares in vast Windows Active Directory Domains. Features [x] Only requires a low privileges domain user account. [x] Automatically gets the list of all computers from the domain controller's LDAP. [x] Ignore the hidden shares (ending with $) with --ignore-hidden-shares. [x] Multithreaded…
When --auth-user uses the DOMAIN\user format, that domain is used for LDAP and SMB authentication. --auth-domain remains the target domain. Quote the username so the shell preserves the backslash.
Usage
$ ./FindUncommonShares.py -h
FindUncommonShares v3.3 - by Remi GASCOU (Podalirius)
usage: FindUncommonShares.py [-h] [-v] [--print-unc] [-q] [--debug] [-no-colors] [-t THREADS] [-ns NAMESERVER] [-tf TARGETS_FILE] [-tt TARGET]
[-tu TARGET_URL] [-tU TARGETS_URLS_FILE] [-tp TARGET_PORTS] [-ad AUTH_DOMAIN] [-ai AUTH_DC_IP] [-au AUTH_USER] [--ldaps]
[--no-ldap] [--subnets] [-tl TARGET_LDAP_QUERY] [--no-pass | -ap AUTH_PASSWORD | -ah AUTH_HASHES | --aes-key hex key] [-k]
[--kdcHost AUTH_KDCHOST] [--check-user-access] [--readable] [--writable] [-iH] [-iP] [-i IGNORED_SHARES] [-s ACCEPTED_SHARES]
[--export-xlsx EXPORT_XLSX] [--export-json EXPORT_JSON] [--export-sqlite EXPORT_SQLITE]
Find uncommon SMB shares on remote machines.
options:
-h, --help show this help message and exit
-v, --verbose Verbose mode. (default: False).
--print-unc Print the corresponding UNC path.
-q, --quiet Show no information at all.
--debug Debug mode. (default: False).
-no-colors Disables colored output mode.
-t THREADS, --threads THREADS
Number of threads (default: 20).
-ns NAMESERVER, --nameserver NAMESERVER
IP of the DNS server to use, instead of the --dc-ip.
Targets:
-tf TARGETS_FILE, --targets-file TARGETS_FILE
Path to file containing a line by line list of targets.
-tt TARGET, --target TARGET
Target IP, FQDN or CIDR.
-tu TARGET_URL, --target-url TARGET_URL
Target URL to the tomcat manager.
-tU TARGETS_URLS_FILE, --targets-urls-file TARGETS_URLS_FILE
Path to file containing a line by line list of target URLs.
-tp TARGET_PORTS, --target-ports TARGET_PORTS
Target ports to scan top search for Apache Tomcat servers.
-ad AUTH_DOMAIN, --auth-domain AUTH_DOMAIN
Target Windows domain. Also used for authentication unless --auth-user is DOMAIN\user.
-ai AUTH_DC_IP, --auth-dc-ip AUTH_DC_IP
IP of the domain controller.
-au AUTH_USER, --auth-user AUTH_USER
Username of the domain account, optionally in DOMAIN\user format.
--ldaps Use LDAPS (default: False)
--no-ldap Do not perform LDAP queries.
--subnets Get all subnets from the domain and use them as targets (default: False)
-tl TARGET_LDAP_QUERY, --target-ldap-query TARGET_LDAP_QUERY
LDAP query to use to extract computers from the domain.
Credentials:
--no-pass Don't ask for password (useful for -k)
-ap AUTH_PASSWORD, --auth-password AUTH_PASSWORD
Password of the domain account.
-ah AUTH_HASHES, --auth-hashes AUTH_HASHES
LM:NT hashes to pass the hash for this user.
--aes-key hex key AES key to use for Kerberos Authentication (128 or 256 bits)
-k, --kerberos Use Kerberos authentication. Grabs credentials from .ccache file (KRB5CCNAME) based on target parameters. If valid credentials cannot
be found, it will use the ones specified in the command line
--kdcHost AUTH_KDCHOST
IP of the domain controller.
Shares:
--check-user-access Check if current user can access the share.
--readable Only list shares that current user has READ access to.
--writable Only list shares that current user has WRITE access to.
-iH, --ignore-hidden-shares
Ignores hidden shares (shares ending with $)
-iP, --ignore-print-queues
Ignores print queues (shares of STYPE_PRINTQ)
-i IGNORED_SHARES, --ignore-share IGNORED_SHARES
Specify shares to ignore explicitly. (e.g., --ignore-share "C$" --ignore-share "Backup")
-s ACCEPTED_SHARES, --show-share ACCEPTED_SHARES
Specify shares to show explicitly. (e.g., --show-share "C$" --show-share "Backup")
Output files:
--export-xlsx EXPORT_XLSX
Output XLSX file to store the results in.
--export-json EXPORT_JSON
Output JSON file to store the results in.
--export-sqlite EXPORT_SQLITE
Output SQLITE3 file to store the results in.
评论