
Rastreia sites .onion através do Tor para coletar títulos de páginas, nomes de host e relações de links, exportando árvores JSON e visualizações para investigações OSINT na dark web.
<pre>
████████╗ ██████╗ ██████╗ ██████╗ ██████╗ ████████╗
╚══██╔══╝██╔═══██╗██╔══██╗ ██╔══██╗██╔═████╗╚══██╔══╝
██║ ██║ ██║██████╔╝ ██████╔╝██║██╔██║ ██║
██║ ██║ ██║██╔══██╗ ██╔══██╗████╔╝██║ ██║
██║ ╚██████╔╝██║ ██║ ██████╔╝╚██████╔╝ ██║
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
Ferramenta de Inteligência de Fontes Abertas para a Dark Web
</pre>
<p align="center">
<a href="https://owasp.org/www-project-torbot/">
<img src="https://assets.kitploit.com/production/public/readmes/58461/8902e5836a324eae0ab281a9be7d62683e025d503ce6778cce6768fb908c1089/44f87cefbeddabc12e5302f46a08c8c511e4ec48c814d7fbb70dc1c317e73552-display-v1.webp" width="270" title="OWASP Foundation">
</a>
<img src="https://assets.kitploit.com/production/public/readmes/58461/1cc64251df7a699491fb27a2d732f724bf9fe989efb8dd3f7fe750e316f2b333/2a88ed821677ed3b033b12c0815ff31e60d4e86357dbbfc127253fe018096b96-display-v1.webp" width="250" title="Hacktoberfest 2022">
<img src="https://assets.kitploit.com/production/public/readmes/58461/54bda09bea5708a8bec2bc836b8decebec80caecd37906f84e76799af642bb6a/159aa0dc48e84a932700c3326470bd3053551554561821e67f78d3db2982e745-display-v1.webp" width="160" title="OpenSource">
</p>
### Status/Links sociais
[](https://github.com/DedSecInside/TorBot/actions/workflows/pytest.yml)
[](https://github.com/DedSecInside/TorBot/actions/workflows/flake8.yml)
[](https://join.slack.com/t/dedsec-inside/shared_invite/zt-i4jcgj8w-1ecHiSdRubwuppAzz8~yfg)
[](https://www.codetriage.com/dedsecinside/torbot)
[]()
[]()
### Funcionalidades
1. Rastreador Onion (.onion)
2. Retorna o título da página ou o nome do host caso não haja título disponível, juntamente com o endereço e uma breve descrição do site.
3. Salva links em um banco de dados (Não concluído)
4. Exibe o HTML de um site ou o salva em um arquivo HTML. (Não concluído)
5. Salva a árvore de links como um arquivo JSON.
6. Rastreia domínios personalizados
7. Verifica se o link está ativo
8. Atualizador integrado
9. Constrói uma árvore visual de relacionamentos entre links que pode ser rapidamente visualizada ou salva em um arquivo
### Melhorias recentes
- A CLI agora permite executar `--version` e `--update` sem exigir uma URL.
- O rastreador agora resolve links relativos em relação à página atual e ignora hrefs não suportados ou malformados de forma mais tolerante.
- A interface desktop opcional TorBotApp pode ser iniciada a partir da CLI com `torbot app` quando instalada como um checkout irmão.
...(será atualizado)
### Dependências
- Tor (Opcional)
- Python 3.10+
- pip
## Início rápido
### Configuração local
```sh
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
```
### Instalar com o OTinstaller (Linux)
[OTinstaller](https://github.com/OSINTVerseHQ/OTinstaller) é um gerenciador de ferramentas de terceiros que instala a versão do `torbot` do PyPI em seu próprio virtualenv. Ele não é mantido pela equipe do TorBot, portanto, relate problemas com ele [no rastreador do OTinstaller](https://github.com/OSINTVerseHQ/OTinstaller/issues).
```sh
pipx install otinstaller
otinstaller init
otinstaller install torbot
# url:... is passed to TorBot as -u; the other flags go through unchanged
otinstaller run torbot -- url:https://example.com --depth 2 --visualize table
```
### Executar a CLI
```sh
python main.py --help
python main.py --version
python main.py -u https://example.com --depth 2 --visualize table
```
### Exemplos comuns
```sh
# Gather basic site information
python main.py -u https://example.com --info
# Save the crawl tree as JSON
python main.py -u https://example.com --depth 2 --save json
# Disable SOCKS5 if you are not using Tor locally
python main.py -u https://example.com --disable-socks5 --visualize tree
# Launch the optional desktop app when TorBotApp is installed
torbot app
```
### Análise de IA com foco em evidências
Salve um resultado de rastreamento versionado e transforme-o em um pacote de investigação com citações:
```sh
torbot --url https://example.com --disable-socks5 \
--save result --result-file crawl-result.json
torbot analyze crawl-result.json --provider ollama --model qwen3 \
--output investigation/
```
O Analyst usa por padrão um endpoint local do Ollama. Provedores remotos compatíveis com OpenAI exigem a flag explícita `--allow-remote`. Toda descoberta suportada deve citar evidências capturadas, e uma indisponibilidade do provedor nunca impede que o pacote de evidências determinístico seja gravado. Consulte [TorBot Analyst](https://github.com/dedsecinside/torbot/blob/dev/docs/ANALYST.md) para o início rápido offline, formatos de saída, limite de privacidade e esquemas.
### Opções
```text
usage: Gather and analyze data from Tor sites.
optional arguments:
-u URL, --url URL Specify a website link to crawl
--depth DEPTH Specify max depth of crawler (default 1)
-h, --help Show this help message and exit
--host Set IP address for SOCKS5 proxy (defaults to 127.0.0.1)
--port Set port for SOCKS5 proxy (defaults to 9050)
-v Displays DEBUG level logging, default is INFO
--version Show the current version of TorBot.
--update Update TorBot to the latest stable version
--app Run optional TorBot desktop app
--app-dir APP_DIR Path to a TorBotApp checkout
-q, --quiet Prevents display of header and IP address
--save FORMAT Save results in a file. (tree, JSON)
--visualize FORMAT Visualizes tree of data gathered. (tree, JSON, table)
-i, --info Info displays basic info of the scanned site
--disable-socks5 Executes HTTP requests without using SOCKS5 proxy
```
> `-u/--url` é obrigatório para comandos relacionados a crawl, como `--info`, `--save` e `--visualize`.
Se você estiver usando Tor localmente, mantenha o proxy SOCKS5 habilitado. Se não estiver usando Tor, adicione `--disable-socks5` para evitar erros de conexão com o proxy.
Leia mais sobre o torrc aqui: [Torrc](https://github.com/DedSecInside/TorBoT/blob/master/Tor.md)
## Aplicativo desktop opcional
O TorBot continua sendo uma ferramenta Python com foco em CLI. A interface desktop fica no projeto Electron separado
[TorBotApp](https://github.com/KingAkeem/TorBotApp), de modo que Node e
Electron não são necessários para usuários da CLI.
Para iniciá-lo a partir desta CLI, instale o TorBotApp como um checkout irmão:
```text
code/
+-- TorBot/
+-- TorBotApp/
```
Em seguida, execute:
```sh
torbot app
```
Se o TorBotApp estiver em outro local, use um dos seguintes:
```sh
TORBOT_APP_DIR=/path/to/TorBotApp torbot app
torbot --app --app-dir /path/to/TorBotApp
```
Consulte [Desktop App Architecture](https://github.com/dedsecinside/torbot/blob/dev/docs/DESKTOP_APP.md) para saber como a CLI, a UI opcional e os serviços de backend se integram.
## Recursos Selecionados
- [x] Reformulação do Módulo de Visualização
- [x] Implementar Busca BFS para o webcrawler
- [x] Melhorar a estabilidade (Tratar erros de forma adequada, ampliar a cobertura de testes, etc.)
- [x] Aumentar a cobertura de testes
- [ ] Salvar os resultados de busca mais recentes em um banco de dados
- [ ] Randomizar a Conexão Tor (Header e Identidade Aleatórios)
- [ ] Busca por Palavra-chave/Frase
- [ ] Integração com Redes Sociais
- [ ] Aumentar o anonimato
- [ ] Captura de tela
## Diretrizes de Contribuição
### Encontrou um problema?
Se você encontrar algum problema no projeto, por favor nos avise criando uma nova issue [aqui](https://github.com/DedSecInside/TorBot/issues/new/choose).
### Diretrizes para Desenvolvedores
Agradecemos contribuições para este projeto! Aqui estão algumas diretrizes a seguir:
1. Faça um fork do repositório e crie um novo branch para sua contribuição.
2. Certifique-se de que seu código passe em todos os testes executando `pytest` antes de enviar um pull request para o branch `dev`.
3. Siga o guia de estilo [PEP8](https://www.python.org/dev/peps/pep-0008/) para código Python.
4. Certifique-se de adicionar a documentação apropriada para quaisquer novos recursos ou alterações.
5. Ao enviar um pull request, forneça uma descrição detalhada das alterações realizadas.
## Referências
1. M. Glassman e M. J. Kang, “Intelligence in the internet age: The emergence and evolution of Open Source Intelligence (OSINT),” Comput. Human Behav., vol. 28, no. 2, pp. 673–682, 2012.
2. D. Bradbury, “In plain view: open source intelligence,” Comput. Fraud Secur., vol. 2011, no. 4, pp. 5–9, 2011.
3. B. Butler, B. Wardman e N. Pratt, “REAPER: an automated, scalable solution for mass credential harvesting and OSINT,” 2016 APWG Symp. Electron. Crime Res., pp. 1–10, 2016.
4. B. Zantout e R. A. Haraty, “I2P Data Communication System I2P Data Communication System,” no. April 2002, 2014.
5. J. Qin, Y. Zhou, G. Lai, E. Reid, M. Sageman e H. Chen, “The dark web portal project: collecting and analyzing the presence of terrorist groups on the web,” in Proceedings of the 2005 IEEE international conference on Intelligence and Security Informatics, 2005, pp. 623–624.
6. D. Moore, T. Rid, D. Moore e T. Rid, “Cryptopolitik and the Darknet Cryptopolitik and the Darknet,” vol. 6338, 2016.
7. G. Weimann, “Going dark: Terrorism on the dark Web,” Stud. Confl. Terror., vol. 39, no. 3, pp. 195–206, 2016.
8. A. T. Zulkarnine, R. Frank, B. Monk, J. Mitchell e G. Davies, “Surfacing collaborated networks in dark web to find illicit and criminal content,” in Intelligence and Security Informatics (ISI), 2016 IEEE Conference on, 2016, pp. 109–114.
9. T. Minárik e A.-M. Osula, “Tor does not stink: Use and abuse of the Tor anonymity network from the perspective of law,” Comput. Law Secur. Rev., vol. 32, no. 1, pp. 111–127, 2016.
10. K. Loesing, S. J. Murdoch e R. Dingledine, “A Case Study on Measuring Statistical Data in the {T}or Anonymity Network,” in Proceedings of the Workshop on Ethics in Computer Security Research (WECSR 2010), 2010.
11. B. Nafziger, “Data Mining in the Dark : Darknet Intelligence Automation,” 2017.
12. I. Sanchez-Rola, D. Balzarotti e I. Santos, “The onions have eyes: A comprehensive structure and privacy analysis of tor hidden services,” in Proceedings of the 26th International Conference on World Wide Web, 2017, pp. 1251–1260.
13. Mouli VR, Jevitha KP. “Web Services Attacks and Security-A Systematic Literature Review.”, Procedia Computer Science. 2016 Jan 1;93:870-7.
14. Cova M, Felmetsger V, Vigna G. "Vulnerability analysis of web-based applications. InTest and Analysis of Web Services" 2007 (pp. 363-394). Springer, Berlin, Heidelberg.
15. B. R. Holland, “Enabling Open Source Intelligence (OSINT) in private social networks,” 2012.
16. S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,” Cryptogr. Mail. List https//metzdowd.com, 2009.
17. M. Wesam, A. Nabki, E. Fidalgo, E. Alegre e I. De Paz, “Classifying Illegal Activities on Tor Network Based on Web Textual Contents”, vol. 1, pp. 35–43, 2017.
18. Sathyadevan S, Gangadharan S.“Crime analysis and prediction using data mining”. In Networks & Soft Computing (ICNSC), 2014 First International Conference on 2014 Aug 19 (pp. 406-412). IEEE.
19. Chau M, Chen H. "A machine learning approach to web page filtering using content and structure analysis. Decision Support Systems." 2008 Jan 1;44(2):482-94.
20. Ani R, Jose J, Wilson M, Deepa OS. “Modified Rotation Forest Ensemble Classifier for Medical Diagnosis in Decision Support Systems”, In Progress in Advanced Computing and Intelligent Engineering 2018 (pp. 137-146). Springer, Singapore.
21. Ani R, Augustine A, Akhil N.C. e Deepa O.S., 2016. “Random Forest Ensemble Classifier to Predict the Coronary Heart Disease Using Risk Factors”, In Proceedings of the International Conference on Soft Computing Systems (pp. 701-710). Springer, New Delhi.
## Mantenedores
- [X] [PS Narayanan](https://github.com/PSNAppz) - Coproprietário
- [X] [KingAkeem](https://github.com/KingAkeem) - Coproprietário
## Agradecimentos a Todos os Nossos Colaboradores
<a href="https://github.com/DedSecInside/TorBot/graphs/contributors">
<img src="https://contrib.rocks/image?repo=DedSecInside/TorBot" />
</a>
## Licença
[GNU Public License](https://github.com/DedSecInside/TorBot/blob/dev/LICENSE.md)