Skip to content

Commit 6d4c49c

Browse files
committed
docs(A9:2019): Improve "Improper Assets Management"
* additional details about security weakness * "Is the API Vulnerable?" additional points * new attack scenario * more on "How to Prevent"
1 parent 26bedc4 commit 6d4c49c

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

2019/en/0xa9-improper-assets-management.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ A9:2019 Improper Assets Management
44
| Threat agents/Attack vectors | Security Weakness | Impacts |
55
| - | - | - |
66
| API Specific : Exploitability **3** | Prevalence **3** : Detectability **2** | Technical **2** : Business Specific |
7-
| Old API versions are usually unpatched and are an easy way to compromise systems without having to fight state of the art security mechanisms that might be in place to protect the most recent API versions. | Outdated documentation makes it more difficult to find and/or fix vulnerabilities. Lack of assets inventory and retire strategies leads to running unpatched systems and leakage of sensitive data. | Attackers may gain access to sensitive data or even takeover the server through old, unpatched API versions connected to the same database. |
7+
| Old API versions are usually unpatched and are an easy way to compromise systems without having to fight state of the art security mechanisms that might be in place to protect the most recent API versions. | Outdated documentation makes it more difficult to find and/or fix vulnerabilities. Lack of assets inventory and retire strategies leads to running unpatched systems and leakage of sensitive data. It’s common to find unnecessarily exposed API hosts because of modern concepts like microservices, which make applications easy to deploy and independent (e.g. cloud computing, k8s) | Attackers may gain access to sensitive data or even takeover the server through old, unpatched API versions connected to the same database. |
88

99
## Is the API Vulnerable?
1010

11-
The API is vulnerable if:
11+
An API is vulnerable if:
1212

13+
* The purpose of an API host is unclear, and there are no explicit answers to
14+
the following questions:
15+
* Which environment is the API running in (e.g. production, staging, test,
16+
development)?
17+
* Who should have network access to the API (e.g. public, internal, partners)?
18+
* Which API version is running?
1319
* There is no documentation or the existing documentation is not updated.
1420
* There is no retirement plan for each API version.
1521
* Hosts inventory is missing or outdated.
@@ -22,19 +28,33 @@ The API is vulnerable if:
2228
After redesigning their applications, a local search service left an old API
2329
version (`api.someservice.com/v1`) running, unprotected and with access to the
2430
user database. While targeting one of the latest released applications an
25-
attacker got the API address (`api.someservice.com/v2`). Replacing `v2` with
26-
`v1` in the URL gave the attacker access to the old and unprotected API,
31+
attacker found the API address (`api.someservice.com/v2`). Replacing `v2` with
32+
`v1` in the URL gave the attacker access to the old, unprotected API,
2733
exposing the personal identifiable information (PII) of over 100 Million user.
2834

35+
### Scenario #2
36+
37+
A social network implemented a rate-limiting mechanism that blocks attackers
38+
from using brute-force to guess reset password tokens. This mechanism wasn’t
39+
implemented as part of the API code itself, but in a separate component between
40+
the client and the and the official API (`www.socialnetwork.com`).
41+
A researcher found a beta API host (`www.mbasic.beta.socialnetwork.com`) that
42+
runs the same API, including the reset password mechanism, but the rate limiting
43+
mechanism was not in place. The researcher was able to reset the password of any
44+
user by using a simple brute-force to guess the 6 digits token.
45+
2946
## How To Prevent
3047

48+
* Inventory all API hosts and document important aspects of each one of them,
49+
focusing on the API environment (e.g. production, staging, test, development),
50+
who should have network access to the host (e.g. public, internal, partners)
51+
and the API version.
3152
* Document all aspects of your API such as authentication, errors, redirects,
3253
rate limiting, cross-origin resource sharing (CORS) policy and endpoints,
3354
including their parameters, requests and responses.
34-
* Include documentation of your code review practice.
3555
* Generate documentation automatically by adopting open standards. Include the
3656
documentation build in your CI/CD pipeline.
37-
* Make API documentation generally available.
57+
* Make API documentation available to those authorized to use the API.
3858

3959
## References
4060

0 commit comments

Comments
 (0)