Issue 127: Hidden OAuth attack vectors, Methodology for BOLA/IDOR 🗝️

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #127
Hidden OAuth attack vectors, Methodology for finding BOLA/IDOR
This week, we look at an API vulnerability in Micro Focus Operation Bridge Reporter, new research on 3 hidden attack vectors in OAuth and OpenID Connect, a methodology for finding BOLA/IDOR, and research on OpenAPI adoption in the banking sector.
Vulnerability: Micro Focus Operation Bridge Reporter
 

Even authentication APIs may lead to direct remote code execution attacks (RCE).

Unit42 research team found an API flaw among the vulnerabilities actively exploited by a variant of the Mirai malware in the Internet of Things (IoT) devices. The vulnerability in question is  CVE-2021-22502 in Micro Focus Operation Bridge Reporter (OBR).

Quoting the report:

“The exploit works due to the unsanitized use of the “username” and “password” parameters in requests made to the LogonResource API. The vulnerability can be exploited to allow unauthenticated RCE as root on the OBR server.”

Micro Focus OBR unsanitized API

This is a reminder that any API inputs need to be strictly defined and enforced. For strings, that would mean using strict regular expressions and rejecting any calls that send parameters with unexpected characters.

Attack Vectors: OAuth and OpenID Connect
 

OAuth and OpenID Connect (OIDC) remain key protocols for delegated access and authentication of many modern REST APIs.

Michael Stepankin posted a report on three hidden attack vectors on OAuth/OIDC – each with an example that he found in a real-life implementation.

1. Dynamic Client Registration – SSRF by design

This potential vulnerability stems from the protocol’s ability to register new clients. While some OAuth/OIDC implementations have client information in the local OAuth server configuration, others expose an endpoint to add new clients (for example, /register.)

Some of the OAuth client parameters are URLs. Attackers can try to set these to point to their malicious resources. Parameters used by the OAuth server itself can open it up to a Server-side request forgery (SSRF): logo_uri, sector_identifier_uri, jwks_uri, request_uris. A successful attack would supply a link to malicious content in one of these parameters with the hope of the server retrieving and executing this malicious content.

Even if the server does not execute the content directly, it might still send the content to the client: for example, include the content from logo_uri on the web pages. If no proper validation is done – this may lead to Cross-Site Scripting (XSS) attacks.

2. “redirect_uri” Session Poisoning

When an OAuth authorization request comes in, the server needs to validate the request parameters, authenticate the user, ask for the user’s consent, and redirect back to the external party.

These steps are often implemented in separate controllers passing the parameters in the session. Attackers can exploit the behavior by crafting a page that would post authorization requests for a “trusted” and then immediately for an “untrustworthy” client. That second request would replace the redirect_url value in the session and thus cause the token to get leaked to the URL supplied by the attacker.

3. “/.well-known/webfinger” makes all user names well-known

This is the OpenID endpoint that can be used to obtain information about a user or a resource.

The request has a resource parameter which itself is a URL containing the name of the user:

/.well-known/webfinger?resource=http://user&rel=http://x/user&rel=http://openid.net/specs/connect/1.0/issuer

This potentially exposes the OAuth server to SQL or LDAP injections when the server parses the request and performs the lookup.

Pentesting: Finding IDORs
 

Broken Object-Level Authorization (BOLA, also known as Insecure Direct Object Reference or IDOR) is one of the most dangerous and frequently found API vulnerabilities. It happens when API calls include an identifier of a resource and the API grants access to that resource without checking caller permissions.

Max Corbridge published a great article on the methodology for finding BOLA/IDOR vulnerabilities:

  • Determine whether the resource being referenced is public (not a big deal) or private (should not be accessible).
  • Find patterns in API route naming to discover new endpoints.
  • Try adding IDs even to requests that don’t have them.
  • Try replacing parameter names.
  • Supply multiple values for the same parameter.
  • Try different operations (HTTP verbs) on the same path.
  • Try changing the request’s content type.
  • Try using numeric instead of non-numeric IDs.
  • Sites allowing to save credit cards or adding users (e.g., to chats) often have IDOR.
  • Try changing the requested file types.
  • APIs often implement a CRUD (create/read/update/delete) approach to resources, so try them all.
  • Try using arrays instead of regular values.
  • Try wildcards instead of values (e.g. *).
  • See if error messages leak data.

And so on. Max provides useful explanations and examples for each of the tips – so definitely worth checking out.

Standards: OpenAPI adoption in banking
 

Standards are making APIs safer. They enable a consistent approach to API security across different tools and stages of the API lifecycle: from design to development, testing, runtime protection, and monitoring.

Phuong Pham and Mark Boyd looked at the banking sector and found rapid adoption of the OpenAPI Specification standard in the industry:

  • Globally, 75% of all open banking platforms design their APIs by using an OpenAPI Specification
  • In Q4 2020, the use of OAS grew by 68% over adoption levels in Q3 2020.

They also found that the adoption differs across regions. Parts of the globe where Open Banking regulations have a long history (such as the UK and Europe) demonstrate wider adoption of the standard:

Global-Open-Banking-Use-of-OpenAPI-Specification--end-2020--N-559-

 

 
 
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 126: F5 iControl REST API under attack, Regexploit, Ford’s API security talk recording 🚗

Thursday, March 25, 2021

Hi, today we look at a couple of recent API vulnerabilities, a new regex analysis tool APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #126 F5 iControl REST API

Issue 125: iPhone call recorder API flaw, Burp and OpenAPI, GraphQL pentesting, FAPI 💱

Thursday, March 18, 2021

Hi, today we look at the just released FAPI 1.0, GraphQL pentesting, OpenAPI in Burp, APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #125 iPhone call recorder

Issue 124: API vulnerabilities at Microsoft and Truecaller Guardians, Pentester labs, API security at Ford Motors 🚗

Saturday, March 13, 2021

Hi, this week we look at the recent brute-force attack on Microsoft's password reset, APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #124 API vulnerabilities

Issue 123: API vulnerabilities VMWare vCenter and Facebook, mismatch between JSON parsers, API security fixes in VS Code

Thursday, March 4, 2021

Hi, this week we look at how URL caching and JSON parsing can bite you, and check out APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #123 API vulnerabilities

Issue 122: API issues at Clubhouse 👋 and healthcare apps, scope-based recon, OAS v3.1.0

Thursday, February 25, 2021

Hi, this week we look at API vulnerabilities in Clubhouse and mHealth apps, recon & OAS APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #122 API issues at

You Might Also Like

Post from Syncfusion Blogs on 05/07/2024

Tuesday, May 7, 2024

New blogs from Syncfusion Empower Your Data Insights: Integrating JavaScript Gantt Chart into Power BI By Alan Sangeeth This blog explains the steps to integrate the Syncfusion JavaScript Gantt Chart

Edge 393: Understanding Planning Techniques in Autonomous Agents

Tuesday, May 7, 2024

A taxonomy of planning in autonomous agents, the ADaPT planning method and the XLANG framework. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Not Your Grandpa’s Hearing Device

Tuesday, May 7, 2024

Dr. Marco Vietor and Paul Crusius have been creating successful businesses since college. Now they lead hear.com, the fastest growing hearing aid company in the world. This is their story. Let's be

Everything Apple will announce today

Tuesday, May 7, 2024

My $100 Temu tech haul; How to test AI on coding; Best NAS devices -- ZDNET ZDNET Tech Today - US May 7, 2024 placeholder Everything Apple will announce at its iPad event on May 7: iPad Pro, Air,

Learn How To Backlink Like a Pro, newsletterest1!

Tuesday, May 7, 2024

4 Tips To Elevate Your Backlink Strategy From HackerNoon Editors ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ 

iPhone Slim 📱, more Tesla layoffs 🚗, measuring engineering productivity 👨‍💻

Tuesday, May 7, 2024

Apple is reportedly planning an 'iPhone 17 Slim' model to replace the Plus model in its lineup. The Slim model will have around a 6.6-inch display Sign Up |Advertise|View Online TLDR Together

You’re invited: Start your generative AI journey

Tuesday, May 7, 2024

Build a search solution that goes beyond text and recognizes the meaning behind queriesㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect Getting

Happening TUESDAY! Follow Our Coverage of Apple’s Spring Announcement

Monday, May 6, 2024

iPhone Life magazine Follow Our Coverage of Apple's Latest Announcement. twitter facebook YouTube Podcast Tune in for Apple's 'Let Loose' Event Tomorrow! Surprise! Just a month before

Who wants a new iPad?

Monday, May 6, 2024

Plus: OpenAI and Stack Overflow partner and LockBit's website returns View this email online in your browser By Christine Hall Monday, May 6, 2024 Good afternoon, and welcome back to TechCrunch PM.

🔋 Why You Need More Than One Power Bank — Things We Want to See in Windows 12

Monday, May 6, 2024

Also: 7 Samsung Messages Features You Should Be Using, and More! How-To Geek Logo May 6, 2024 Did You Know You can find all manner of canned vegetables, but not broccoli: the temperatures required for