You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: 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 number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
# Teste de Configuração da Plataforma de Aplicativos
Copy file name to clipboardexpand all lines: 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 number
Diff line number
Diff 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
Copy file name to clipboardexpand all lines: 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 number
Diff line number
Diff 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
Copy file name to clipboardexpand all lines: 4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/06-Testar-Metodos-HTTP.md
Copy file name to clipboardexpand all lines: 4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/07-Testar-Seguranca-de-Transporte-Estrito-HTTP.md
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:
10
10
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.
13
13
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.
15
15
16
16
### GitHub
17
17
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.
21
21
22
-
### Expired Domain
22
+
### Domínio Expirado
23
23
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.
26
26
27
-
## Test Objectives
27
+
## Objetivos do Teste
28
28
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.
31
31
32
-
## How to Test
32
+
## Como Testar
33
33
34
-
### Black-Box Testing
34
+
### Teste de Caixa Preta
35
35
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.
37
37
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:
39
39
40
40
-`NXDOMAIN`
41
41
-`SERVFAIL`
42
42
-`REFUSED`
43
43
-`no servers could be reached.`
44
44
45
-
#### Testing DNS A, CNAME Record Subdomain Takeover
45
+
#### Testando Subdomínio Takeover de Registro DNS A, CNAME
46
46
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`:
48
48
49
49
```bash
50
50
$ ./dnsrecon.py -d victim.com
@@ -56,7 +56,7 @@ $ ./dnsrecon.py -d victim.com
56
56
...
57
57
```
58
58
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`:
The following DNS responses warrant further investigation: `NXDOMAIN`.
70
+
As seguintes respostas do DNS exigem investigação adicional: `NXDOMAIN`.
71
71
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:
73
73
74
74
```bash
75
75
$ whois 192.30.252.153 | grep "OrgName"
76
76
OrgName: GitHub, Inc.
77
77
```
78
78
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.
80
80
81
81
\
82
-
*Figure 4.2.10-1: GitHub 404 File Not Found response*
82
+
*Figura 4.2.10-1: Resposta doGitHub 404 Arquivo não encontrado*
83
83
84
-
The tester claims the domain using GitHub Pages:
84
+
O testador reivindica o domínio usando as Páginas do GitHub:
Identifique todos os servidores de nomes para o domínio em questão:
92
92
93
93
```bash
94
94
$ dig ns victim.com +short
95
95
ns1.victim.com
96
96
nameserver.expireddomain.com
97
97
```
98
98
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.
100
100
101
-
The following DNS responses warrant further investigation: `SERVFAIL`or`REFUSED`.
101
+
As seguintes respostas do DNS exigem investigação adicional: `SERVFAIL`ou`REFUSED`.
102
102
103
-
### Gray-Box Testing
103
+
### Teste de Caixa Cinza
104
104
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.
106
106
107
-
## Remediation
107
+
## Remediação
108
108
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.
110
110
111
-
## Tools
111
+
## Ferramentas
112
112
113
-
- [dig - man page](https://linux.die.net/man/1/dig)
114
-
- [recon-ng - Web Reconnaissance framework](https://github.com/lanmaster53/recon-ng)
- [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)
- [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)
Copy file name to clipboardexpand all lines: 4-Testes-Seguranca-Web-Apps/02-Testes-de-Configuracao-e-Gerenciamento-de-Implementacao/11-Testar-Armazenamento-na-Nuvem.md
+48-46
Original file line number
Diff line number
Diff line change
@@ -4,138 +4,140 @@
4
4
|------------|
5
5
|WSTG-CONF-11|
6
6
7
-
## Summary
7
+
## Resumo
8
8
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.
10
10
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.
12
12
13
-
## Test Objectives
13
+
## Objetivos do Teste
14
14
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.
16
16
17
-
## How to Test
17
+
## Como Testar
18
18
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:
20
20
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
23
23
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.
25
25
26
-
To test the ability to read an object:
26
+
Para testar a capacidade de ler um objeto:
27
27
28
28
```bash
29
-
curl -X GET https://<cloud-storage-service>/<object>
29
+
curl -X GET https://<servico-de-armazenamento-na-nuvem>/<objeto>
30
30
```
31
31
32
-
To test the ability to upload a file:
32
+
Para testar a capacidade de fazer upload de um arquivo:
33
33
34
34
```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'
36
36
```
37
37
38
-
### Testing for Amazon S3 Bucket Misconfiguration
38
+
### Testando a Má Configuração do Bucket do Amazon S3
39
39
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.
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.
67
67
68
-
-Virtual Hosted Style Access
68
+
-Acesso de Estilo de Host Virtual
69
69
70
70
```text
71
71
https://bucket-name.s3.amazonaws.com
72
72
```
73
73
74
-
-Path-Style Access
74
+
-Acesso de Estilo de Caminho
75
75
76
76
```text
77
77
https://s3.amazonaws.com/bucket-name
78
78
```
79
79
80
-
#### Identify Bucket URL
80
+
#### Identificar a URL do Bucket
81
81
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.
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.
91
91
92
-
#### Testing with AWS-CLI
92
+
#### Testando com AWS-CLI
93
93
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://`.
95
95
96
-
##### List
96
+
##### Lista
97
97
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.
99
99
100
100
```bash
101
-
aws s3 ls s3://<bucket-name>
101
+
aws s3 ls s3://<nome-do-bucket>
102
102
```
103
103
104
104
##### Upload
105
105
106
-
The following is the command to upload a file
106
+
O seguinte é o comando para fazer upload de um arquivo
0 commit comments