Issue 140: API vulnerabilities at LazyPay, Western Digital, and LinkedIn; IDOR mindmap 🗺️

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #140
API vulnerabilities at LazyPay, Western Digital, and LinkedIn; IDOR mindmap
This week, we take a look at the recent API vulnerabilities reported at LazyPay, API attacks on Western Digital My Book Live NAS systems, and LinkedIn profiles getting scraped. We also have a new detailed mind map for broken object-level authorization (BOLA/IDOR) vulnerabilities.
Vulnerability: LazyPay
 

LazyPay is a pay-later platform that has over 2 million active users in India.

Security researcher Ehraz Ahmed found that the API behind LazyPay’s mobile app was vulnerable. The story behind the link claims that this was an API for 3rd-party developers, but in a private chat with APIsecurity.io, Ahmed said that the journalist got it wrong and the API was in fact directly powering the mobile app.

LazyPay had an endpoint that had no authentication. Attackers could call the endpoint and supply a phone number to obtain sensitive personal information on the user in question, such as profile picture, name, gender, date of birth, postal address,  primary and secondary email addresses, secondary mobile number, know your customer (KYC) status (verified or not), and account creation date.

Keep in mind that there is a limited number of phone numbers in India. Thus, attackers could write a script to easily iterate through all possible phone numbers and retrieve the data for all users.

Once Ahmed alerted PayU — the parent company behind LazyPay — to the vulnerability, they promptly fixed the issue. According to them, there was no evidence of it being exploited.

Lessons learned here:

  • Even APIs that your own applications and their components use need authentication and authorization. Do not underestimate attackers’ determination and skill in finding and evoking any unprotected API endpoint.
  • Avoid predictable identifiers, like sequential IDs or phone numbers, to make it harder to scrape your data.
Vulnerability: Western Digital My Book Live NAS
 

There have been multiple reports over the last week of attackers going after internet-connected Western Digital My Book Live NAS (Network-Attached Storage) systems and remotely wiping them, killing all customer data. There have also been some additional reports on the devices getting taken under a botnet control instead of wiping them clean.

The initial reports assumed that the attack was based on the vulnerability CVE-2018-18472 reported by WizCase back in 2018  that Western Digital did not fix because the affected devices are no longer officially supported.

The vulnerability boiled down to unauthenticated remote command execution through a PUT request to the endpoint /api/1.0/rest/language_configuration. This endpoint accepted XML configurations but did not properly validate the XML. External entities were allowed and attackers could use them to force the NAS to download and execute scripts from an attacker server:

censys_diagram_on_WD_NAS_RCE

Researchers at Censys looked at the later reports and logs on the exploit and found that besides the original vulnerability, at least some of the attacks used a POST request to the REST API endpoint  system_factory_restore to wipe out the devices.

That endpoint didn’t require any authentication either. In fact, the researchers managed to get access to the code of the most recent (from 2015) software from the NAS and discovered that authentication check on that endpoint was intentionally commented out by developers:

function post($urlPath, $queryParams=null, $ouputFormat=’xml’){
// if(!authenticateAsOwner($queryParams))
// {
// header(“HTTP/1.0 401 Unauthorized”);
// return;
// }

parse_str(file_get_contents(“php://input”), $changes);
...

One can only speculate why this happened.

Since there is no patch available, Western Digital is urging all owners of the affected device to immediately disconnect it from the internet.

Lessons learned with this one:

  • Authentication is the key: your APIs should be protected, no matter what. There are precious few cases where having no authentication is acceptable (login, password reset, etc.) and they need to be handled with great care to prevent abuse.
  • Never trust API consumer inputs! Strictly define and enforce schemas for all API payloads.
  • Test your API implementations to make sure those conform to the API contracts and do so automatically on every update! This way, if, say, your developers disable authentication to make their dev testing easier (or for some other reason), your tests catch that and prevent the insecure code from hitting production. For example, this is what 42Crunch API Conformance Scan does.

 

API scraping: LinkedIn
 

Over the last few months, there have been several reports on scraped LinkedIn data. The latest one on this week was a set of 700 million profiles  — that’s 92% of the total LinkedIn user base!

(There are different opinions in the community as to whether the data in this particular set is new or is a compilation of earlier sets such as the 500 million profiles set leaked in April.)

The sellers confirmed that they obtained the data through LinkedIn APIs. The details in the data set include:

  • Full names
  • Physical addresses
  • Email addresses
  • Phone numbers
  • Geolocation records
  • LinkedIn username and profile URL
  • Other social media accounts and usernames
  • Personal and professional experience/background
  • Gender
LinkedIn-Data-Breach-700-million-users-exposed-2021-leak

Just like with the Facebook profile data leak that we reported in issue 129, even if the data is public, these large data sets scraped through APIs often amplify the power of the data and fuel phishing campaigns and other nefarious activities.

Thus, bulk user data scraping through APIs is a big problem and a risk that needs to be taken into account and addressed. Sadly, this seems to continue to be downplayed by many vendors arguing that it’s not a breach if legitimate APIs (as opposed to an infrastructure compromise) were used. In reality, the impact can be just as devastating.

Repeating the lessons learned that we posted previously:

  • APIs are one of your primary attack surfaces. Treat them as such!
  • Even public information can become dangerous once it becomes available as a large dataset. Information is power, after all: more information, more power. It should not be allowed to fall into wrong hands through negligence.
  • APIs should not give access to more data than you are comfortable with (and allowed to!) sharing through user interfaces.
  • Bulk operations are extremely dangerous. Always limit not just the rates at which APIs can be invoked and the amount of data that they can return.
  • APIs need to be secured by design. Fixing issues only after they have been exploited can be disastrously late.
  • Monitoring, alerting, and promptly reacting to vulnerability reports are good additional mitigation measures.
Pentesting: IDOR mind map
 

BOLA, also known as IDOR holds the number one spot among API vulnerabilities on the OWASP API Security Top 10 list. The vulnerability happens when APIs are allowed to access resources owned by one user when they have authenticated as another user that is not supposed to have access to the resources.

Mufaddal Masalawala has created a mind map that summarizes 19 methods that penetration testers can employ to find BOLA vulnerabilities:

IDOR Mindmap

For more details, see also:

 
 
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, Inc.   95 Third Street  2nd Floor  San Francisco  CA   94103   United States
You received this email because you are subscribed to API Security News from 42Crunch, Inc..

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

Older messages

Issue 139: API vulnerabilities at Apple, Amazon, and 1Sambayan, upcoming Gartner webinar

Thursday, June 24, 2021

Hi, this week we look at the details of 3 recently reported API vulnerabilities and an upcoming free webinar from Gartner APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices

Issue 138: Vulnerabilities in Microsoft Teams and Instagram

Thursday, June 17, 2021

Hi, this week in our newsletter we look at a couple of recent vulnerability reports, awesome-apisecurity repo, and upcoming DevSecCon24. APIsecurity.io The Latest API Security News, Vulnerabilities and

Issue 137: Vulnerabilities in VMware vCenter and Apache Pulsar, GraphQL and CSRF attacks

Thursday, June 10, 2021

Hi, today we look at a couple of recent API vulnerabilities, API Security in Postman, CSRF and GraphQL, my upcoming live Q&A, and a buyer's APIsecurity.io The Latest API Security News,

Issue 136: OAuth 2.0 security checklist and pentesting ✔️

Thursday, June 3, 2021

Hi, today we look at a recent API breach, a couple of pentesting case studies, and OAuth 2.0 security checklist and pentesting APIsecurity.io The Latest API Security News, Vulnerabilities and Best

Issue 135: Millions stolen from cryptoexchanges through APIs 💱

Thursday, May 27, 2021

Hi, today we look at the recent Rocket.Chat API vulnerability, cybercriminals exploiting cryptoexchange API keys, effect of Let's Encrypt root APIsecurity.io The Latest API Security News,

You Might Also Like

🔐 Why Microsoft Replacing Passwords Is a Good Thing — Linux Mint vs. Ubuntu

Thursday, December 26, 2024

Also: How I Used QR Codes and Google Sheets to Organize My Home How-To Geek Logo December 26, 2024 Did You Know A "moment" used to be an actual measure of time, corresponding to roughly 90

Ranked | The World's 10 Largest Companies by Revenue (2019-2024) 💰

Thursday, December 26, 2024

We show the world's largest companies by revenue, based on the Fortune Global 500 rankings as stock markets rally in 2024. View Online | Subscribe | Download Our App FEATURED STORY The World's

Issue 345 - OTA software updates are amazing

Thursday, December 26, 2024

View this email in your browser If you are just now finding out about Tesletter, you can subscribe here! If you already know Tesletter and want to support us, check out our Patreon page Issue 345 - OTA

Do Honeypots Still Matter?

Thursday, December 26, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 26, 2024? The

Best Practices for Composition Patterns in Jetpack Compose

Thursday, December 26, 2024

View in browser 🔖 Articles Best Practices for Composition Patterns in Jetpack Compose Jetpack Compose is a newly introduced declarative UI framework compared to other declarative UIs, and there hasn

wpmail.me issue#699

Thursday, December 26, 2024

wpMail.me wpmail.me issue#699 - The weekly WordPress newsletter. No spam, no nonsense. - December 26, 2024 Is this email not displaying correctly? View it in your browser. News & Articles 12 Best

Post from Syncfusion Blogs on 12/26/2024

Thursday, December 26, 2024

New blogs from Syncfusion Create a Flutter 3D Column Chart to Showcase the Top 6 Renewable Energy-Consuming Countries By Praveen Balu Let's visualize the top 6 renewable energy-consuming countries

Ruijie Networks' Cloud Platform Flaws Could Expose 50,000 Devices to Remote Attacks

Thursday, December 26, 2024

THN Daily Updates Newsletter cover Improve IT Efficiency with a Standardized OS: Nine considerations for building a standardized operating environment Optimize your IT with a standardized operating

Edge 460: Anthropic's New Protocol to Link AI Assistants to Data Sources

Thursday, December 26, 2024

Model Context Protocols is one of the recent AI contributions of the AI lab. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

December 26th 2024

Thursday, December 26, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 26th December 2024 Hi everyone, It's boxing day in some parts