Application Programming Interfaces (APIs) are foundational to modern software development, with web APIs being the most prevalent form. They enable seamless communication and data exchange across diverse systems over the internet, serving as crucial bridges that facilitate integration and collaboration among different software applications.
API Building Styles
Web APIs can be built using various architectural styles, including REST, SOAP, GraphQL, and gRPC, each with its own strengths and use cases:
- Representational State Transfer (
REST) is the most popular API style. It uses aclient-servermodel where clients make requests to resources on a server using standard HTTP methods (GET,POST,PUT,DELETE).RESTfulAPIs are stateless, meaning each request contains all necessary information for the server to process it, and responses are typically serialized as JSON or XML.
- Simple Object Access Protocol (
SOAP) uses XML for message exchange between systems.SOAPAPIs are highly standardized and offer comprehensive features for security, transactions, and error handling, but they are generally more complex to implement and use thanRESTfulAPIs.
- GraphQL
is an alternative style that provides a more flexible and efficient way
to fetch and update data. Instead of returning a fixed set of fields
for each resource,
GraphQLallows clients to specify exactly what data they need, reducing over-fetching and under-fetching of data.GraphQLAPIs use a single endpoint and a strongly-typed query language to retrieve data.
- gRPC is a newer style that uses Protocol Buffers for message serialization, providing a high-performance, efficient way to communicate between systems.
gRPCAPIs can be developed in a variety of programming languages and are particularly useful for microservices and distributed systems.
Exposure of Sensitive Data, Authentication and Authorization Issues, Insufficient Rate Limiting, Improper Error Handling, and various other security misconfigurations.OWASP has curated the OWASP API Security Top 10, a comprehensive list of the most critical security risks specifically related to APIs:| Risk | Description |
|---|---|
| API1:2023 - Broken Object Level Authorization | The API allows authenticated users to access data they are not authorized to view. |
| API2:2023 - Broken Authentication | The authentication mechanisms of the API can be bypassed or circumvented, allowing unauthorized access. |
| API3:2023 - Broken Object Property Level Authorization | The API reveals sensitive data to authorized users that they should not access or permits them to manipulate sensitive properties. |
| API4:2023 - Unrestricted Resource Consumption | The API does not limit the amount of resources users can consume. |
| API5:2023 - Broken Function Level Authorization | The API allows unauthorized users to perform authorized operations. |
| API6:2023 - Unrestricted Access to Sensitive Business Flows | The API exposes sensitive business flows, leading to potential financial losses and other damages. |
| API7:2023 - Server Side Request Forgery | The API does not validate requests adequately, allowing attackers to send malicious requests and interact with internal resources. |
| API8:2023 - Security Misconfiguration | The API suffers from security misconfigurations, including vulnerabilities that lead to Injection Attacks. |
| API9:2023 - Improper Inventory Management | The API does not properly and securely manage version inventory. |
| API10:2023 - Unsafe Consumption of APIs | The API consumes another API unsafely, leading to potential security risks. |
This module will focus on exploiting all these security risks and understanding how to prevent them.As we progress through the module, we will practice identifying and
exploiting each of the OWASP API Top 10 Security Risks using a RESTful web API to fully understand these vulnerabilities.
.jpeg)
0 Comments
Thanks For your comment