Skip to content

Commit 7c80945

Browse files
authored
Update 0xaa-unsafe-consumption-of-apis.md
1 parent 0bf8741 commit 7c80945

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

editions/2023/pt-pt/0xaa-unsafe-consumption-of-apis.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@
33
| Agentes Ameaça/Vetores Ataque | Falha Segurança | Impactos |
44
| - | - | - |
55
| Específico da API : Abuso **Fácil** | Prevalência **Comum** : Deteção **Moderado** | Técnico **Severo** : Específico Negócio |
6-
| Exploiting this issue requires attackers to identify and potentially compromise other APIs/services the target API integrated with. Usually, this information is not publicly available or the integrated API/service is not easily exploitable. | Developers tend to trust and not verify the endpoints that interact with external or third-party APIs, relying on weaker security requirements such as those regarding transport security, authentication/authorization, and input validation and sanitization. Attackers need to identify services the target API integrates with (data sources) and, eventually, compromise them. | The impact varies according to what the target API does with pulled data. Successful exploitation may lead to sensitive information exposure to unauthorized actors, many kinds of injections, or denial of service. |
6+
| Explorar este problema requer que os atacantes identifiquem e potencialmente comprometam outras APIs/serviços com os quais a API alvo está integrada. Normalmente, esta informação não está disponível publicamente ou a API/serviço integrado não é facilmente explorável. | Os desenvolvedores tendem a confiar e não a verificar os _endpoints_ que interagem com APIs externas ou de terceiros, dependendo de requisitos de segurança mais fracos, como aqueles relacionados à segurança do transporte, autenticação/autorização e validação e sanitização de dados. Os atacantes precisam identificar os serviços com os quais a API alvo se integra (fontes de dados) e, eventualmente, comprometer esses serviços. | O impacto varia de acordo com o que a API alvo faz com os dados extraídos. A exploração bem sucedida pode levar à exposição de informações sensíveis a atores não autorizados, a vários tipos de injeções ou à negação de serviço. |
77

88
## A API é vulnerável?
99

10-
Developers tend to trust data received from third-party APIs more than user
11-
input. This is especially true for APIs offered by well-known companies.
12-
Because of that, developers tend to adopt weaker security standards, for
13-
instance, in regards to input validation and sanitization.
10+
Os desenvolvedores tendem a confiar mais nos dados recebidos de APIs de
11+
terceiros do que nos dados fornecidos por utilizadores. Isso é especialmente
12+
verdade para APIs oferecidas por empresas bem conhecidas. Por essa razão, os
13+
desenvolvedores tendem a adotar padrões de segurança mais fracos, especialmente
14+
no que diz respeito à validação e sanitização de dados.
1415

15-
The API might be vulnerable if:
16+
A API pode estar vulnerável se:
1617

17-
* Interacts with other APIs over an unencrypted channel;
18-
* Does not properly validate and sanitize data gathered from other APIs prior
19-
to processing it or passing it to downstream components;
20-
* Blindly follows redirections;
21-
* Does not limit the number of resources available to process third-party
22-
services responses;
23-
* Does not implement timeouts for interactions with third-party services;
18+
* Interage com outras APIs através de um canal não encriptado;
19+
* Não valida e sanitiza corretamente os dados recolhidos de outras APIs antes de
20+
os processar ou de os passar para componentes posteriores;
21+
* Segue redirecionamentos cegamente;
22+
* Não limita o número de recursos disponíveis para processar respostas de
23+
serviços de terceiros;
24+
* Não implementa limites de tempo para interações com serviços de terceiros;
2425

25-
## Example Attack Scenarios
26-
27-
### Scenario #1
26+
## Exemplos de Cenários de Ataque
2827

28+
### Cenário #1
29+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2930
An API relies on a third-party service to enrich user provided business
3031
addresses. When an address is supplied to the API by the end user, it is sent
3132
to the third-party service and the returned data is then stored on a local
@@ -37,7 +38,7 @@ specific input that makes it pull their "malicious business" from the
3738
third-party service. The SQLi payload ends up being executed by the database,
3839
exfiltrating data to an attacker's controlled server.
3940

40-
### Scenario #2
41+
### Cenário #2
4142

4243
An API integrates with a third-party service provider to safely store sensitive
4344
user medical information. Data is sent over a secure connection using an HTTP
@@ -62,15 +63,15 @@ Since the API blindly follows the third-party redirects, it will repeat the
6263
exact same request including the user's sensitive data, but this time to the
6364
attacker's server.
6465

65-
### Scenario #3
66+
### Cenário #3
6667

6768
An attacker can prepare a git repository named `'; drop db;--`.
6869

6970
Now, when an integration from an attacked application is done with the
7071
malicious repository, SQL injection payload is used on an application that
7172
builds an SQL query believing the repository's name is safe input.
7273

73-
## How To Prevent
74+
## Como Prevenir
7475

7576
* When evaluating service providers, assess their API security posture.
7677
* Ensure all API interactions happen over a secure communication channel (TLS).
@@ -80,7 +81,7 @@ builds an SQL query believing the repository's name is safe input.
8081
yours to: do not blindly follow redirects.
8182

8283

83-
## References
84+
## Referências
8485

8586
### OWASP
8687

@@ -91,7 +92,7 @@ builds an SQL query believing the repository's name is safe input.
9192
* [Transport Layer Protection Cheat Sheet][5]
9293
* [Unvalidated Redirects and Forwards Cheat Sheet][6]
9394

94-
### External
95+
### Externas
9596

9697
* [CWE-20: Improper Input Validation][7]
9798
* [CWE-200: Exposure of Sensitive Information to an Unauthorized Actor][8]

0 commit comments

Comments
 (0)