
संपूर्ण नेटवर्कों में SMB शेयर्स पर स्थित आकर्षक फ़ाइलों की खोज करें। फ़ाइल नाम या फ़ाइल सामग्री खोजें - regex समर्थित है!
Manspider 2.0 आ गया है! इसके साथ महत्वपूर्ण सुधार आए हैं:
--modified-after और --modified-before के साथ फ़ाइलों को संशोधन तिथि द्वारा खोजें
PDFDOCXXLSXPPTX
# बिना इंस्टॉल किए सीधे चलाएं
uvx --from git+https://github.com/blacklanternsecurity/MANSPIDER manspider --help
# वैश्विक रूप से इंस्टॉल करें
uv tool install git+https://github.com/blacklanternsecurity/MANSPIDER
# चलाएं
manspider --help
pipx install git+https://github.com/blacklanternsecurity/MANSPIDER
Manspider विभिन्न फ़ाइल फ़ॉर्मेट से टेक्स्ट निष्कर्षण के लिए Kreuzberg का उपयोग करता है। कुछ फ़ॉर्मेट के लिए अतिरिक्त सिस्टम निर्भरताओं की आवश्यकता होती है:
# इमेज (PNG, JPEG आदि) से OCR टेक्स्ट निष्कर्षण के लिए
sudo apt install tesseract-ocr
# लीगेसी Microsoft Office फ़ॉर्मेट समर्थन (.doc, .xls) के लिए
# Kreuzberg रूपांतरण के लिए LibreOffice का उपयोग करता है
sudo apt install libreoffice
इन निर्भरताओं के बिना: Manspider PDF, DOCX, XLSX, PPTX और टेक्स्ट फ़ाइलों के लिए काम करेगा, लेकिन इमेज OCR और लीगेसी Office फ़ॉर्मेट को छोड़ देगा।
docker run --rm -v ./manspider:/root/.manspider blacklanternsecurity/manspider --help
नोट: एक सहायक स्क्रिप्ट manspider.sh भी है जो manspider के loot और logs निर्देशिकाओं के लिए स्वचालित रूप से वॉल्यूम माउंट करेगी, जिससे इसे चलाना थोड़ा अधिक सुविधाजनक हो जाता है:
./manspider.sh --help
नोट: मैच करने वाली फ़ाइलें स्वचालित रूप से $HOME/.manspider/loot में डाउनलोड हो जाती हैं! (अक्षम करने के लिए -n)
$ manspider 192.168.0.0/24 -f passw user admin account network login logon cred -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -f passw -e xlsx csv -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -c passw -e xlsx csv docx pdf -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -e bat com vbs ps1 psd1 psm1 pem key rsa pub reg pfx cfg conf config vmdk vhd vdi dit -d evilcorp -u bob -p Passw0rd
यह उदाहरण वित्तीय-लगने वाली निर्देशिकाओं में ऐसे फ़ाइलनाम खोजता है जिनमें 5 या अधिक क्रमागत संख्याएँ हों (जैसे 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
$ manspider share.evilcorp.local -e ppk rsa pem ssh rsa -o -f id_rsa id_dsa id_ed25519 -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -e '' -c 'BEGIN .{1,10} PRIVATE KEY' -d evilcorp -u bob -p Passw0rd
# .kdbx - KeePass Password Database (KeePass, KeePassXC)
# .kdb - KeePass Classic Database (KeePass 1.x)
# .1pif - 1Password Interchange Format (1Password)
# .agilekeychain - Agile Keychain Format (1Password, deprecated)
# .opvault - OPVault Format (1Password)
# .lpd - LastPass Data File (LastPass)
# .dashlane - Dashlane Data File (Dashlane)
# .psafe3 - Password Safe Database (Password Safe)
# .enpass - Enpass Password Manager Data File (Enpass)
# .bwdb - Bitwarden Database (Bitwarden)
# .msecure - mSecure Password Manager Data File (mSecure)
# .stickypass - Sticky Password Data File (Sticky Password)
# .pwm - Password Memory Data File (Password Memory)
# .rdb - RoboForm Data File (RoboForm)
# .safe - SafeInCloud Password Manager Data File (SafeInCloud)
# .zps - Zoho Vault Encrypted Data File (Zoho Vault)
# .pmvault - SplashID Safe Data File (SplashID Safe)
# .mywallet - MyWallet Password Manager Data File (MyWallet)
# .jpass - JPass Password Manager Data File (JPass)
# .pwmdb - Universal Password Manager Database (Universal Password Manager)
$ manspider share.evilcorp.local -e kdbx kdb 1pif agilekeychain opvault lpd dashlane psafe3 enpass bwdb msecure stickypass pwm rdb safe zps pmvault mywallet jpass pwmdb -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -e pfx p12 pkcs12 pem key crt cer csr jks keystore key keys der -d evilcorp -u bob -p Passw0rd
$ manspider share.evilcorp.local -e docx xlsx pdf --modified-after 2026-01-01 -d evilcorp -u bob -p Passw0rd
आप एक समय में manspider के कई इंस्टेंस चला सकते हैं। यह तब उपयोगी होता है जब एक इंस्टेंस पहले से चल रहा हो और आप डाउनलोड की गई फ़ाइलों को खोजना चाहते हैं (grep -R के समान)। ऐसा करने के लिए, लक्ष्य के रूप में कीवर्ड loot निर्दिष्ट करें, जो $HOME/.manspider/loot में डाउनलोड की गई फ़ाइलों को खोजेगा।
उचित डिफ़ॉल्ट अवांछित परिदृश्यों को रोकने में मदद करते हैं, जैसे किसी एक लक्ष्य पर फँसना। इन सभी को ओवरराइड किया जा सकता है:
-m से ओवरराइड करें)-s से ओवरराइड करें)-t से ओवरराइड करें)C$, IPC$, ADMIN$, PRINT$ ( --exclude-sharenames से ओवरराइड करें)Manspider निम्नलिखित में से किसी भी संयोजन को लक्ष्य के रूप में स्वीकार करता है:
उदाहरण के लिए, आप इनमें से कोई भी या सभी निर्दिष्ट कर सकते हैं:
192.168.1.250share.evilcorp.local192.168.1.0/24smb_hosts.txtloot (पहले से डाउनलोड की गई फ़ाइलों को खोजने के लिए)/mnt/share (एक निर्देशिका को पुनरावर्ती रूप से खोजने के लिए)
usage: manspider [-h] [-u USERNAME] [-p PASSWORD] [-d DOMAIN] [-l LOOT_DIR] [-m MAXDEPTH] [-H HASH] [-k] [-aesKey HEX] [-dc-ip IP] [-t THREADS] [-f REGEX [REGEX ...]] [-e EXT [EXT ...]]
[--exclude-extensions EXT [EXT ...]] [-c REGEX [REGEX ...]] [--sharenames SHARE [SHARE ...]] [--exclude-sharenames [SHARE ...]] [--dirnames DIR [DIR ...]]
[--exclude-dirnames DIR [DIR ...]] [-q] [-n] [-mfail INT] [-o] [-s SIZE] [-v]
targets [targets ...]
Scan for juicy data on SMB shares. Matching files and logs are stored in $HOME/.manspider. All filters are case-insensitive.
positional arguments:
targets IPs, Hostnames, CIDR ranges, or files containing targets to spider (NOTE: local searching also supported, specify directory name or keyword "loot" to search
downloaded files)
options:
-h, --help show this help message and exit
-u, --username USERNAME
username for authentication
-p, --password PASSWORD
password for authentication
-d, --domain DOMAIN domain for authentication
-l, --loot-dir LOOT_DIR
loot directory (default ~/.manspider/)
-m, --maxdepth MAXDEPTH
maximum depth to spider (default: 10)
-H, --hash HASH NTLM hash for authentication
-k, --kerberos Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters
-aesKey, --aes-key HEX
AES key to use for Kerberos Authentication (128 or 256 bits)
-dc-ip, --dc-ip IP IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
-t, --threads THREADS
concurrent threads (default: 5)
-f, --filenames REGEX [REGEX ...]
filter filenames using regex (space-separated)
-e, --extensions EXT [EXT ...]
only show filenames with these extensions (space-separated, e.g. `docx xlsx` for only word & excel docs)
--exclude-extensions EXT [EXT ...]
ignore files with these extensions
-c, --content REGEX [REGEX ...]
search for file content using regex (multiple supported)
--sharenames SHARE [SHARE ...]
only search shares with these names (multiple supported)
--exclude-sharenames [SHARE ...]
don't search shares with these names (multiple supported)
--dirnames DIR [DIR ...]
only search directories containing these strings (multiple supported)
--exclude-dirnames DIR [DIR ...]
don't search directories containing these strings (multiple supported)
-q, --quiet don't display matching file content
-n, --no-download don't download matching files
-mfail, --max-failed-logons INT
limit failed logons
-o, --or-logic use OR logic instead of AND (files are downloaded if filename OR extension OR content match)
-s, --max-filesize SIZE
don't retrieve files over this size, e.g. "500K" or ".5M" (default: 10M)
-v, --verbose show debugging messages
--modified-after DATE
only show files modified after this date (format: YYYY-MM-DD)
--modified-before DATE
only show files modified before this date (format: YYYY-MM-DD)
नोट: पूर्ण परीक्षण सूट चलाने के लिए ऊपर सूचीबद्ध वैकल्पिक सिस्टम निर्भरताओं (tesseract-ocr और libreoffice) की आवश्यकता होती है।
# परीक्षण चलाएं
uv run pytest tests/
यह प्रोजेक्ट लिंटिंग और फ़ॉर्मेटिंग के लिए ruff का उपयोग करता है।
# लिंटर चलाएं
uv run ruff check .
# ऑटो-फिक्स के साथ लिंटर चलाएं
uv run ruff check --fix .
# फ़ॉर्मेटर चलाएं
uv run ruff format .