OWASP Top 10 API Security - DZone Security

OWASP Top 10 API Security - DZone Security

Take a look at the top 10 OWASP security risks, learn what each of them means, and how you can mitigate them.

I am sure that almost all of you would be aware about OWASP. But, just for the context let me just brief about the same.

OWASP is an international non-profit organization that is dedicated to web application security. It is a completely opensource and community driven effort to share articles, methodologies, documentation, tools, and technologies in the field of web application security.

When we talk about API, we are almost every time talking about REST and OWASP has a dedicated project to API security. As this series of articles are focused towards the API security, we shall not be going in details of web application security. You can use the provided links to find more about these. Let us spend some time on the background, before we dive deep in to API security project.

Background

OWASP's most widely acknowledged project is OWASP top 10. This is the list of security risks compiled by the security experts from across the world. This report is continuously updated, outlining the concerns of web application security, and specially focuses on the Top 10 of the most critical risks. According to OWASP, this report is an "The OWASP Top 10 is a standard awareness document for developers and web application security. It represents a broad consensus about the most critical security risks to web applications." They recommend that all companies incorporate the report into their processes in order to minimize and/or mitigate security risks. The latest version was published in 2017 and below is the list.

  1. Injection 
  2. Broken Authentication 
  3. Sensitive Data Exposure
  4. XML Eternal Entities (or XXE)
  5. Broken Access Control
  6. Security Misconfiguration
  7. Cross-Site Scripting (or XSS)
  8. Insecure Deserialization 
  9. Using Components With known vulenerabilities
  10. Insufficient Logging And Monitoring

How API Security Is Different from Web Application Security 

Although API's have many similarities with web applications, but both are fundamentally different in nature.

In web applications, all the processing is done on the servers and the resulting web page is sent back to web-browser for rendering. Because of this nature, they have limited entry point and attack surface which are resulting web pages. This can easily be protected by putting up and web-application firewall (WAF) in front of the application server.WAF

In most of the modern application UI itself uses API's to send and receive data from backend servers and provide the functionality of the application. It is the responsibility of the clients to do the rendering and convert the responses to a web page.

API GET and raw data

Also, with the rise of microservices architecture individual components become APIs, and it becomes a different world altogether, where UI clients could interact with hundreds of services via API calls. This significantly increases the attack surface. Now all those API's become the entry point and attack surface.

These entry points can't be guarded using the WAF solutions as they cannot differentiate between the legitimate and malicious API calls. 

Why A Separate Project on API security?

Since its first release in 2003 OWASP top 10 projects has been the most useful resource in terms of web application security risks and to suggest the ways to mitigate these issues.

These days almost all the application development like banking, retail, transportation, smart devices, are done with the APIs.

APIs are critical to modern mobile and SaaS application. By nature, the API's expose business logic and data, often these data are sensitive in nature, for example Personally Identifiable Information (PII). Because of this API's are increasingly being targeted by attackers. 

As API's are changing how we design and develop our application, this is also changing the way we think about our security. A new approach in needed in terms of security risks. To cater to this need, OWASP decided to come up with another version of Top 10 dedicated to API security which is named "OWASP API Security Project". The first report was released on 26 December 2019.

Below is the OWASP Top 10 API security risks and their brief description as provided by the official report.

 API1:2019 Broken Object Level Authorization

APIs tend to expose endpoints that handle object identifiers, creating a wide attack surface Level Access Control issue. Object level authorization checks should be considered in every function that accesses a data source using an input from the user. 

API2:2019 Broken User Authentication

Authentication mechanisms are often implemented incorrectly, allowing attackers to compromise authentication tokens or to exploit implementation flaws to assume other user’s identities temporarily or permanently. Compromising system’s ability to identify the client/user, compromises API security overall.

security api security owasp top 10 api penetration testing api security risks owasp top 10 web security risk

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

OWASP TOP 10 API Security Part 2 (Broken Object Level Authorization)

In this article we will explore the first of the OWASP Top 10 API security risks for year 2019. (API1:2019 - Broken object level authorization).

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

Top Security Penetration Testing Companies

Cybercrime is one of the world’s fastest-growing threats, with malicious actors constantly elaborating their methods of undetectable intrusion. According to Verizon’s Business 2020 Data Breach Investigations report, there has been a 100% increase in web app breaches, and stolen credentials were used in more than 80% of these cases. These statistics are worrying for many businesses that actively move their processes to the cloud and deal heavily with customers’ personal data.

How to Do API Testing?

API endpoint when you send the get request to that URL it returns the JSON response. In this article, I am going to use postman assertions for all the examples since it is the most popular tool. But this article is not intended only for the postman tool.

API Security Weekly: Issue #101

After the special 100th edition last week, which was all about API security advice from the industry’s thought leaders, this week we are back to our regular API security news, and we have twice the number of them, from the past two weeks.