
Ferramenta de alta performance para descoberta de caminhos web e força bruta em diretórios. Descobre arquivos, diretórios e endpoints ocultos usando wordlists personalizáveis, filtros e varredura recursiva para testes de penetração.
Versão Atual: v1.4 (20222.09.03)
Uma ferramenta avançada de linha de comando projetada para forçar diretórios e arquivos em servidores web, também conhecida como scanner de caminhos web
Ideia por @maurosoria e @shelld3v
Desenvolvimento-2022 está sendo ativamente desenvolvido por @nu11secur1ty
Requisito: python 3.10.5 ou superior
Escolha uma destas opções de instalação:
git clone https://github.com/nu11secur1ty/insect.git --depth 1 (RECOMENDADO)docker build -t "insect:latest" . (mais informações podem ser encontradas aqui)pip3 install dirsearchsudo apt-get install dirsearch (obsoleto)Resumo:
%EXT% pelas extensões da flag -e.%EXT% (como SecLists), é necessário o switch -f | --force-extensions para anexar extensões a cada palavra na wordlist, bem como o /.wordlist1.txt,wordlist2.txt.Exemplos:
Passar **asp** e **aspx** como extensões gerará o seguinte dicionário:```
index
index.asp
index.aspx
Ao passar **php** e **html** como extensões com a flag **-f**/**--force-extensions**, será gerado o seguinte dicionário:```
admin
admin.php
admin.html
admin/
Passar **jsp** e **jspa** como extensões com a flag **-O**/**--overwrite-extensions** gerará o seguinte dicionário:```
login.html
login.jsp
login.jspa
Opções -------``` 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
Configuração
---------------
Os valores padrão para os sinalizadores do dirsearch e do insect podem ser editados no arquivo de configuração, por padrão é `config.ini`, mas você pode selecionar outro arquivo com o sinalizador `--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

Alguns exemplos de como usar o dirsearch e o insect - esses são os argumentos mais comuns. Se precisar de todos, basta usar o argumento -h.
python3 insect.py -u https://target
I don't see any content in the input. Please provide the Markdown chunk you'd like translated.```
python3 insect.py -e php,html,js -u https://target
No input content was provided for translation.``` python3 insect.py -e php,html,js -u https://target -w /path/to/wordlist
---
### Pausando o progresso
dirsearch e insect permitem pausar o progresso da varredura com CTRL+C; a partir daí, você pode salvar o progresso (e continuar depois), pular o alvo atual ou pular o subdiretório atual.
<img src="https://assets.kitploit.com/production/public/readmes/42137/d4cf979db78841d0c0f16abb177e5084211820c23e8adaf587f0bb3faf0e25b4.png" alt="Pausando o insect" width="475px">
----
### Recursão
- A força bruta recursiva é realizar força bruta continuamente no que vem depois dos diretórios encontrados. Por exemplo, se o insect encontrar `admin/`, ele fará força bruta em `admin/*` (`*` é onde ele realiza a força bruta). Para habilitar esse recurso, use a flag **-r** (ou **--recursive**).```
python3 insect.py -e php,html,js -u https://target -r
- Existem mais 2 opções: **--force-recursive** e **--deep-recursive**
- **Force recursive**: Faz brute force recursivo em todos os caminhos encontrados, não apenas os que terminam com `/`
- **Deep recursive**: Faz brute force recursivo em todas as profundidades de um caminho (`a/b/c` => adiciona `a/`, `a/b/`)
- Se houver subdiretórios em que você não deseja fazer brute force recursivamente, use `--exclude-subdirs````
python3 insect.py -e php,html,js -u https://target -r --exclude-subdirs image/,media/,css/
O número de threads (-t | --threads) reflete o número de processos de brute force separados. E, portanto, quanto maior o número de threads, mais rápido o dirsearch ou insect executa. Por padrão, o número de threads é 25, mas você pode aumentá-lo se quiser acelerar o progresso.
Apesar disso, a velocidade ainda depende muito do tempo de resposta do servidor. E, como um aviso, aconselhamos que você mantenha o número de threads não muito grande, pois isso pode causar DoS (Denial of Service).``` python3 insect.py -e php,htm,js,bak,zip,tgz,txt -u https://target -t 20
### Prefixos / Sufixos
- **--prefixes**: Adicionar prefixos personalizados a todas as entradas```
python3 insect.py -e php -u https://target --prefixes .,admin,_
Wordlist:``` tools
Gerado com prefixos:```
tools
.tools
admintools
_tools
Wordlist:```
index.php
internal
Gerado com sufixos:``` index.php internal index.php~ internal~
### Blacklist
Dentro da pasta `db/`, existem vários "arquivos de blacklist". Os caminhos nesses arquivos serão filtrados do resultado da varredura se tiverem o mesmo status mencionado no nome do arquivo.
Exemplo: Se você adicionar `admin.php` em `db/403_blacklist.txt`, sempre que fizer uma varredura em que `admin.php` retorne 403, ele será filtrado do resultado.
----
### Filtros
Use **-i | --include-status** e **-x | --exclude-status** para selecionar códigos de status de resposta permitidos e não permitidos.
Para filtros mais avançados: **--exclude-sizes**, **--exclude-texts**, **--exclude-regexps**, **--exclude-redirects** e **--exclude-response**```
python3 insect.py -e php,html,js -u https://target --exclude-sizes 1B,243KB
Antes de executar o BX-bot, considere fazer um backup da sua pasta /config/ pois ela será refinada para a configuração atual do mercado durante a inicialização.
Você também deve ter um Token do Bot do Telegram e um ChatId prontos para a exchange e o mercado em questão.
Se ambos estiverem prontos, você está pronto para começar!
# Install dependencies
pip install -r prerequisities.txt
# Start the bot
python3 bxbot.py
Para receber notificações no seu celular, você pode ativar um bot do Telegram. Para isso, siga estas instruções sobre como configurar um bot no Telegram.
...no qual você pode acompanhar os dados do mercado, colocar e cancelar ordens, com fácil acesso ao histórico recente. Os detalhes completos do Modo de Monitoramento estão aqui.``` python3 insect.py -e php,html,js -u https://target --exclude-texts "403 Forbidden"
I need to translate the text from English to Portuguese, but the input content is empty. There is no text provided to translate.```
python3 insect.py -e php,html,js -u https://target --exclude-regexps "^Error$"
The input chunk is empty — there is no content to translate. Please provide the Markdown text for chunk 49.``` python3 insect.py -e php,html,js -u https://target --exclude-redirects "https://(.).okta.com/"
O conteúdo do input está vazio — não foi fornecido texto para traduzir neste chunk. Nenhuma tradução pode ser gerada sem o conteúdo de origem.```
python3 insect.py -e php,html,js -u https://target --exclude-response /error.html
dirsearch ou insect permitem que você importe a requisição bruta de um arquivo. O conteúdo seria algo assim:```http GET /admin HTTP/1.1 Host: admin.example.com Cache-Control: max-age=0 Accept: /
Como não há como o dirsearch ou o insect saberem qual é o esquema de URI, você precisa defini-lo usando a flag `--scheme`. Por padrão, o dirsearch e o insect detectam o esquema automaticamente.
----
### Formatos de wordlist
Formatos de wordlist suportados: maiúsculas, minúsculas, capitalização
#### Minúsculas:```
admin
index.html
ADMIN INDEX.HTML
#### Capital:```
Admin
Index.html
Use -X | --exclude-extensions com uma lista de extensões para remover todos os caminhos na wordlist que contenham as extensões fornecidas
python3 insect.py -u https://target -X jsp
Wordlist:``` admin.php test.jsp
Depois:```
admin.php
### Proxies
O dirsearch e o insect suportam proxy SOCKS e HTTP, com duas opções: um servidor proxy ou uma lista de servidores proxy.```
python3 insect.py -e php,html,js -u https://target --proxy 127.0.0.1:8080
(empty response due to missing input)``` python3 insect.py -e php,html,js -u https://target --proxy socks5://10.10.0.1:8080
## Uso
- `pio`: comando CLI do PlatformIO para executar testes.
- `pios/utils/embed_files.py`: script para incorporar arquivos (incluindo fixtures do Unity) no projeto.
- `pios/utils/sdk_install.sh`: script para instalar o SDK no Linux.
- `pios/utils/sdk_install.bat`: script para instalar o SDK no Windows.
- `tests/unity_config.h`: cabeçalho opcional para configuração do Unity; será gerado por `embed_files.py` se não estiver presente (mas deve estar sob controle de versão).
Execute o teste com:
```bash
pio test --environment native
Certifique-se de que o SDK esteja instalado antes de executar este comando.``` python3 insect.py -e php,html,js -u https://target --proxylist proxyservers.txt
### Relatórios
Formatos de relatório suportados: **simple**, **plain**, **json**, **xml**, **md**, **csv**, **html**, **sqlite**```
python3 insect.py -e php -l URLs.txt --format plain -o report.txt
I don't see any content in the INPUT section of this chunk. There is no text to translate.
If you can provide the actual Markdown content for chunk 75, I’ll translate it into Portuguese according to the specified rules.``` python3 insect.py -e php -u https://target --format html -o target.json
### Mais comandos de exemplo```
cat urls.txt | python3 insect.py --stdin
[No content provided in the INPUT section. Please supply the Markdown text to translate.]``` python3 insect.py -u https://target --max-time 360
I'm ready to translate, but the input content appears to be missing. Please provide the Markdown content for chunk 81 so I can proceed with the Portuguese translation.```
python3 insect.py -u https://target --auth admin:pass --auth-type basic
O CoreDNS pode ser executado em múltiplas CPUs sem perder a calma.``` python3 insect.py -u https://target --header-list rate-limit-bypasses.txt
**Há mais para descobrir, tente você mesmo!**
Suporte Docker
---------------
### Instalar Docker no Linux
Instalar Docker```sh
curl -fsSL https://get.docker.com | bash
Para usar o docker você precisa de poderes de superusuário
Para criar a imagem```sh docker build -t "dirsearch:v0.4.2" . docker build -t "insect:latest" .
> **dirsearch** é o nome da imagem e **v0.4.2** é a versão
> **insect** é o nome da imagem e **latest** é a versão
### Usando dirsearch ou insect
Para usar```sh
docker run -it --rm "insect:latest" -u target -e php,html,js,zip
--proxy-list--suffixes ~ e --prefixes .--remove-extensions e --suffixes /!--cidr, -F, -q reduzirá a maior parte dos ruídos + falsos negativos ao fazer brute-force com um CIDR--skip-on-status 429 ajudará você a pular um alvo sempre que ele retornar 429HEAD em vez de GET--timeout 3 --retries 1Temos recebido muita ajuda de muitas pessoas ao redor do mundo para melhorar esta ferramenta. Muito obrigado a todos que nos ajudaram até agora! Veja CONTRIBUTORS.md para saber quem são.
Copyright (C) Mauro Soria ([email protected])
Desenvolvimento para 2022 (C) nu11secur1ty (https://nu11secur1ty.com/)
Licença: GNU General Public License, versão 2