API Security Weekly: Issue #13
This week saw a lot of new vulnerabilities and threats to API security.
Join the DZone community and get the full member experience.Join For Free
Another OAuth hack, and another reason why using OAuth for authentication can be dangerous. Researches by SafetyDetective found that Microsoft had 400 million users exposed. Outlook, Store, and other services allowed wildcard
*.office.com as a valid
wreply URL for tokens from
login.live.com. Attackers noticed that and managed to grab the
success.office.com domain in Azure. Now, the attackers could construct login URLs that, whenever users clicked the URLs, provided the attackers valid tokens they could intercept and use to access Microsoft Outlook and Microsoft Store as those users.
In addition, yet another intranet/open ports hack, similar to the printer hack last month. This time, attackers are using the Shodan search engine to locate Chromecast devices exposed to the Internet by local routers. Once located, attackers can take over the Chromecast devices and stream the videos that they want onto users’ TVs. Again, the reason is that Chromecast APIs were designed with home Wi-Fi network in mind, so it is assumed that whoever gets access to the API must be the device owner. To protect yourself, if you have a Chromecast device at home, make sure you disable UPnP on your home router.
API Implementation Hygiene
Beware of the declared OAuth scopes in your APIs potentially not matching the actual scope that you grant. The OAuth scope of the Twitter API that was not supposed to grant access to direct messages actually did.
“Bypassing WAFs with JSON Unicode Escape Sequences” by Tyler Rosonke is another example of why Web Application Firewalls (WAF) are not sufficient for API security. Rosonke used unicode encoding in JSON in API calls to construct SQL injection commands to backends. WAFs were not API-aware and failed to detect and block the attacks.
Kubernetes APIs had a couple new vulnerabilities this week:
- CVE-2018-18264 exposed TLS secrets through a simple
[DASHBOARD_HOST]/api/v1/secret/kube-system/kubernetes-dashboard-certscall in any dashboard deployment v1.10.0 or earlier using a custom domain.
- Remember the Kubernetes API Server hack just a month ago? Another one got reported this week. At this point, it is recommended that you run Kubernetes API Server in your nodes network and put any other sensitive resources in other networks or behind a heavy firewall.
It is not all about just API technology. Here are two stories on API data access and ecosystem that rhyme well:
- Facebook is under more criticism because it has turned out that it has been sharing private user data through APIs with its strategic partners, including Microsoft, Amazon, and Spotify. The API code worked as designed (meaning Facebook was willing to share the data so the access was authorized), but on the governance level, this violated user privacy settings and user expectations.
- Telegram messenger is being pressed to reduce its the openness of its APIs and start discriminating or even blocking third-party client apps that are suspected to be controlled by oppressive governments (in this case, Iran).
Internet of Things (IoT) APIs are becoming an evermore important part of API security. OWASP has updated their Top ten threat list for IoT.
2018 – Year in Review
Looks like the largest data breach of 2018 was API-related after all: Aadhar, the unique identity system in India, had unsecured API accessing the database. As a result, it exposed 1.1 billion records of Indian residents – more than twice that of the Marriott breach (which was the runner-up and not API-related).
You can subscribe to this newsletter at https://APISecurity.io.
Published at DZone with permission of Dmitry Sotnikov, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.