API Security Issue 157
Read about potential vulnerability in existing Prometheus installations, API attack surface calculator, and trends and patterns in publicly available OpenAPI definitions.
Join the DZone community and get the full member experience.Join For Free
This week, we have details of a potential vulnerability in existing Prometheus installations with no endpoint security enabled, details of a new tool to assist organizations to map their API attack surface, a report on the analysis of publicly available OpenAPI definition files in the public domain, and news on upcoming API security awareness and training from We Hack Purple.
Vulnerability: Unsafe Defaults in Prometheus Expose Secrets
JFrog recently published a report on a potential vulnerability in Prometheus, a popular open-source event monitoring and alerting solution. Attackers could parse unsecured endpoints to retrieve sensitive data.
Previously, the metrics had not been considered sensitive at all, but in version 2.24.0 support for TLS and basic authentication were added. Unfortunately, because this is a relatively new feature (v2.24.0 was released in January 2021) and many installations in the public domain still use an older version, JFrog concludes that large-scale data exfiltration is still currently possible.
The authors describe some elementary intelligence gathering techniques using Shodan and ZoomEye to ingest data from over 27,000 hosts. Their findings included:
- Sensitive operational information like usernames and passwords were exposed.
- 15.6% of endpoints had exposed and unsecured administration interfaces.
The key takeaways here are:
- If you are concerned with unintended information exposure, enable both basic authentication and TLS in your Prometheus setup.
- Be wary of default settings in any system, their security level might not be what you want and might have unintended consequences.
Tools: Free Tool for Mapping API Attack Surface
The old adage of “you can’t improve what you can’t measure” applies equally well to security: you can’t secure what you don’t know about. API security is a no different beast here.
API discovery is increasingly under the spotlight because it enables organizations to understand the extent of their risk exposure stemming from their API estate. In complex organizations, the vast variety of internal and external APIs, programming language and framework choices, and hosting or cloud environments can make this, or even estimating your attack surface, a challenging undertaking. The most likely result is a wild “finger in the air” estimate.
Luckily, there is a free API attack surface calculator to get you started. It allows you to get an (albeit very basic) estimate of your API attack surface based on a few basic, easily identified parameters. While not being a discovery tool proper, undertaking such an estimate should be illuminating in its own right: what are the knowns, what are the unknowns, where more information is required, and where should an organization start with its API security initiative.
Report: Analyzing Trends in OpenAPI Files
The increased adoption of the OpenAPI Specification (OAS) standard over the last decade has resulted in a vast number of OpenAPI definition files in public repositories.
In a fascinating report, courtesy of Nordic APIs, the Australian security company Assetnote scanned over 200,000 publicly available OpenAPI files, with the goal of discovering underlying trends and patterns in them.
In summary, some of the key findings here include:
- 79% of API definitions are valid OpenAPI definitions (conforming to the standard) which bodes well for the continued adoption of the OAS in large.
- APIs are increasingly complex: on average, each API had 37 paths and 51 endpoints.
GETis the most frequently used method, followed by
- Most APIs tend to favor basic authentication, followed by API key methods. Somewhat worryingly, the third most popular option is having no security at all!
Training: We Hack Purple Offers API Security Awareness and Training
The continued interest in API security is being reflected in the availability of new, quality training offerings.
This week, we have news of an API security awareness event, featuring Isabelle Mauny (field CTO of 42Crunch) in a conversation with Tanya Janca (aka. @shehackspurple) as part of Tanya’s new We Hack Purple academy and community.
Also of interest to API security practitioners will be the upcoming mini-course from the We Hack Purple community. I look forward to featuring the course in this newsletter once it is available.
You can subscribe to this newsletter at APIsecurity.io.
Published at DZone with permission of Colin Domoney. See the original article here.
Opinions expressed by DZone contributors are their own.