DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. API Security Weekly: Issue #14

API Security Weekly: Issue #14

We take a look at the latest news in the world of API security, as well as a few code snippets you can use to better protect your APIs.

Dmitry Sotnikov user avatar by
Dmitry Sotnikov
CORE ·
Jan. 18, 19 · News
Like (4)
Save
Tweet
Share
8.04K Views

Join the DZone community and get the full member experience.

Join For Free

This week there were a lot of reports of vulnerable APIs: from flight reservations systems to trading sites and even hot tubs. We also look into best practices for handling special characters in JSON and protecting APIs for mobile applications.

Vulnerabilities

Noam Rotem found a dangerous combination of vulnerabilities in APIs of Amadeus flight booking system and El Al airline:

  • The Amadeus API allowed for brute force enumeration of booking identifiers (also known as PNR – Passenger Name Record).
  • The El Al API gave personal and booking details for any PNR.
  • Once both PNR and passenger names were known, attackers could log in and change the booking.

DX:Exchange, a popular trading site with over 600,000 users, had vulnerable APIs under the hood. The issues included, for example:

  • Non-expiring unsigned access tokens.
  • JWT tokens leaking other users’ tokens.

Researchers were able to get other users’ tokens and invoked the APIs on their behalf.

Balboa smart hot tubs’ APIs are extremely vulnerable:

  • The APIs are “protected” with a shared hardcoded password.
  • The mobile app controlling the hot tub is invoking the hot tub’s API over the internet.
  • Each hot tub comes with an unprotected WiFi hotspot.
  • The APIs use the WiFi hotspot ID as the device identifier.

Attackers can use WiFi hotspot directories to locate all Balboa hot tubs. This gives them both the ID and the location of a hot tub. After that, they can invoke the APIs of the hot tub, know when it is in use, and take over control.

To make things worse, the manufacturer is not responding or fixing the product. IoT security as bad as it gets.

A story also surfaced on how Shopify found that their Kubernetes deployment was vulnerable. Shopify used a beta version of the Kubernetes API that was susceptible to SSRF attack. Luckily, this got reported in their bug bounty program, so it only cost them $25,000 in reward money.

Best Practices

Does your API’s JSON get rendered in XHTML? If so, make sure to properly escape CDATA by using JSON stringifier. Encode <>& characters as well as non-ASCII chars like line and paragraph separators. Or better yet, avoid inline scripts altogether. See this Stack Overflow discussion.

Conferences

Skip Hovsmith gave his “Tour of API underprotection” session at OWASP AppSec California. Hovsmith used a scenario of a mobile app company protecting their API from a rogue app. His advice in a nutshell:

  • Authorize applications, not just users.
  • Remove secrets.
  • Use shortlived tokens.

Opinions

Bernard Harguindeguy from Ping Identity takes a look at various API attacks, such as:

  • Login
  • DoS and DDoS
  • Application and data

He argues that, in these cases, AI is the solution to consider.

Subscribe to this weekly newsletter at https://APISecurity.io

API mobile app security

Published at DZone with permission of Dmitry Sotnikov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL
  • How To Check Docker Images for Vulnerabilities
  • Differences Between Site Reliability Engineer vs. Software Engineer vs. Cloud Engineer vs. DevOps Engineer
  • Better Performance and Security by Monitoring Logs, Metrics, and More

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: