
الإصدار الحالي: v1.4 (20222.09.03)
أداة سطر أوامر متقدمة مصممة لتخمين الدلائل والملفات في خوادم الويب، وتُعرف أيضًا باسم ماسح مسارات الويب
الفكرة بواسطة @maurosoria و@shelld3v
Developement-2022 يتم تطويره بنشاط بواسطة @nu11secur1ty
المتطلب: python 3.10.5 أو أحدث
اختر أحد خيارات التثبيت التالية:
git clone https://github.com/nu11secur1ty/insect.git --depth 1 (موصى به)docker build -t "insect:latest" . (يمكن العثور على مزيد من المعلومات هنا)pip3 install dirsearchsudo apt-get install dirsearch (مهمل)الملخص:
%EXT% بامتدادات من خيار -e.%EXT% (مثل SecLists)، فإن مفتاح -f | --force-extensions مطلوب لإلحاق الامتدادات بكل كلمة في قائمة الكلمات، بالإضافة إلى /.wordlist1.txt,wordlist2.txt.أمثلة:
سيؤدي تمرير **asp** و **aspx** كامتدادات إلى توليد القاموس التالي:```
index
index.asp
index.aspx
سيؤدي تمرير **php** و **html** كامتدادات مع علامة **-f**/**--force-extensions** إلى إنشاء القاموس التالي:```
admin
admin.php
admin.html
admin/
عند تمرير **jsp** و**jspa** كامتدادات مع العلم **-O**/**--overwrite-extensions** سيتم توليد القاموس التالي:```
login.html
login.jsp
login.jspa
الخيارات -------``` Usage: insect.py [-u|--url] target [-e|--extensions] extensions [options]
Options: --version show program's version number and exit -h, --help show this help message and exit
Mandatory:
-u URL, --url=URL Target URL(s), support multiple flags
-l PATH, --url-file=PATH
URL list file
--stdin Read URL(s) from STDIN
--cidr=CIDR Target CIDR
--raw=PATH Load raw HTTP request from file (use --scheme flag
to set the scheme)
-s SESSION_FILE, --session=SESSION_FILE
Session file
--config=PATH Full path to config file, see 'config.ini' for
example (Default: config.ini)
Dictionary Settings:
-w WORDLISTS, --wordlists=WORDLISTS
Customize wordlists (separated by commas)
-e EXTENSIONS, --extensions=EXTENSIONS
Extension list separated by commas (e.g. php,asp)
-f, --force-extensions
Add extensions to the end of every wordlist entry. By
default insect only replaces the %EXT% keyword with
extensions
-O, --overwrite-extensions
Overwrite other extensions in the wordlist with your
extensions (selected via -e)
--exclude-extensions=EXTENSIONS
Exclude extension list separated by commas (e.g.
asp,jsp)
--remove-extensions
Remove extensions in all paths (e.g. admin.php ->
admin)
--prefixes=PREFIXES
Add custom prefixes to all wordlist entries (separated
by commas)
--suffixes=SUFFIXES
Add custom suffixes to all wordlist entries, ignore
directories (separated by commas)
-U, --uppercase Uppercase wordlist
-L, --lowercase Lowercase wordlist
-C, --capital Capital wordlist
General Settings: -t THREADS, --threads=THREADS Number of threads -r, --recursive Brute-force recursively --deep-recursive Perform recursive scan on every directory depth (e.g. api/users -> api/) --force-recursive Do recursive brute-force for every found path, not only directories -R DEPTH, --max-recursion-depth=DEPTH Maximum recursion depth --recursion-status=CODES Valid status codes to perform recursive scan, support ranges (separated by commas) --subdirs=SUBDIRS Scan sub-directories of the given URL[s] (separated by commas) --exclude-subdirs=SUBDIRS Exclude the following subdirectories during recursive scan (separated by commas) -i CODES, --include-status=CODES Include status codes, separated by commas, support ranges (e.g. 200,300-399) -x CODES, --exclude-status=CODES Exclude status codes, separated by commas, support ranges (e.g. 301,500-599) --exclude-sizes=SIZES Exclude responses by sizes, separated by commas (e.g. 0B,4KB) --exclude-texts=TEXTS Exclude responses by texts, separated by commas (e.g. 'Not found', 'Error') --exclude-regex=REGEX Exclude responses by regex (e.g. '^Error$') --exclude-redirect=STRING Exclude responses if this regex (or text) matches redirect URL (e.g. '/index.html') --exclude-response=PATH Exclude responses similar to response of this page, path as input (e.g. 404.html) --skip-on-status=CODES Skip target whenever hit one of these status codes, separated by commas, support ranges --min-response-size=LENGTH Minimum response length --max-response-size=LENGTH Maximum response length --max-time=SECONDS Maximum runtime for the scan
Request Settings: -m METHOD, --http-method=METHOD HTTP method (default: GET) -d DATA, --data=DATA HTTP request data --data-file=PATH File contains HTTP request data -H HEADERS, --header=HEADERS HTTP request header, support multiple flags --header-file=PATH File contains HTTP request headers -F, --follow-redirects Follow HTTP redirects --random-agent Choose a random User-Agent for each request --auth=CREDENTIAL Authentication credential (e.g. user:password or bearer token) --auth-type=TYPE Authentication type (basic, digest, bearer, ntlm, jwt, oauth2) --cert-file=PATH File contains client-side certificate --key-file=PATH File contains client-side certificate private key (unencrypted) --user-agent=USERAGENT --cookie=COOKIE
Connection Settings: --timeout=TIMEOUT Connection timeout --delay=DELAY Delay between requests --proxy=PROXY Proxy URL, support HTTP and SOCKS proxies (e.g. localhost:8080, socks5://localhost:8088) --proxy-file=PATH File contains proxy servers --proxy-auth=CREDENTIAL Proxy authentication credential --replay-proxy=PROXY Proxy to replay with found paths --tor Use Tor network as proxy --scheme=SCHEME Scheme for raw request or if there is no scheme in the URL (Default: auto-detect) --max-rate=RATE Max requests per second --retries=RETRIES Number of retries for failed requests --ip=IP Server IP address --exit-on-error Exit whenever an error occurs
Advanced Settings: --crawl Crawl for new paths in responses
View Settings: --full-url Full URLs in the output (enabled automatically in quiet mode) --redirects-history Show redirects history --no-color No colored output -q, --quiet-mode Quiet mode
Output Settings: -o PATH, --output=PATH Output file --format=FORMAT Report format (Available: simple, plain, json, xml, md, csv, html, sqlite) --log=PATH Log file
الإعدادات
---------------
يمكن تعديل القيم الافتراضية لخيارات dirsearch و insect في ملف الإعدادات، الافتراضي هو `config.ini` ولكن يمكنك تحديد ملف آخر باستخدام خيار `--config````ini
# If you want to edit dirsearch or insect default configurations, you can
# edit values in this file. Everything after `#` is a comment
# and won't be applied
[general]
threads = 25
recursive = False
deep-recursive = False
force-recursive = False
recursion-status = 200-399,401,403
max-recursion-depth = 0
exclude-subdirs = %%ff/,.;/,..;/,;/,./,../,%%2e/,%%2e%%2e/
random-user-agents = False
max-time = 0
# subdirs = /,api/
# include-status = 200-299,401
# exclude-status = 400,500-999
# exclude-sizes = 0b,123gb
# exclude-texts = "Not found"
# exclude-regex = "^403$"
# exclude-redirect = "*/error.html"
# exclude-response = 404.html
# skip-on-status = 429,999
[dictionary]
default-extensions = php,aspx,jsp,html,js
force-extensions = False
overwrite-extensions = False
lowercase = False
uppercase = False
capitalization = False
# exclude-extensions = old,log
# prefixes = .,admin
# suffixes = ~,.bak
# wordlists = /path/to/wordlist1.txt,/path/to/wordlist2.txt
[request]
httpmethod = get
follow-redirects = False
# headers-file = /path/to/headers.txt
# user-agent = MyUserAgent
# cookie = SESSIONID=123
[connection]
timeout = 7.5
delay = 0
max-rate = 0
max-retries = 1
exit-on-error = False
## By disabling `scheme` variable, insect will automatically identify the URI scheme
# scheme = http
# proxy = localhost:8080
# proxy-file = /path/to/proxies.txt
# replay-proxy = localhost:8000
[advanced]
crawl = False
[view]
full-url = False
quiet-mode = False
color = True
show-redirects-history = False
[output]
## Support: plain, simple, json, xml, md, csv, html, sqlite
report-format = plain
autosave-report = True
# log-file = /path/to/insect.log
# report-output-folder = /path/to/reports

بعض الأمثلة لاستخدام dirsearch و insect - هذه هي الوسائط الأكثر شيوعًا. إذا احتجت إلى كل الوسائط، فقط استخدم الوسيط -h.
python3 insect.py -u https://target
لم يتم تضمين أي محتوى في الإدخال ليتم ترجمته. يرجى توفير نص الترجمة المطلوب.```
python3 insect.py -e php,html,js -u https://target
---
### إيقاف التقدم مؤقتًا
يتيح لك كل من dirsearch و insect إيقاف تقدم الفحص مؤقتًا باستخدام CTRL+C، ومن هنا، يمكنك حفظ التقدم (والمتابعة لاحقًا)، أو تخطي الهدف الحالي، أو تخطي الدليل الفرعي الحالي.
<img src="https://assets.kitploit.com/production/public/readmes/42137/d4cf979db78841d0c0f16abb177e5084211820c23e8adaf587f0bb3faf0e25b4.png" alt="Pausing insect" width="475px">
----
### التكرار (Recursion)
- البحث التكراري (Recursive brute-force) هو استمرار البحث بالقوة الغاشمة في ما بعد الدلائل التي تم العثور عليها. على سبيل المثال، إذا وجد insect `admin/`، فسيقوم بالبحث في `admin/*` (`*` هو مكان البحث). لتفعيل هذه الميزة، استخدم الخيار **-r** (أو **--recursive**)```
python3 insect.py -e php,html,js -u https://target -r
- هناك خياران إضافيان: **--force-recursive** و **--deep-recursive**
- **Force recursive**: نفّذ هجوم القوة الغاشمة بشكل تكراري على جميع المسارات المكتشفة، وليس فقط المسارات التي تنتهي بـ `/`
- **Deep recursive**: هجوم القوة الغاشمة التكراري على جميع أعماق المسار (`a/b/c` => يضيف `a/`, `a/b/`)
- إذا كانت هناك أدلة فرعية لا تريد تنفيذ هجوم القوة الغاشمة عليها بشكل تكراري، استخدم `--exclude-subdirs````
python3 insect.py -e php,html,js -u https://target -r --exclude-subdirs image/,media/,css/
يشير رقم الخيط (-t | --threads) إلى عدد عمليات القوة العمياء المنفصلة. وكلما زاد رقم الخيط، زادت سرعة تشغيل dirsearch أو insect. افتراضيًا، يكون عدد الخيوط 25، لكن يمكنك زيادته إذا أردت تسريع التقدم.
على الرغم من ذلك، لا تزال السرعة تعتمد بشكل كبير على زمن استجابة الخادم. وكتحذير، ننصحك ألا يكون عدد الخيوط كبيرًا جدًا لأنه قد يتسبب في DoS (رفض الخدمة).``` python3 insect.py -e php,htm,js,bak,zip,tgz,txt -u https://target -t 20
### البادئات / اللواحق
- **--prefixes**: أضف بادئات مخصصة لجميع الإدخالات```
python3 insect.py -e php -u https://target --prefixes .,admin,_
قائمة الكلمات:``` tools
تم التوليد بالبادئات:```
tools
.tools
admintools
_tools
قائمة الكلمات:```
index.php
internal
تم إنشاؤه باستخدام اللواحق:``` index.php internal index.php~ internal~
### القائمة السوداء
داخل مجلد `db/`، توجد عدة «ملفات قائمة سوداء». سيتم استبعاد المسارات الموجودة في تلك الملفات من نتيجة الفحص إذا كانت لها نفس الحالة المذكورة في اسم الملف.
مثال: إذا أضفت `admin.php` إلى `db/403_blacklist.txt`، فكلما أجريت فحصًا وأعاد `admin.php` الحالة 403، سيتم استبعاده من النتيجة.
----
### المرشحات
استخدم **-i | --include-status** و **-x | --exclude-status** لتحديد أكواد حالة الاستجابة المسموح بها وغير المسموح بها
لمزيد من المرشحات المتقدمة: **--exclude-sizes**، **--exclude-texts**، **--exclude-regexps**، **--exclude-redirects** و **--exclude-response**```
python3 insect.py -e php,html,js -u https://target --exclude-sizes 1B,243KB
|HSTP-LS|برنامج نصي بسيط مع واجهة مستخدم رسومية لتجاوز قفل الشاشة الآمن في أندرويد| |Nipe|برنامج نصي لإعادة توجيه كل حركة المرور من الجهاز إلى شبكة Tor.| |BlackWidow|زاحف ويب مبني على بايثون لجمع النطاقات الفرعية، وعناوين URL’s، والمعاملات الديناميكية، وعناوين البريد الإلكتروني، وأرقام الهواتف من موقع ويب مستهدف.| |Monitorizer|أداة تراقب مستودعات github بحثًا عن تغييرات في النطاقات الفرعية وتُرسل إشعارات عبر قنوات متعددة| |DCVC|DeepCreamPy ولكن بلغة Rust: شبكة التفافية عميقة لإزالة الرقابة عن محتوى الهنتاي| |SpiderSuite|زاحف ويب متقدم متعدد المنصات وواجهة مستخدم رسومية متعددة الميزات لمحترفي الأمن السيبراني| |RED HAWK|أداة شاملة لجمع المعلومات وفحص الثغرات والزحف. أداة لا غنى عنها لجميع مختبري الاختراق.| |MayorSecDNSTunnel|بيئة مختبرية لنفق DNS لعرض نفق DNS| |Digger|أداة Digger لجمع وإجراء عمليات بحث متقدمة عن تكوين AWS المكشوف| |Pown CDN|Pown CDN هي أداة استطلاع لتحديد CDN الأمامي المستخدم بواسطة تطبيق ويب بسرعة| |Pown Reflected|Reflected هي أداة لتحديد المعاملات المنعكسة في تطبيقات الويب| |Pown Duct|Pown Duct هي أداة للعثور على تسرب البيانات، مثل مفاتيح AWS، في ردود تطبيق ويب| |Pown Request|Pown Request هي أداة تستفيد من Chrome بدون واجهة رسومية لتنفيذ طلبات HTTP| |Pown Proxy|Pown Proxy هي أداة لاعتراض وتسجيل حركة مرور HTTP وHTTPS| |Pown DB|Pown DB هي أداة لجمع المعلومات من قواعد بيانات SQL| |Pown Dist|Pown Dist هي أداة لتحديد نوع توزيع نظام تشغيل المضيف المستهدف| |Pown Preferences|Pown Preferences هي أداة لجمع معلومات حول تفضيلات المستخدم|``` python3 insect.py -e php,html,js -u https://target --exclude-texts "403 Forbidden"
| `7` | متوسط | معقد إلى حد ما |
| `8` | مرتفع | معقد، وغالبًا بصلاحيات مميزة |
| `9` | حرج| معقد للغاية، ونادر |```
python3 insect.py -e php,html,js -u https://target --exclude-regexps "^Error$"
يبدو أن هذا الجزء (Chunk 49) لم يتضمن أي محتوى فعلي للترجمة. الرجاء تزويدي بالنص المطلوب ترجمته.``` python3 insect.py -e php,html,js -u https://target --exclude-redirects "https://(.).okta.com/"
## واجهة برمجة تطبيقات Certspotter
لاستخدام [Certspotter API](https://sslmate.com/certspotter/)، قم بتعيين متغير البيئة `CERTSPOTTER_TOKEN` إلى مفتاح API الخاص بـ Certspotter.
تفرض واجهة برمجة تطبيقات Certspotter حدًا أقصى للمعدل يبلغ 1000 طلب في الساعة. باستخدام مفتاح API، يُسمح بعدد أكبر من الاستعلامات، ولكن يتم تعيين مهلة للطلبات في هذه الوحدة لانتظار مرور وقت التقييد.```
python3 insect.py -e php,html,js -u https://target --exclude-response /error.html
تتيح لك dirsearch أو insect استيراد الطلب الخام من ملف. سيكون المحتوى شيئًا مثل هذا:```http GET /admin HTTP/1.1 Host: admin.example.com Cache-Control: max-age=0 Accept: /
نظرًا لعدم وجود طريقة لـ dirsearch أو insect لمعرفة مخطط URI، يجب عليك تعيينه باستخدام الخيار `--scheme`. بشكل افتراضي، يكتشف dirsearch و insect المخطط تلقائيًا.
----
### تنسيقات قوائم الكلمات
تنسيقات قوائم الكلمات المدعومة: أحرف كبيرة، أحرف صغيرة، تكبير أول حرف
#### أحرف صغيرة:```
admin
index.html
ADMIN INDEX.HTML
#### رأس المال:```
Admin
Index.html
استخدم -X | --exclude-extensions مع قائمة الامتدادات لإزالة جميع المسارات في قائمة الكلمات التي تحتوي على الامتدادات المحددة
python3 insect.py -u https://target -X jsp
قائمة الكلمات:``` admin.php test.jsp
بعد:```
admin.php
### البروكسيات
يدعم dirsearch و insect البروكسي SOCKS وHTTP، مع خيارين: خادم بروكسي أو قائمة بخوادم البروكسي.```
python3 insect.py -e php,html,js -u https://target --proxy 127.0.0.1:8080
(No content provided to translate.)``` python3 insect.py -e php,html,js -u https://target --proxy socks5://10.10.0.1:8080
The input chunk is empty — there is no text provided to translate.```
python3 insect.py -e php,html,js -u https://target --proxylist proxyservers.txt
صيغ التقارير المدعومة: simple, plain, json, xml, md, csv, html, sqlite``` python3 insect.py -e php -l URLs.txt --format plain -o report.txt
### تسريب البيانات
| الخيار | الوصف | الافتراضي |
|----------|:------------------------------:|--------:|
| `-e`, `--exfiltrate` | تسريب البيانات من الهدف | n/a |
| `--exfiltrate-method` | طريقة التسريب. يمكن تعيينها إلى: `nslookup`، `dig`، `ntpdate`، `curl`، `wget`، `netcat` | `nslookup` |
| `--exfiltrate-address` | العنوان الذي سيتم تسريب البيانات إليه | `127.0.0.1` |
| `--exfiltrate-outgoing-interface` | الواجهة المستخدمة للتسريب | n/a |
| `--exfiltrate-max-retries` | الحد الأقصى لعدد محاولات التسريب | `1` |
| `--exfiltrate-dns-server` | خادم DNS المستخدم للتسريب | n/a |
| `--exfiltrate-nslookup-timeout` | المهلة الزمنية لطريقة التسريب عبر nslookup | `5` |
| `--exfiltrate-dig-timeout` | المهلة الزمنية لطريقة التسريب عبر dig | `5` |
| `--exfiltrate-ntpdate-timeout` | المهلة الزمنية لطريقة التسريب عبر ntpdate | `5` |
| `--exfiltrate-curl-timeout` | المهلة الزمنية لطريقة التسريب عبر curl | `5` |
| `--exfiltrate-wget-timeout` | المهلة الزمنية لطريقة التسريب عبر wget | `5` |
| `--exfiltrate-netcat-timeout` | المهلة الزمنية لطريقة التسريب عبر netcat | `5` |
| `--exfiltrate-dns-domain-name` | اسم النطاق المستخدم لتسريب DNS | `.dns.al` |```
python3 insect.py -e php -u https://target --format html -o target.json
cat urls.txt | python3 insect.py --stdin
Please provide the Markdown content to translate.```
python3 insect.py -u https://target --max-time 360
python3 insect.py -u https://target --auth admin:pass --auth-type basic
عملية التثبيت بسيطة ومباشرة:
```bash
curl https://raw.githubusercontent.com/ex0dus-0x/brutils/main/install.sh | sh
أو قم بالاستنساخ والتشغيل يدويًا:
git clone https://github.com/ex0dus-0x/brutils && cd brutils
make && make install
بعد التثبيت، يمكنك تشغيل الأداة عبر الطرفية باستخدام الأمر brutils.```
python3 insect.py -u https://target --header-list rate-limit-bypasses.txt
**هناك المزيد لاكتشافه، جرّب بنفسك!**
دعم Docker
---------------
### تثبيت Docker على Linux
تثبيت Docker```sh
curl -fsSL https://get.docker.com | bash
لاستخدام docker تحتاج إلى صلاحيات المستخدم الجذر
لإنشاء الصورة```sh docker build -t "dirsearch:v0.4.2" . docker build -t "insect:latest" .
> **dirsearch** هو اسم الصورة و**v0.4.2** هو الإصدار
> **insect** هو اسم الصورة و**latest** هو الإصدار
### استخدام dirsearch أو insect
للاستخدام```sh
docker run -it --rm "insect:latest" -u target -e php,html,js,zip
--proxy-list--suffixes ~ و --prefixes .--remove-extensions و --suffixes /!--cidr و -F و -q سيقلل معظم الضوضاء والسلبيات الكاذبة عند التخمين مع CIDR--skip-on-status 429 على تخطي الهدف كلما أعاد 429HEAD بدلاً من GET--timeout 3 --retries 1لقد تلقينا الكثير من المساعدات من العديد من الأشخاص حول العالم لتحسين هذه الأداة. شكرًا جزيلاً لكل من ساعدنا حتى الآن! انظر CONTRIBUTORS.md لمعرفة من هم.
حقوق الطبع والنشر (C) Mauro Soria ([email protected])
التطوير لعام 2022 (C) nu11secur1ty (https://nu11secur1ty.com/)
الترخيص: GNU General Public License، الإصدار 2