APIsecurity.io - Issue 97: How to not leak API keys

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #97
Gym apps & home automation vulnerabilities, how to not leak API keys
This week, we check out the recent API vulnerabilities in the gym management platform Fizikal and the HDL smart home automation. We also have a great detailed write-up on a Capture the Flag challenge, and a talk on leaking API keys.
Vulnerability: Fizikal
 

Apps use platforms to get to the market faster and to avoid re-inventing the wheel. As a flip side, sometimes the security issues of these platforms can come and bite them.

Fizikal is a management platform for gym apps that is used in about 80 different apps, with a total of about 240 000 users. Sahar Avitan from Security Joes found a set of vulnerabilities in Fizikal’s APIs that allowed attackers to find users on the platform and extract their profile information or take over their accounts.

As often happens, the password reset API was the weakest link. Avitan found out that he could make a call to it and supply a phone number as a parameter. The API response was different for phone numbers that existed in the platform  than on those that didn’t. As phone numbers are easy to enumerate, this gave attackers a way to find who had and account and who did not.

In the next step, the reset code turned out to be just a four digit number, resulting in  just 10 000 possible combinations to try. A lack of proper rate limiting on the API made it simple to brute-force and enumerate all combinations. All this culminated in a full account takeover, meaning that attackers could retrieve personal details, like:

  • Phone number
  • Full name
  • Date of birth
  • Email address
  • Postal address
  • ID number
  • Gym attendance schedule

Powerful stuff, especially when combined properly. To avoid similar API vulnerabilities:

Vulnerability: HDL Automation
 

Barak Sternberg did a presentation at DEF CON on the vulnerabilities that he found in the HDL Automation smart home and building management system:

  • The endpoint /api/GetRoomBindingDevice was vulnerable to SQL injection and thus leaking information about devices and users.
  • The configuration management created shadow accounts for all user accounts. These shadow accounts had -debug added to them (as is user-debug@email.com). So, if a user’s email was from public email service like Gmail, attackers could just register a mailbox for the valid shadow account with the -debug and use APIs to reset the password for the shadow account to get full access to account configuration.

Click the link above to read the summary of the story in BleepingComputer, or watch the full recording from DEF CON below:

Lessons learned here:

Hackathons: Capture The Flag challenge
 

Capture the Flag (CTF) is a popular format of hackathon challenges in which participants need to break into an intentionally vulnerable system.

Here is a nice detailed write-up by Brett Buerhaus on solving a CTF challenge at the recent HackerOne HacktivityCon 2020. The challenge included:

  • Finding and exploring an API vulnerability
  • Endpoint discovery
  • Server-Side Request Forgery (SSRF)
  • SQL injections
  • Cross-Site Scripting (XSS)

If you ever wanted to follow a breakdown on this kind of challenge, this is a prime candidate for it.

Videos: API keys
 

Leaked API keys remain one of the key sources of API breaches. See this recording of the Red Team Village session “Have my keys been pwned? – API Edition”  by Jose Hernandez and Rod Soto to learn how API keys leak out from CI/CD, how they can be found, and how to prevent all this from happening.

 
dmitry_apisec-1  

Dmitry Sotnikov

APIsecurity.io

 
Thanks for reading.

That's it for today. If you have any feedback or stories to share, simply reply to this email.

Please forward the newsletter to your friends and colleagues who might benefit from it.

 
42Crunch Ltd   71-75 Shelton Street  Covent Garden  London  Greater London   WC2H 9JQ   United Kingdom
You received this email because you are subscribed to API Security News from 42Crunch Ltd.

Update your email preferences to choose the types of emails you receive or Unsubscribe from all future emails  
 
 

Older messages

Issue 96: Vulnerabilities at Cisco and MGM Grand Resort 🏖️, tutorial on Chrome DevTools and pentesting with GraphQL

Thursday, August 13, 2020

Hi, today we look at a couple of API vulnerabilities and two pentesting video tutorials APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #96 Vulnerabilities at

Issue 95: Vulnerabilities at Zoom and OkCupid 💘, progress on OAuth 2.1, API Information Disclosure tutorial

Wednesday, August 5, 2020

Hi, today we look at a couple recent vulnerabilities, a video on locating leaky APIs & APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #95 Vulnerabilities at

Issue 94: Two-day API security training at Black Hat USA 🎩

Wednesday, July 29, 2020

Hi, today we look at the possible API exploit for Wordpress, new stats on WAFs and API APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #94 Two-day API security

Issue 93: Google Sign In flaw in Chingari 📱, a guide to OAuth Authorization Code grant

Thursday, July 23, 2020

Hi, this week we have an OAuth vulnerability, OAuth pentesting guide, Swagger-EZ Burp.. APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #93 Google Sign In flaw in

Issue 92: APIs putting dementia patients at risk ⚕️, OAuth simulators

Friday, July 17, 2020

Hi, today we look at a couple API vulnerabilities, two OAuth2 emulators and a webinar APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #92 APIs putting dementia

You Might Also Like

Learning about Android Runtime

Thursday, April 25, 2024

View in browser 🔖 Articles Learning about Android Runtime I always enjoy reading articles that explore how something works under the hood. Here's an article that does exactly that, providing

Stripe changes its … stripes

Wednesday, April 24, 2024

TikTok on the president's docket and Nvidia acquires Run:ai View this email online in your browser By Christine Hall Wednesday, April 24, 2024 Good afternoon, and welcome to TechCrunch PM! Today

💪 You Can Use Copilot AI as a Personal Trainer — Why Your Laptop Needs a Docking Station

Wednesday, April 24, 2024

Also: Here's How to Make Your Apple ID Recoverable, and More! How-To Geek Logo April 24, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to

JSK Daily for Apr 24, 2024

Wednesday, April 24, 2024

JSK Daily for Apr 24, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JSK Weekly - 24th April, 2024 React 19 has introduced many great functionalities and

Daily Coding Problem: Problem #1422 [Hard]

Wednesday, April 24, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. Given a list of integers, write a function that returns the largest sum of non-

Charted | Artificial Intelligence Patents, by Country 🤖

Wednesday, April 24, 2024

This visualization shows which countries have been granted the most AI patents each year, from 2012 to 2022. View Online | Subscribe Presented by: New on VC+: Our Visual Briefing on the IMF's World

Save your seat: 1Password’s 2024 Security report insights webinar

Wednesday, April 24, 2024

Join us April 25th. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Top Tech Deals 📱 LG Flex TV, Google Pixel 7, DJI Mini 3, and More

Wednesday, April 24, 2024

Get yourself a discounted DJI drone, save on the Pixel 7, or score some PC and phone accessories. How-To Geek Logo April 24, 2024 Top Tech Deals: LG Flex TV, Google Pixel 7, DJI Mini 3, and More Find

The Protest Song Wakes Up 🎙️

Wednesday, April 24, 2024

Is this song the future of musical protest? Here's a version for your browser. Hunting for the end of the long tail • April 24, 2024 The Protest Song Wakes Up A buzzy protest song about the

JSK Weekly - 24th April, 2024

Wednesday, April 24, 2024

React 19 has introduced many great functionalities and features, among which the useOptimistic hook stands out. The useOptimistic hook offers a seamless way to manage UI states during asynchronous