Skip to content

Commit 750d3ab

Browse files
author
doverh
committed
Finaliza secao
1 parent 31d119e commit 750d3ab

8 files changed

+171
-166
lines changed

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/02-Testar-Configuracao-da-Plataforma-de-Aplicativo.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Teste de Configuração da Plataforma de Aplicativos
2-
1+
# Testar Configuração da Plataforma do Aplicativo
32
|ID |
43
|------------|
54
|WSTG-CONF-02|

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/03-Testar-Manejo-de-Extensoes-de-Arquivo-para-Informacoes-Sensiveis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Teste de Manipulação de Extensões de Arquivos para Informações Sensíveis
1+
# Testar o Manejo de Extensões de Arquivo para Informações Sensíveis
22

33
|ID |
44
|------------|

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/04-Revisar-Backups-Antigos-e-Arquivos-Nao-Referenciados-para-Informacoes-Sensiveis.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Revisão de Backups Antigos e Arquivos Não Referenciados em Busca de Informações Sensíveis
1+
# Revisar Backups Antigos e Arquivos Não Referenciados para Informações Sensíveis
22

33
|ID |
44
|------------|

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/06-Testar-Metodos-HTTP.md

+69-67
Large diffs are not rendered by default.

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/07-Testar-Seguranca-de-Transporte-Estrito-HTTP.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Testar HTTP Strict Transport Security
1+
# Testar Segurança de Transporte Estrito HTTP
22

33
|ID |
44
|------------|
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
# Test for Subdomain Takeover
1+
# Testar Tomada de Subdomínio
22

33
|ID |
44
|------------|
55
|WSTG-CONF-10|
66

7-
## Summary
7+
## Resumo
88

9-
A successful exploitation of this kind of vulnerability allows an adversary to claim and take control of the victim's subdomain. This attack relies on the following:
9+
A exploração bem-sucedida desse tipo de vulnerabilidade permite que um adversário reivindique e assuma o controle do subdomínio da vítima. Esse ataque depende dos seguintes fatores:
1010

11-
1. The victim's external DNS server subdomain record is configured to point to a non-existing or non-active resource/external service/endpoint. The proliferation of XaaS (Anything as a Service) products and public cloud services offer a lot of potential targets to consider.
12-
2. The service provider hosting the resource/external service/endpoint does not handle subdomain ownership verification properly.
11+
1. O registro de subdomínio do servidor DNS externo da vítima está configurado para apontar para um recurso/serviço externo não existente ou inativo. A proliferação de produtos XaaS (Anything as a Service) e serviços em nuvem pública oferece muitos alvos potenciais a serem considerados.
12+
2. O provedor de serviços que hospeda o recurso/serviço externo não lida adequadamente com a verificação de propriedade de subdomínio.
1313

14-
If the subdomain takeover is successful a wide variety of attacks are possible (serving malicious content, phising, stealing user session cookies, credentials, etc.). This vulnerability could be exploited for a wide variety of DNS resource records including: `A`, `CNAME`, `MX`, `NS`, `TXT` etc. In terms of the attack severity an `NS` subdomain takeover (although less likely) has the highest impact because a successful attack could result in full control over the whole DNS zone and the victim's domain.
14+
Se a tomada de subdomínio for bem-sucedida, uma ampla variedade de ataques é possível (fornecimento de conteúdo malicioso, phishing, roubo de cookies de sessão de usuário, credenciais, etc.). Essa vulnerabilidade pode ser explorada em uma ampla variedade de registros de recursos DNS, incluindo: `A`, `CNAME`, `MX`, `NS`, `TXT` etc. Em termos de gravidade do ataque, a tomada de subdomínio `NS` (embora menos provável) tem o maior impacto, pois um ataque bem-sucedido pode resultar no controle total sobre toda a zona DNS e o domínio da vítima.
1515

1616
### GitHub
1717

18-
1. The victim (victim.com) uses GitHub for development and configured a DNS record (`coderepo.victim.com`) to access it.
19-
2. The victim decides to migrate their code repository from GitHub to a commercial platform and does not remove `coderepo.victim.com` from their DNS server.
20-
3. An adversary finds out that `coderepo.victim.com` is hosted on GitHub and uses GitHub Pages to claim `coderepo.victim.com` using their GitHub account.
18+
1. A vítima (victim.com) usa o GitHub para desenvolvimento e configura um registro DNS (`coderepo.victim.com`) para acessá-lo.
19+
2. A vítima decide migrar seu repositório de código do GitHub para uma plataforma comercial e não remove `coderepo.victim.com` de seu servidor DNS.
20+
3. Um adversário descobre que `coderepo.victim.com` está hospedado no GitHub e usa as páginas do GitHub para reivindicar `coderepo.victim.com` usando sua conta no GitHub.
2121

22-
### Expired Domain
22+
### Domínio Expirado
2323

24-
1. The victim (victim.com) owns another domain (victimotherdomain.com) and uses a CNAME record (www) to reference the other domain (`www.victim.com` --> `victimotherdomain.com`)
25-
2. At some point, victimotherdomain.com expires and is available for registration by anyone. Since the CNAME record is not deleted from the victim.com DNS zone, anyone who registers `victimotherdomain.com` has full control over `www.victim.com` until the DNS record is present.
24+
1. A vítima (victim.com) possui outro domínio (victimotherdomain.com) e usa um registro CNAME (www) para referenciar o outro domínio (`www.victim.com` --> `victimotherdomain.com`)
25+
2. Em algum momento, victimotherdomain.com expira e fica disponível para registro por qualquer pessoa. Como o registro CNAME não é excluído da zona DNS da victim.com, qualquer pessoa que registrar `victimotherdomain.com` tem controle total sobre `www.victim.com` até que o registro DNS esteja presente.
2626

27-
## Test Objectives
27+
## Objetivos do Teste
2828

29-
- Enumerate all possible domains (previous and current).
30-
- Identify forgotten or misconfigured domains.
29+
- Enumerar todos os domínios possíveis (anteriores e atuais).
30+
- Identificar domínios esquecidos ou mal configurados.
3131

32-
## How to Test
32+
## Como Testar
3333

34-
### Black-Box Testing
34+
### Teste de Caixa Preta
3535

36-
The first step is to enumerate the victim DNS servers and resource records. There are multiple ways to accomplish this task, for example DNS enumeration using a list of common subdomains dictionary, DNS brute force or using web search engines and other OSINT data sources.
36+
O primeiro passo é enumerar os servidores DNS da vítima e os registros de recursos. Existem várias maneiras de realizar essa tarefa, como a enumeração de DNS usando uma lista de dicionários de subdomínios comuns, força bruta de DNS ou o uso de motores de busca na web e outras fontes de dados OSINT.
3737

38-
Using the dig command the tester looks for the following DNS server response messages that warrant further investigation:
38+
Usando o comando dig, o testador procura pelas seguintes mensagens de resposta do servidor DNS que exigem investigação adicional:
3939

4040
- `NXDOMAIN`
4141
- `SERVFAIL`
4242
- `REFUSED`
4343
- `no servers could be reached.`
4444

45-
#### Testing DNS A, CNAME Record Subdomain Takeover
45+
#### Testando Subdomínio Takeover de Registro DNS A, CNAME
4646

47-
Perform a basic DNS enumeration on the victim's domain (`victim.com`) using `dnsrecon`:
47+
Execute uma enumeração básica de DNS no domínio da vítima (`victim.com`) usando `dnsrecon`:
4848

4949
```bash
5050
$ ./dnsrecon.py -d victim.com
@@ -56,7 +56,7 @@ $ ./dnsrecon.py -d victim.com
5656
...
5757
```
5858

59-
Identify which DNS resource records are dead and point to inactive/not-used services. Using the dig command for the `CNAME` record:
59+
Identifique quais registros de recursos DNS estão mortos e apontam para serviços inativos/não utilizados. Usando o comando dig para o registro `CNAME`:
6060

6161
```bash
6262
$ dig CNAME fictioussubdomain.victim.com
@@ -67,59 +67,61 @@ $ dig CNAME fictioussubdomain.victim.com
6767
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
6868
```
6969
70-
The following DNS responses warrant further investigation: `NXDOMAIN`.
70+
As seguintes respostas do DNS exigem investigação adicional: `NXDOMAIN`.
7171
72-
To test the `A` record the tester performs a whois database lookup and identifies GitHub as the service provider:
72+
Para testar o registro `A`, o testador realiza uma pesquisa no banco de dados whois e identifica o GitHub como o provedor de serviços:
7373
7474
```bash
7575
$ whois 192.30.252.153 | grep "OrgName"
7676
OrgName: GitHub, Inc.
7777
```
7878
79-
The tester visits `subdomain.victim.com` or issues a HTTP GET request which returns a "404 - File not found" response which is a clear indication of the vulnerability.
79+
O testador visita `subdomain.victim.com` ou emite uma solicitação HTTP GET que retorna uma resposta "404 - Arquivo não encontrado", o que é uma indicação clara da vulnerabilidade.
8080
8181
![GitHub 404 File Not Found response](images/subdomain_takeover_ex1.jpeg)\
82-
*Figure 4.2.10-1: GitHub 404 File Not Found response*
82+
*Figura 4.2.10-1: Resposta do GitHub 404 Arquivo não encontrado*
8383
84-
The tester claims the domain using GitHub Pages:
84+
O testador reivindica o domínio usando as Páginas do GitHub:
8585
8686
![GitHub claim domain](images/subdomain_takeover_ex2.jpeg)\
87-
*Figure 4.2.10-2: GitHub claim domain*
87+
*Figura 4.2.10-2: Reivindicar domínio no GitHub*
8888
89-
#### Testing NS Record Subdomain Takeover
89+
#### Testando Subdomínio Takeover de Registro NS
9090
91-
Identify all nameservers for the domain in scope:
91+
Identifique todos os servidores de nomes para o domínio em questão:
9292
9393
```bash
9494
$ dig ns victim.com +short
9595
ns1.victim.com
9696
nameserver.expireddomain.com
9797
```
9898
99-
In this fictious example the tester checks if the domain `expireddomain.com` is active with a domain registrar search. If the domain is available for purchase the subdomain is vulnerable.
99+
Neste exemplo fictício, o testador verifica se o domínio `expireddomain.com` está ativo com uma pesquisa de registro de domínio. Se o domínio estiver disponível para compra, o subdomínio estará vulnerável.
100100
101-
The following DNS responses warrant further investigation: `SERVFAIL` or `REFUSED`.
101+
As seguintes respostas do DNS exigem investigação adicional: `SERVFAIL` ou `REFUSED`.
102102
103-
### Gray-Box Testing
103+
### Teste de Caixa Cinza
104104
105-
The tester has the DNS zone file available which means DNS enumeration is not necessary. The testing methodology is the same.
105+
O testador tem o arquivo de zona DNS disponível, o que significa que a enumeração de DNS não é necessária. A metodologia de teste é a mesma.
106106
107-
## Remediation
107+
## Remediação
108108
109-
To mitigate the risk of subdomain takeover the vulnerable DNS resource record(s) should be removed from the DNS zone. Continous monitoring and periodic checks are recommended as best practice.
109+
Para mitigar o risco de subdomínio takeover, o(s) registro(s) de recursos DNS vulnerável(eis) devem ser removidos da zona DNS. Monitoramento contínuo e verificações periódicas são recomendados como prática recomendada.
110110
111-
## Tools
111+
## Ferramentas
112112
113-
- [dig - man page](https://linux.die.net/man/1/dig)
114-
- [recon-ng - Web Reconnaissance framework](https://github.com/lanmaster53/recon-ng)
115-
- [theHarvester - OSINT intelligence gathering tool](https://github.com/laramies/theHarvester)
116-
- [Sublist3r - OSINT subdomain enumeration tool](https://github.com/aboul3la/Sublist3r)
117-
- [dnsrecon - DNS Enumeration Script](https://github.com/darkoperator/dnsrecon)
113+
- [dig - man page
114+
115+
](https://linux.die.net/man/1/dig)
116+
- [recon-ng - Framework de Reconhecimento Web](https://github.com/lanmaster53/recon-ng)
117+
- [theHarvester - Ferramenta de coleta de inteligência OSINT](https://github.com/laramies/theHarvester)
118+
- [Sublist3r - Ferramenta de enumeração de subdomínios OSINT](https://github.com/aboul3la/Sublist3r)
119+
- [dnsrecon - Script de Enumeração de DNS](https://github.com/darkoperator/dnsrecon)
118120
- [OWASP Amass DNS enumeration](https://github.com/OWASP/Amass)
119121
120-
## References
122+
## Referências
121123
122-
- [HackerOne - A Guide To Subdomain Takeovers](https://www.hackerone.com/blog/Guide-Subdomain-Takeovers)
123-
- [Subdomain Takeover: Basics](https://0xpatrik.com/subdomain-takeover-basics/)
124-
- [Subdomain Takeover: Going beyond CNAME](https://0xpatrik.com/subdomain-takeover-ns/)
125-
- [OWASP AppSec Europe 2017 - Frans Rosén: DNS hijacking using cloud providers – no verification needed](https://2017.appsec.eu/presos/Developer/DNS%20hijacking%20using%20cloud%20providers%20%E2%80%93%20no%20verification%20needed%20-%20Frans%20Rosen%20-%20OWASP_AppSec-Eu_2017.pdf)
124+
- [HackerOne - Um Guia Para Subdomain Takeovers](https://www.hackerone.com/blog/Guide-Subdomain-Takeovers)
125+
- [Subdomain Takeover: Noções básicas](https://0xpatrik.com/subdomain-takeover-basics/)
126+
- [Subdomain Takeover: Indo além do CNAME](https://0xpatrik.com/subdomain-takeover-ns/)
127+
- [OWASP AppSec Europe 2017 - Frans Rosén: Seqüestro de DNS usando provedores de nuvem - sem verificação necessária](https://2017.appsec.eu/presos/Developer/DNS%20hijacking%20using%20cloud%20providers%20%E2%80%93%20no%20verification%20needed%20-%20Frans%20Rosen%20-%20OWASP_AppSec-Eu_2017.pdf)

4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/11-Testar-Armazenamento-na-Nuvem.md

+48-46
Original file line numberDiff line numberDiff line change
@@ -4,138 +4,140 @@
44
|------------|
55
|WSTG-CONF-11|
66

7-
## Summary
7+
## Resumo
88

9-
Cloud storage services facilitate web application and services to store and access objects in the storage service. Improper access control configuration, however, may result in sensitive information exposure, data being tampered, or unauthorized access.
9+
Os serviços de armazenamento na nuvem facilitam que aplicativos e serviços da web armazenem e acessem objetos. No entanto, a configuração inadequada de controle de acesso pode resultar na exposição de informações sensíveis, manipulação de dados ou acesso não autorizado.
1010

11-
A known example is where an Amazon S3 bucket is misconfigured, although the other cloud storage services may also be exposed to similar risks. By default, all S3 buckets are private and can be accessed only by users that are explicitly granted access. Users can grant public access to both the bucket itself and to individual objects stored within that bucket. This may lead to an unauthorized user being able to upload new files, modify or read stored files.
11+
Um exemplo conhecido é quando um bucket do Amazon S3 está mal configurado, embora outros serviços de armazenamento na nuvem também possam estar expostos a riscos semelhantes. Por padrão, todos os buckets do S3 são privados e só podem ser acessados por usuários que receberam acesso explícito. Os usuários podem conceder acesso público tanto ao próprio bucket quanto a objetos individuais armazenados nesse bucket. Isso pode permitir que um usuário não autorizado faça upload de novos arquivos, modifique ou leia arquivos armazenados.
1212

13-
## Test Objectives
13+
## Objetivos do Teste
1414

15-
- Assess that the access control configuration for the storage services is properly in place.
15+
- Avaliar se a configuração de controle de acesso para os serviços de armazenamento está correta.
1616

17-
## How to Test
17+
## Como Testar
1818

19-
First identify the URL to access the data in the storage service, and then consider the following tests:
19+
Primeiro, identifique a URL para acessar os dados no serviço de armazenamento e, em seguida, considere os seguintes testes:
2020

21-
- read the unauthorized data
22-
- upload a new arbitrary file
21+
- ler os dados não autorizados
22+
- fazer upload de um novo arquivo arbitrário
2323

24-
You may use curl for the tests with the following commands and see if unauthorized actions can be performed successfully.
24+
Você pode usar o curl para os testes com os seguintes comandos e verificar se ações não autorizadas podem ser realizadas com sucesso.
2525

26-
To test the ability to read an object:
26+
Para testar a capacidade de ler um objeto:
2727

2828
```bash
29-
curl -X GET https://<cloud-storage-service>/<object>
29+
curl -X GET https://<servico-de-armazenamento-na-nuvem>/<objeto>
3030
```
3131

32-
To test the ability to upload a file:
32+
Para testar a capacidade de fazer upload de um arquivo:
3333

3434
```bash
35-
curl -X PUT -d 'test' 'https://<cloud-storage-service>/test.txt'
35+
curl -X PUT -d 'teste' 'https://<servico-de-armazenamento-na-nuvem>/teste.txt'
3636
```
3737

38-
### Testing for Amazon S3 Bucket Misconfiguration
38+
### Testando a Má Configuração do Bucket do Amazon S3
3939

40-
The Amazon S3 bucket URLs follow one of two formats, either virtual host style or path-style.
40+
As URLs do bucket do Amazon S3 seguem um dos dois formatos, estilo de host virtual ou estilo de caminho.
4141

42-
- Virtual Hosted Style Access
42+
- Acesso de Estilo de Host Virtual
4343

4444
```text
4545
https://bucket-name.s3.Region.amazonaws.com/key-name
4646
```
4747

48-
In the following example, `my-bucket` is the bucket name, `us-west-2` is the region, and `puppy.png` is the key-name:
48+
No exemplo a seguir, `my-bucket` é o nome do bucket, `us-west-2` é a região e `puppy.png` é o nome da chave:
4949

5050
```text
5151
https://my-bucket.s3.us-west-2.amazonaws.com/puppy.png
5252
```
5353

54-
- Path-Style Access
54+
- Acesso de Estilo de Caminho
5555

5656
```text
5757
https://s3.Region.amazonaws.com/bucket-name/key-name
5858
```
5959

60-
As above, in the following example, `my-bucket` is the bucket name, `us-west-2` is the region, and `puppy.png` is the key-name:
60+
Como acima, no exemplo a seguir, `my-bucket` é o nome do bucket, `us-west-2` é a região e `puppy.png` é o nome da chave:
6161

6262
```text
6363
https://s3.us-west-2.amazonaws.com/my-bucket/puppy.jpg
6464
```
6565

66-
For some regions, the legacy global endpoint that does not specify a region-specific endpoint can be used. Its format is also either virtual hosted style or path-style.
66+
Para algumas regiões, pode ser usado o endpoint global legado que não especifica um endpoint específico da região. Seu formato também é estilo de host virtual ou estilo de caminho.
6767

68-
- Virtual Hosted Style Access
68+
- Acesso de Estilo de Host Virtual
6969

7070
```text
7171
https://bucket-name.s3.amazonaws.com
7272
```
7373

74-
- Path-Style Access
74+
- Acesso de Estilo de Caminho
7575

7676
```text
7777
https://s3.amazonaws.com/bucket-name
7878
```
7979

80-
#### Identify Bucket URL
80+
#### Identificar a URL do Bucket
8181

82-
For black-box testing, S3 URLs can be found in the HTTP messages. The following example shows a bucket URL is sent in the `img` tag in a HTTP response.
82+
Para testes de caixa-preta, as URLs do S3 podem ser encontradas nas mensagens HTTP. O exemplo a seguir mostra uma URL de bucket enviada na tag `img` em uma resposta HTTP.
8383

8484
```html
8585
...
8686
<img src="https://my-bucket.s3.us-west-2.amazonaws.com/puppy.png">
8787
...
8888
```
8989

90-
For gray-box testing, you can obtain bucket URLs from Amazon's web interface, documents, source code, or any other available sources.
90+
Para testes de caixa cinza, você pode obter URLs de buckets a partir da interface web da Amazon, documentos, código-fonte ou qualquer outra fonte disponível.
9191

92-
#### Testing with AWS-CLI
92+
#### Testando com AWS-CLI
9393

94-
In addition to testing with curl, you can also test with the AWS Command-line tool. In this case `s3://` protocol is used.
94+
Além dos testes com curl, você também pode testar com a ferramenta de linha de comando AWS. Nesse caso, é usado o protocolo `s3://`.
9595

96-
##### List
96+
##### Lista
9797

98-
The following command lists all the objects of the bucket when it is configured public.
98+
O seguinte comando lista todos os objetos do bucket quando configurado como público.
9999

100100
```bash
101-
aws s3 ls s3://<bucket-name>
101+
aws s3 ls s3://<nome-do-bucket>
102102
```
103103

104104
##### Upload
105105

106-
The following is the command to upload a file
106+
O seguinte é o comando para fazer upload de um arquivo
107107

108108
```bash
109-
aws s3 cp arbitrary-file s3://bucket-name/path-to-save
109+
aws s3 cp arquivo-arbitrario s3://nome-do-bucket/caminho-para-salvar
110110
```
111111

112-
This example shows the result when the upload has been successful.
112+
Este exemplo mostra o resultado quando o upload foi bem-sucedido.
113113

114114
```bash
115-
$ aws s3 cp test.txt s3://bucket-name/test.txt
116-
upload: ./test.txt to s3://bucket-name/test.txt
115+
$ aws s3 cp teste.txt s3://nome-do-bucket/teste.txt
116+
upload: ./teste.txt to s3://nome-do-bucket/teste.txt
117117
```
118118

119-
This example shows the result when the upload has failed.
119+
Este exemplo mostra o resultado quando o upload falhou.
120120

121121
```bash
122-
$ aws s3 cp test.txt s3://bucket-name/test.txt
123-
upload failed: ./test2.txt to s3://bucket-name/test2.txt An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
122+
$ aws s3 cp teste.txt s3://nome-do-bucket/teste.txt
123+
upload failed: ./teste2.txt to s3://nome-do-bucket/teste2.txt An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
124124
```
125125

126-
##### Remove
126+
##### Remover
127127

128-
The following is the command to remove an object
128+
O seguinte é o comando para remover um objeto
129129

130130
```bash
131-
aws s3 rm s3://bucket-name/object-to-remove
131+
aws s3 rm s3://nome-do-bucket/
132+
133+
objeto-para-remover
132134
```
133135

134-
## Tools
136+
## Ferramentas
135137

136138
- [AWS CLI](https://aws.amazon.com/cli/)
137139

138-
## References
140+
## Referências
139141

140-
- [Working with Amazon S3 Buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html)
141-
- [flAWS 2](http://flaws2.cloud)
142+
- [Trabalhando com Buckets do Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html)
143+
- [flAWS 2](http://flaws2.cloud)

0 commit comments

Comments
 (0)