Skip to content

Commit e3a986f

Browse files
authored
Update 0xa9-improper-inventory-management.md
1 parent 43863d4 commit e3a986f

File tree

1 file changed

+77
-68
lines changed

1 file changed

+77
-68
lines changed

editions/2023/pt-pt/0xa9-improper-inventory-management.md

Lines changed: 77 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,94 +7,103 @@
77

88
## A API é vulnerável?
99

10-
The sprawled and connected nature of APIs and modern applications brings new
11-
challenges. It is important for organizations not only to have a good
12-
understanding and visibility of their own APIs and API endpoints, but also how
13-
the APIs are storing or sharing data with external third parties.
10+
A natureza dispersa e conectada das APIs e das aplicações modernas traz novos
11+
desafios. É importante que as organizações não só tenham uma boa compreensão e
12+
visibilidade das suas próprias APIs e _endpoints_, mas também de como as APIs
13+
estão a armazenar ou a partilhar dados com terceiros.
1414

15-
Running multiple versions of an API requires additional management resources
16-
from the API provider and expands the attack surface.
15+
Executar múltiplas versões de uma API requer recursos de gestão adicionais do
16+
fornecedor da API e expande a superfície de ataque.
1717

18-
An API has a "<ins>documentation blindspot</ins>" if:
18+
Uma API tem um "<ins>ponto cego de documentação</ins>" se:
1919

20-
* The purpose of an API host is unclear, and there are no explicit answers to
21-
the following questions
22-
* Which environment is the API running in (e.g. production, staging, test,
23-
development)?
24-
* Who should have network access to the API (e.g. public, internal, partners)?
25-
* Which API version is running?
26-
* There is no documentation or the existing documentation is not updated.
27-
* There is no retirement plan for each API version.
28-
* The host's inventory is missing or outdated.
20+
* O propósito de um _host_ da API é pouco claro e não há respostas explícitas
21+
para as seguintes perguntas:
22+
* Em que ambiente está a API a ser executada (por exemplo, produção,
23+
_staging_, teste, desenvolvimento)?
24+
* Quem deve ter acesso à rede da API (por exemplo, público, interno,
25+
parceiros)?
26+
* Qual versão da API está em execução?
27+
* Não existe documentação ou a documentação existente não está atualizada.
28+
* Não existe um plano de desativação para cada versão da API.
29+
* O inventário do _host_ está em falta ou desatualizado.
2930

30-
The visibility and inventory of sensitive data flows play an important role as
31-
part of an incident response plan, in case a breach happens on the third party
32-
side.
31+
A visibilidade e o inventário dos fluxos de dados sensíveis desempenham um papel
32+
importante como parte de um plano de resposta a incidentes, caso ocorra uma
33+
violação do lado de terceiros.
3334

34-
An API has a "<ins>data flow blindspot</ins>" if:
35+
Uma API tem um "<ins>ponto cego de fluxo de dados</ins>" se:
3536

36-
* There is a "sensitive data flow" where the API shares sensitive data with a
37-
third party and
38-
* There is not a business justification or approval of the flow
39-
* There is no inventory or visibility of the flow
40-
* There is not deep visibility of which type of sensitive data is shared
37+
* Existe um "fluxo de dados sensíveis" onde a API compartilha dados sensíveis
38+
com um terceiro e
39+
* Não existe uma justificação de negócio ou aprovação do fluxo
40+
* Não existe inventário ou visibilidade do fluxo
41+
* Não há visibilidade detalhada sobre o tipo de dados sensíveis partilhados
4142

4243

4344
## Exemplos de Cenários de Ataque
4445

4546
### Cenário #1
4647

47-
A social network implemented a rate-limiting mechanism that blocks attackers
48-
from using brute force to guess reset password tokens. This mechanism wasn't
49-
implemented as part of the API code itself but in a separate component between
50-
the client and the official API (`api.socialnetwork.owasp.org`). A researcher
51-
found a beta API host (`beta.api.socialnetwork.owasp.org`) that runs the same
52-
API, including the reset password mechanism, but the rate-limiting mechanism was
53-
not in place. The researcher was able to reset the password of any user by using
54-
simple brute force to guess the 6 digit token.
48+
Uma rede social implementou um mecanismo de limitação de frequência de pedidos
49+
que previne que atacantes possam usar força bruta para adivinhar _tokens_ de
50+
redefinição de _password_. Este mecanismo não foi implementado como parte do
51+
código da própria API, mas num componente separado entre o cliente e a API
52+
oficial (`api.socialnetwork.owasp.org`). Um investigador encontrou um _host_ da
53+
API beta (`beta.api.socialnetwork.owasp.org`) que executa a mesma API, incluindo
54+
o mecanismo de redefinição de _password_, mas sem o mecanismo de limitação de
55+
frequência de pedidos. O investigador conseguiu redefinir a _password_ de
56+
qualquer utilizador usando força bruta simples para adivinhar o _token_ de 6
57+
dígitos.
5558

5659
### Cenário #2
5760

58-
A social network allows developers of independent apps to integrate with it. As
59-
part of this process a consent is requested from the end user, so the social
60-
network can share the user's personal information with the independent app.
61+
Uma rede social permite que desenvolvedores de aplicações independentes se
62+
integrem com ela. Como parte desse processo, é solicitado o consentimento do
63+
utilizador final para que a rede social possa partilhar as informações pessoais
64+
do utilizador com a aplicação independente.
6165

62-
The data flow between the social network and the independent apps is not
63-
restrictive or monitored enough, allowing independent apps to access not only
64-
the user information but also the private information of all of their friends.
66+
O fluxo de dados entre a rede social e as aplicações independentes não é
67+
suficientemente restritivo ou monitorizado, permitindo que as aplicações acedam
68+
não apenas às informações do utilizador, mas também às informações privadas de
69+
todos os seus amigos.
6570

66-
A consulting firm builds a malicious app and manages to get the consent of
67-
270,000 users. Because of the flaw, the consulting firm manages to get access
68-
to the private information of 50,000,000 users. Later, the consulting firm
69-
sells the information for malicious purposes.
71+
Uma empresa de consultoria cria uma aplicação maliciosa e consegue obter o
72+
consentimento de 270 mil utilizadores. Devido a essa falha, a empresa de
73+
consultoria consegue aceder às informações privadas de 50 milhões de
74+
utilizadores. Mais tarde, a empresa de consultoria vende as informações para
75+
fins maliciosos.
7076

7177
## Como Prevenir
7278

73-
* Inventory all <ins>API hosts</ins> and document important aspects of each one
74-
of them, focusing on the API environment (e.g. production, staging, test,
75-
development), who should have network access to the host (e.g. public,
76-
internal, partners) and the API version.
77-
* Inventory <ins>integrated services</ins> and document important aspects such
78-
as their role in the system, what data is exchanged (data flow), and their
79-
sensitivity.
80-
* Document all aspects of your API such as authentication, errors, redirects,
81-
rate limiting, cross-origin resource sharing (CORS) policy, and endpoints,
82-
including their parameters, requests, and responses.
83-
* Generate documentation automatically by adopting open standards. Include the
84-
documentation build in your CI/CD pipeline.
85-
* Make API documentation available only to those authorized to use the API.
86-
* Use external protection measures such as API security specific solutions for
87-
all exposed versions of your APIs, not just for the current production
88-
version.
89-
* Avoid using production data with non-production API deployments. If this is
90-
unavoidable, these endpoints should get the same security treatment as the
91-
production ones.
92-
* When newer versions of APIs include security improvements, perform a risk
93-
analysis to inform the mitigation actions required for the older versions.
94-
For example, whether it is possible to backport the improvements without
95-
breaking API compatibility or if you need to take the older version out
96-
quickly and force all clients to move to the latest version.
97-
79+
* Inventarie todos os <ins>_hosts_ da API</ins> e documentar os aspectos
80+
importantes de cada um deles, focando no ambiente da API (por exemplo,
81+
produção, _staging_, teste, desenvolvimento), quem deve ter acesso à rede do
82+
_host_ (por exemplo, público, interno, parceiros) e a versão da API.
83+
* Inventarie os <ins>serviços integrados</ins> e documentar aspectos
84+
importantes, como o seu papel no sistema, quais dados são trocados (fluxo de
85+
dados) e a sua sensibilidade.
86+
* Documente todos os aspectos da sua API, como autenticação, erros,
87+
redirecionamentos, limitação de frequência de pedidos, política de partilha de
88+
recursos entre origens (CORS) e _endpoints_, incluindo os seus parâmetros,
89+
pedidos e respostas.
90+
* Crie documentação automaticamente adotando padrões abertos. Inclua a
91+
construção da documentação no seu _pipeline_ de CI/CD.
92+
* Disponibilize a documentação da API apenas para aqueles autorizados a utilizar
93+
a API.
94+
* Utilize medidas de proteção externas, como soluções específicas de segurança
95+
de API, para todas as versões expostas das suas APIs, não apenas para a versão
96+
de produção atual.
97+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
98+
* Evite utilizar dados de produção em implementações de API que não são
99+
produção. Se isso for inevitável, esses _endpoints_ devem receber o mesmo
100+
tratamento de segurança que os de produção.
101+
* Quando versões mais recentes das APIs incluem melhorias de segurança, realize
102+
uma análise de risco para informar as ações de mitigação necessárias para as
103+
versões mais antigas. Por exemplo, se é possível aplicar as melhorias nessas
104+
versões mais antigas sem quebrar a compatibilidade da API ou se é necessário
105+
remover rapidamente a versão mais antiga e forçar todos os clientes a migrar
106+
para a versão mais recente.
98107

99108
## Referências
100109

0 commit comments

Comments
 (0)