API Security

Reversing A Rising Tide - API Data Losses

Tom McNamara

October 14, 2024

Hopr's AMTD Active cyber defense protects machine-machine Application Programming Interfaces (APIs)

Over the last three years, machine-to-machine (M2M) communication via APIs has experienced a sharp rise in both attack frequency and sophistication. As businesses increasingly rely on automated processes and interconnectivity across cloud and multi-cloud environments, Application Programming Interfaces (APIs) have become essential for machine identity and data exchange. However, this growing reliance on APIs has also made them a prime target for cyberattacks, with trends indicating that attacks are becoming larger, more frequent, and more complex.

Key Trends in API Threats:

  1. Increased Attack Frequency: The attack surface has expanded significantly as enterprises adopt hybrid and multi-cloud infrastructures that rely heavily on API-based services for automation, workload orchestration, and data exchange. The Cloud Security Alliance (CSA) reports that the number of API attacks has surged by over 300% in the last few years, largely due to the exponential growth in API use in cloud environments.
  1. Larger Attack Scale: High-profile breaches involving APIs have resulted in larger data exfiltration and service disruption. Attacks such as mass scraping of customer data through compromised APIs and large-scale API exploitation have become common. Attackers have increasingly targeted multi-cloud and multi-cluster environments, where API vulnerabilities in one environment can lead to cascading effects across interconnected platforms.
  1. More Sophisticated Attacks: Attackers are employing more sophisticated techniques, such as leveraging API misconfigurations, business logic flaws, and privilege escalation to compromise critical services. Moreover, sophisticated man-in-the-middle (MITM) attacks and session hijacking tactics have targeted APIs in cloud-native and containerized applications, allowing attackers to intercept and alter data in transit. The adoption of container orchestration platforms like Kubernetes has led to a rise in API-based exploitation, particularly in multi-cluster environments.

Exploitation of Vulnerabilities to Data in Transit in Multi-Cloud Environments

As more enterprises operate in multi-cloud environments, the complexity of securing data in transit has grown. APIs are crucial for connecting workloads across clouds, but they also introduce several vulnerabilities:

  • Insecure Communication Channels: Inadequate encryption standards, such as improper implementation of TLS or the absence of encryption between cloud services, can allow attackers to intercept sensitive data while it’s in transit between clusters or clouds. Multi-cloud setups often rely on APIs to connect different environments, and any weakness in one cloud’s API infrastructure could expose the entire system to interception attacks.
  • Misconfigured APIs: Configuration errors, especially in multi-cluster Kubernetes deployments, can expose inter-service communication APIs to external attacks. This allows attackers to eavesdrop on internal service communication or manipulate data as it traverses between cloud environments.
  • Zero-Day Vulnerabilities: Newly discovered API vulnerabilities have increasingly targeted data in transit, with sophisticated actors exploiting cloud misconfigurations and intercepting sensitive information across interconnected environments. Cloud-native applications are vulnerable due to the evolving attack vectors aimed at APIs, especially with the rise of automated API tools for integration and service management.

Role of Stolen or Compromised API Keys

One of the biggest contributors to API attacks in recent years has been the theft or compromise of API keys. The following trends highlight the role compromised API credentials have played:

  • Unauthorized Access: Stolen API keys are often used to gain unauthorized access to sensitive data or backend systems. This has been a frequent issue in public cloud services, where poor key management practices have left keys exposed in repositories or logs.
  • Privileged Access Escalation Attacks: Attackers have leveraged compromised API keys to escalate privileges within cloud environments. Once they gain access through a vulnerable API, attackers can move laterally within a system, extract sensitive data, or shut down services.
  • Automation and Scalability of Attacks: Automated tools that harvest API keys from public sources (e.g., GitHub repositories) have enabled attackers to exploit compromised credentials at scale. Once attackers possess API keys, they can launch widespread attacks across interconnected services and environments, especially in multi-cloud deployments.

Growth of API Security Solutions in the Last Three Years

In the past three years, the API security market has seen rapid growth, with dozens of new solutions emerging to address the escalating threats against APIs. By 2023, there were an estimated 50+ API security vendors offering specialized tools aimed at protecting APIs. This includes established players, as well as smaller startups and cloud-native security solutions. The market growth has been driven by increasing API adoption, the proliferation of cloud services, and the growing complexity of modern enterprise environments.

Why Haven’t the API Security Solutions Protected M2M APIs and Data?

Despite the proliferation of API security tools, many organizations still struggle to protect M2M APIs and their associated data. Several factors contribute to this challenge:

  1. Lack of Comprehensive Protection: Most API security solutions focus on traditional security concerns such as authentication, authorization, and rate limiting. While these are important, they don't always address more advanced attack vectors like business logic abuse, lateral movement, or privilege escalation. Attackers exploit gaps in application logic and API flows that these tools fail to detect.
  1. Invisibility of Machine APIs: Machine-to-machine (M2M) communication often happens within highly automated, interconnected systems, such as in microservices architectures or multi-cloud environments. These environments involve thousands of APIs, many of which may be undocumented or improperly managed, leaving them vulnerable to shadow APIs (APIs unknown to security teams). API security solutions struggle to monitor all these APIs effectively, particularly when they are part of complex hybrid cloud or multi-cluster environments.
  1. Slow Detection and Response: While some API security solutions can detect vulnerabilities in APIs, they often fail to do so in real-time. Modern attackers exploit API vulnerabilities quickly, especially when leveraging stolen credentials like API keys. Many existing tools are post-incident detection systems, identifying breaches after the fact rather than preventing them in real time.
  1. Complexity of API Ecosystems: APIs are increasingly being used in multi-cloud and containerized environments. Each API could interact with other APIs, data stores, and services across different cloud providers, introducing layers of complexity. API security solutions have had difficulty adapting to this complexity, leading to gaps in protection. Attackers exploit these gaps, particularly when targeting data in transit between different cloud environments.

Ineffectiveness of Certain API Security Solutions

Among the leading vendors, several API security solutions have shown limitations in effectively mitigating the trends of larger, more frequent, and sophisticated attacks:

  • AI-based anomaly detection has struggled to prevent attacks that exploit business logic vulnerabilities and shadow APIs. The detection relies heavily on patterns and signatures, which are sometimes ineffective against advanced, zero-day threats or complex M2M interactions.
  • API protection against DDoS, bot attacks, and other common threats, have been criticized for being less effective in preventing man-in-the-middle (MITM) attacks or session hijacking that target API communications, especially in multi-cloud environments.
  • Some API security solutions excel at mitigating common web-based attacks but often miss the mark when it comes to securing data in transit across cloud services. In particular, they struggled with the increased API exposure in distributed multi-cloud architectures, leaving room for exploitation.
  • API Security solutions that employ behavioral analysis are sometimes reactive and slower to adapt to dynamic multi-cloud environments or rapidly shifting API attack surfaces. Attackers who manipulate API communication flows or exploit credential theft can recognize, adapt, and bypass behavioral protections and avoid detection.

Declining Effectiveness of API Gateways, Secrets Managers, and Other Tools

There are other traditional API Security tools, too, like API gateways and identity and secrets managers that are losing their effectiveness in protecting machine APIs and data, especially in highly dynamic and distributed environments. Here’s why:

  1. API Gateways: API gateways were initially designed to provide basic API management, including traffic monitoring, authentication, and rate limiting. However, they are now seen as less effective against advanced attacks targeting API logic or misconfigurations. Gateways do not always offer deep inspection or real-time protection against business logic abuses and advanced exploitation of vulnerabilities in M2M communication. Moreover, as organizations move to multi-cloud and multi-cluster environments, API gateways often lack the visibility and flexibility to protect all APIs, especially internal APIs or APIs used within containerized environments. This limited scope makes them vulnerable to shadow APIs and unprotected data in transit.
  1. Identity and Secrets Managers: While identity and secrets managers, like those found in hyperscale clouds (e.g., AWS IAM and Secrets Manager) or offered by third party vendors (e.g. Venafi and HashiCorp Vault), can manage API keys and identity certificates (crypto material), they don’t protect against the theft or misuse of these keys once accessed and key access often involves an API and another key! Attackers who obtain API keys—through phishing, misconfigurations, or exposed secrets—can still use them to access sensitive data or escalate privileges. As a result, simply storing keys securely does not address the issue of API key leakage and misuse.
  1. Traditional Monitoring and WAFs: Web Application Firewalls (WAFs) and other monitoring tools were not designed with API-specific security in mind. These tools often fail to recognize the complex interdependencies between APIs in a microservices or containerized environment. As attacks become more sophisticated, WAFs have proven ineffective at blocking API-based credential stuffing, bot-driven abuse, and attacks on business logic.

Can the Trend in M2M API Attacks Change?

Yes! Innovations could disrupt the current trend in M2M API attacks by introducing a more dynamic and resilient security model. Unlike traditional API security solutions that rely heavily on fixed credentials, static defenses, and centralized control, One such innovation is automated moving target defense (AMTD), it is a novel solution in API Threat Protection and Access Control.

Here’s how several cloud native innovations could change the trend:

  1. Frequent Identity and Credential Hopping: The ability to frequently hop the identity and secret credentials used by machine workloads makes it extremely difficult for attackers to exploit stolen API keys, as they become invalid or change too rapidly for typical attack strategies, such as key theft, credential stuffing, and credential spraying to be successful.
  1. Distributed, Decentralized Security Model: Distributing and decentralizing identity and secrets services, reduces the vulnerabilities of centralized security models that pass credentials and are easier to attack. This also offers an advantage over traditional solutions by reducing the risk of exploitation through API misconfigurations or business logic vulnerabilities — a major attack vector in multi-cloud environments.
  1. Real-Time Attack Prevention: While many API security tools are reactive — identifying and addressing threats post-incident — an AMTD approach operates in real-time protection by continuously shifting the attack surface, preventing attackers from exploiting vulnerabilities in a predictable manner.

Stronger API Threat Protection and Access Control

The innovations present a stronger solution in some key areas where other API security solutions are falling short:

  • Protection Against Stolen Credentials: Traditional API security solutions often fail to prevent attacks that involve compromised API keys, as they rely on static keys for authorization. Dynamically rotating credentials in real-time and at a high frequency offers stronger protection, rendering stolen keys useless to attackers.
  • Zero-Day Exploits and Shadow APIs: An automated moving target defense capabilities reduce the effectiveness of zero-day exploits and shadow API attacks by constantly changing access credentials, making it harder for attackers to identify and exploit vulnerabilities.
  • Multi-Cloud and Multi-Cluster Adaptability: Multi-cloud environments, need a solution specifically tailored for their unique challenges. This is where traditional API security tools struggle to keep up with the complexity of interconnected services and data in transit. A novel decentralized identity and secrets model allows API threat protection across clusters and clouds more effectively.

Conclusion

The last three years have shown a clear trend toward larger, more frequent, and more sophisticated M2M API-based attacks, particularly in cloud and multi-cloud environments. Compromised API keys have played a critical role in these attacks, enabling attackers to target data in transit and escalate privileges across complex infrastructures. As APIs continue to underpin enterprise cloud architecture, securing M2M communication, enhancing API authentication mechanisms, and implementing robust monitoring for API traffic will be essential in mitigating future attacks.

Despite the increasing number of API security solutions, protecting machine-to-machine APIs and data remains a significant challenge, especially as threats grow larger, more frequent, and more sophisticated. Current API security tools, including gateways and secrets managers, are struggling to keep pace with evolving attack vectors, particularly in the areas of multi-cloud environments, data in transit, and shadow API management. While API Security vendors have attempted to defend against the threat, their tools are often reactive rather than preventative, leaving significant gaps in protection. To effectively secure APIs in the future, API security tools will need to become more adaptive, real-time, and context-aware to protect against the dynamic and rapidly evolving threat landscape.

Hopr.co offers a compelling alternative to conventional API security solutions with its dynamic, decentralized approach to API threat protection. Its real-time, credential-hopping mechanisms are designed to thwart many of the attack vectors that traditional tools fail to prevent, especially in complex, multi-cloud environments. For enterprises facing challenges with static security models or reactive API threat detection, Hopr.co represents a stronger, forward-looking solution.