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

I tested Lenovo's dual-screen laptop - and man is it fun

Thursday, April 18, 2024

T-Mobile throttling internet; I ditched my AirPods Pro for Nothing; Selfie GIFs -- ZDNET ZDNET Tech Today - US April 18, 2024 placeholder I tested Lenovo's dual-screen laptop and it improved my

Issue 313 - Farewell Drew, thank you for the hard work!

Thursday, April 18, 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 313 -

⚙️ Drake deepfake (again!)

Thursday, April 18, 2024

Plus: LinkedIn finally enter AI ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Web Tools #561 - Popover Modals, React Tools, Git/CLI, Uncats

Thursday, April 18, 2024

WEB VERSION Issue #561 • April 18, 2024 Advertisement $47 Million in Artwork Sales Equals Profits for These Everyday Investors — Masterworks is taking on the billionaires at their own game, buying up

Google fires 28 staff for protesting its contracts with Israel

Thursday, April 18, 2024

Google's contract with Israel has left many employees unhappy View this email online in your browser By Alex Wilhelm Thursday, April 18, 2024 Welcome to TechCrunch AM! It's been a busy morning,

PHPWeekly April 18th 2024

Thursday, April 18, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 18th April 2024 Hi everyone, If it's the latest news and

The First Beta of Android 15

Thursday, April 18, 2024

View in browser 🔖 Articles The First Beta of Android 15 This new version of Android focuses on enhancing productivity, providing a premium app experience, ensuring user privacy and security, and

Free Couple Template | PDF Importing | Database Enhancements

Thursday, April 18, 2024

Your weekly Notion digest with the finest tip, latest news, and improvements and template! 🔥 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

wpmail.me issue#663

Thursday, April 18, 2024

wpMail.me wpmail.me issue#663 - The weekly WordPress newsletter. No spam, no nonsense. - April 18, 2024 Is this email not displaying correctly? View it in your browser. News & Articles How

Beware: New Android Trojan 'SoumniBot' Evades Detection with Clever Tricks

Thursday, April 18, 2024

THN Daily Updates Newsletter cover Webinar -- Supply Chain Under Siege: Unveiling Hidden Threats Stop playing defense--start hunting threats. Protect your software supply chain with proactive