Skip to content
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
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 Sep 27, 2022
8d952ff
Update README_PT_BR.md
juliajamile Sep 27, 2022
7f37896
Update README.md
juliajamile Sep 27, 2022
1822c63
Update README.md
juliajamile Sep 27, 2022
e13c48b
Create README_PT_BR.md
juliajamile Sep 27, 2022
05dbc5a
Update README.md
juliajamile Sep 27, 2022
19a1bd7
Update README_PT_BR.md
juliajamile Sep 27, 2022
f7c8f2a
Update README_PT_BR.md
juliajamile Sep 27, 2022
59bd2f5
Update README.md
juliajamile Sep 27, 2022
3250349
Create README_PT_BR.md
juliajamile Sep 27, 2022
696ec81
Update README_PT_BR.md
juliajamile Sep 27, 2022
06fc4b2
Update README.md
juliajamile Sep 27, 2022
693a16e
Update README.md
juliajamile Sep 27, 2022
de24f89
Update README_PT_BR.md
juliajamile Sep 27, 2022
628b097
Update README_PT_BR.md
juliajamile Sep 27, 2022
19c80d0
Update README.md
juliajamile Sep 27, 2022
83c2e5a
Create README_PT_BR.md
juliajamile Sep 27, 2022
0fe69e6
Create README_PT_BR.md
juliajamile Sep 27, 2022
dd6c37d
Delete README_PT_BR.md
juliajamile Sep 27, 2022
5e32e07
Update README_PT_BR.md
juliajamile Sep 27, 2022
9bc7a82
Update README_PT_BR.md
juliajamile Sep 27, 2022
6b3d3b1
Update README.md
juliajamile Sep 27, 2022
a682d92
Update README.md
juliajamile Sep 28, 2022
39314ef
Create README_PT_BR.md
juliajamile Sep 28, 2022
d471213
Update README_PT_BR.md
juliajamile Sep 28, 2022
3ea5bee
Update README_PT_BR.md
juliajamile Sep 28, 2022
bc084e5
Update README_PT_BR.md
juliajamile Sep 28, 2022
1c28cb6
Update README_PT_BR.md
juliajamile Sep 28, 2022
fb748fe
Update README.md
juliajamile Sep 28, 2022
dee4ca9
Update README_PT_BR.md
juliajamile Sep 28, 2022
a58213b
Update README_PT_BR.md
juliajamile Sep 28, 2022
5f1b0f5
Update README_PT_BR.md
juliajamile Sep 28, 2022
688925e
Update README.md
juliajamile Sep 28, 2022
934a2aa
Create README_PT_BR.md
juliajamile Sep 28, 2022
1b1ee0c
Update README_PT_BR.md
juliajamile Sep 28, 2022
f4d5650
Update README_PT_BR.md
juliajamile Sep 28, 2022
34450a8
Update README_PT_BR.md
juliajamile Sep 28, 2022
9777269
Update README_PT_BR.md
juliajamile Sep 28, 2022
ca32816
Update README_PT_BR.md
juliajamile Sep 28, 2022
317fc1b
Update README_PT_BR.md
juliajamile Sep 28, 2022
8ec0e81
Update README_PT_BR.md
juliajamile Sep 28, 2022
60a7375
Update README.md
juliajamile Sep 28, 2022
bb1737c
Update README_PT_BR.md
juliajamile Sep 28, 2022
f2d4c5c
Create README_PT_BR.md
juliajamile Sep 28, 2022
11272b2
Update README.md
juliajamile Sep 28, 2022
752d311
Create README_PT_BR.md
juliajamile Sep 28, 2022
5f7fec5
Update README_PT_BR.md
juliajamile Sep 28, 2022
4817b9e
Update README_PT_BR.md
juliajamile Sep 28, 2022
9ef977c
Update README_PT_BR.md
juliajamile Sep 28, 2022
eb184db
Update README_PT_BR.md
juliajamile Sep 28, 2022
47a1e64
Update README_PT_BR.md
juliajamile Sep 28, 2022
62e63d8
Update README.md
juliajamile Oct 3, 2022
34256ca
Create README_PT_BR.md
juliajamile Oct 3, 2022
a8989e2
Update README.md
juliajamile Oct 5, 2022
5ad0a99
Update README_PT_BR.md
juliajamile Oct 5, 2022
8d54b52
Create README_PT_BR.md
juliajamile Oct 5, 2022
ed78968
Update README_PT_BR.md
juliajamile Oct 5, 2022
99f5240
Update README.md
juliajamile Oct 5, 2022
77a2f56
Create README_PT_BR.md
juliajamile Oct 5, 2022
a3e88b9
Update README.md
juliajamile Oct 6, 2022
9e0423e
Create README_PT_BR.md
juliajamile Oct 6, 2022
abbcd31
Update README.md
juliajamile Oct 6, 2022
c8c57e7
Create README_PT_BR.md
juliajamile Oct 6, 2022
38f3486
Update README.md
juliajamile Oct 6, 2022
de7e907
Update README_PT_BR.md
juliajamile Oct 6, 2022
95f98b8
Create README_PT_BR.md
juliajamile Oct 6, 2022
ef8f6d4
Update README.md
juliajamile Oct 7, 2022
038628f
Create README_PT_BR.md
juliajamile Oct 10, 2022
39f22a1
Update README.md
juliajamile Oct 10, 2022
0c1ccdf
Create README_PT_BR.md
juliajamile Oct 10, 2022
c6c614e
Update README_PT_BR.md
juliajamile Oct 10, 2022
4acf670
Update README.md
juliajamile Oct 10, 2022
48195f4
Create README_PT_BR.md
juliajamile Oct 10, 2022
b8f8563
Update README.md
juliajamile Oct 10, 2022
a86a2df
Create README_PT_BR.md
juliajamile Oct 10, 2022
fdebfb6
Update README.md
juliajamile Oct 10, 2022
22ed9f9
Update README_PT_BR.md
juliajamile Oct 10, 2022
757bb13
Create README_PT_BR.md
juliajamile Oct 10, 2022
f458c5e
Update README.md
juliajamile Oct 11, 2022
5902f85
Update README_PT_BR.md
juliajamile Oct 11, 2022
c345e4d
Create README_PT_BR.md
juliajamile Oct 11, 2022
d58a7ff
adcionando badge - testando permissao
henriporto Nov 18, 2022
ac98a78
correções na trdução readme inicial
henriporto Nov 18, 2022
ec1262a
adding language badge
henriporto Nov 18, 2022
d473962
Update README_PT_BR.md
juliajamile Nov 18, 2022
f923242
Update README_PT_BR.md
juliajamile Nov 18, 2022
8d19996
Fazendo as correções nas traduções
juliajamileg Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ A laboratory for learning secure web and mobile development in a practical manne
</p>

<p align="center">
<a href="https://github.com/globocom/secDevLabs/blob/master/docs/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-Welcome-brightgreen"/></a>
<a href="https://gitter.im/secDevLabs/community"><img src="https://badges.gitter.im/secDevLabs/community.svg"/></a>
<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_PT_BR.md"><img height="24" title="Acessar conteúdo em Português" src="https://img.shields.io/badge/Acessar%20conte%C3%BAdo%20em-Portugu%C3%AAs-blue"/></a>
</p>

## Build your lab
Expand Down
74 changes: 74 additions & 0 deletions README_PT_BR.md
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. 📖
7 changes: 4 additions & 3 deletions owasp-top10-2021-apps/a1/camplake-api/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Camp Crystal Lake API

<p align="center">
<img src="images/camplake.png" width="400" height="400"/>
<img src="images/camplake.png" width="400" height="400"/></br>
<a href="README_PT_BR.md"><img height="24" title="Acessar conteúdo em Português" src="https://img.shields.io/badge/Acessar%20conte%C3%BAdo%20em-Portugu%C3%AAs-blue"/></a>
</p>

Camp Crystal Lake API is a simple Golang web application that contains an example of a Broken Access Control vulnerability and its main goal is to describe how a malicious user could exploit it.
Expand Down Expand Up @@ -113,7 +114,7 @@ How would you mitigate this vulnerability? After your changes, an attacker shoul

## PR solutions

[Spoiler alert 🚨 ] To understand how this vulnerability can be mitigated, check out [these pull requests]()!
[Spoiler alert 🚨 ] To understand how this vulnerability can be mitigated, check out [these pull requests](https://github.com/globocom/secDevLabs/labels/Camplake-API)!

## Contributing

Expand All @@ -123,4 +124,4 @@ We encourage you to contribute to SecDevLabs! Please check out the [Contributing
[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
[2]:https://github.com/globocom/secDevLabs/tree/master/owasp-top10-2017-apps/a5/ecommerce-api
132 changes: 132 additions & 0 deletions owasp-top10-2021-apps/a1/camplake-api/README_PT_BR.md
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
21 changes: 14 additions & 7 deletions owasp-top10-2021-apps/a1/ecommerce-api/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# Vulnerable eCommerce API

<p align="center">
<img src="images/a5-banner.png"/>
<img src="images/a5-banner.png"/></br>
<a href="README_PT_BR.md"><img height="24" title="Acessar conteúdo em Português" src="https://img.shields.io/badge/Acessar%20conte%C3%BAdo%20em-Portugu%C3%AAs-blue"/></a>
</p>

Vulnerable eCommerce API is a simple Golang web application that contains an example of a Broken Access Control vulnerability and its main goal is to describe how a malicious user could exploit it.

## Index

- [Definition](#what-is-broken-access-control)
- [Setup](#setup)
- [Attack narrative](#attack-narrative)
- [Objectives](#secure-this-app)
- [Solutions](#pr-solutions)
- [Contributing](#contributing)
- [Vulnerable eCommerce API](#vulnerable-ecommerce-api)
- [Index](#index)
- [What is Broken Access Control?](#what-is-broken-access-control)
- [Setup](#setup)
- [Get to know the app 💵](#get-to-know-the-app-)
- [Attack narrative](#attack-narrative)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- [👀](#)
- [Lack of userID validation allows for an attacker to get other users' tickets](#lack-of-userid-validation-allows-for-an-attacker-to-get-other-users-tickets)
- [🔥](#-1)
- [Secure this app](#secure-this-app)
- [PR solutions](#pr-solutions)
- [Contributing](#contributing)

## What is Broken Access Control?

Expand Down
Loading