MANSPIDER: Crawl SMB shares for juicy information
MAN-SPIDER
Crawl SMB shares for juicy information. File content searching + regex is supported!
File types supported:
- DOCX
- XLSX
- PPTX
- any text-based format
- and many more!!
MAN-SPIDER will crawl every share on every target system. If provided creds don’t work, it will fall back to “guest”, then to a null session.
Installation
Optional) Install these dependencies to add additional file parsing capability:
# for images (png, jpeg)
$ sudo apt install tesseract tesseract-data-eng
# for legacy document support (.doc)
$ sudo apt install antiword
Install manspider (please be patient, this can take a while):
$ pip install pipx
$ pipx install man-spider
Use
Example #1: Search the network for filenames that may contain creds
NOTE: matching files are automatically downloaded into $HOME/.manspider/loot! (-n to disable)
$ manspider 192.168.0.0/24 -f passw user admin account network login logon cred -d evilcorp -u bob -p Passw0rd
Example #2: Search for XLSX files containing “password”
$ manspider share.evilcorp.local -c password -e xlsx -d evilcorp -u bob -p Passw0rd
Example #3: Search for interesting file extensions
$ manspider share.evilcorp.local -e bat com vbs ps1 psd1 psm1 pem key rsa pub reg txt cfg conf config -d evilcorp -u bob -p Passw0rd
Example #4: Search for finance-related files
This example searches financy-sounding directories for filenames containing 5 or more consecutive numbers (e.g. 000202006.EFT )
$ manspider share.evilcorp.local –dirnames bank financ payable payment reconcil remit voucher vendor eft swift -f ‘[0-9]{5,}’ -d evilcorp -u bob -p Passw0rd
Usage Tip #1:
You can run multiple instances of manspider at once. This is useful when you want to search local files (similar to grep -R). You can also specify the keyword loot as the target, which searches the downloaded files in $HOME/.manspider/loot.
Usage Tip #2:
Reasonable defaults help prevent unwanted scenarios like getting stuck on a single target. All of these can be overridden:
- default spider depth: 10 (override with -m)
- default max filesize: 10MB (override with -s)
- default threads: 5 (override with -t)
- shares excluded: C$, IPC$, ADMIN$, PRINT$ (override with –exclude-sharenames)
Usage Tip #3:
Manspider accepts any combination of the following as targets:
- IPs
- hostnames
- subnets (CIDR format)
- files containing any of the above
- local folders containing files
For example, you could specify any or all of these:
- 192.168.1.250
- share.evilcorp.local
- 192.168.1.0/24
- smb_hosts.txt
- loot (to search already-downloaded files)
- /mnt/share (to recursively search a directory)
- NOTE: when searching local files, you must specify a directory, not an individual file