Last updated at Fri, 22 Dec 2023 15:27:45 GMT

API usage is skyrocketing. According to the latest 状态 of the API Report, API的请求量去年增加了56%,达到8.55亿 谷歌 says the growth isn’t expected to slow any time soon.

api 是应用程序编程接口的简称,是如何构建应用程序的关键组件. They control the type of requests that occur between programs, 如何提出请求, 和 the format of those requests.

使用量的巨大增长源于api(以及更广泛的web应用程序)在数字化转型中发挥的重要作用. api有助于促进从单片应用程序到微服务的过渡. 它们使企业能够为B2B用例提供面向用户的基于api的服务, including automation 和 integration. And they’re integral to modern web applications, which are no longer just HTML with links but rich user interfaces, built as single-page apps with REST API backends. Nearly every modern application utilizes – or is – 一个API.

今天,如果不与API交互,几乎不可能在网上做任何事情. That’s why cyberattacks are increasingly targeting api, 和 they’ve become a large part of the application 攻击表面.

Why securing api is important

api是一个有利可图的目标,它可以让黑客进入原本安全的系统并利用漏洞. api不仅经常遭受与web应用程序相同的漏洞——比如访问控制被破坏, 注射, security mis配置s, 以及从其他依赖代码库继承的漏洞——但由于用户的自动化特性,它们也更容易受到资源消耗和速率限制问题的影响.

Due to a lack of knowledge in the market, 来自早期api的遗留问题也很常见. 例如, not all api will be fronted by 一个API gateway, 由于缺乏对它们的认识,旧的api在后台几乎没有保护. Many unused api will also not have been decommissioned, as newer api are produced 和 replace them as a product evolves, due to a lack of st和ard process 和 bad practice. This can leave legacy api vulnerable to attacks.

如何保护API

保护api的第一步是审计您的环境和/或应用程序,以了解您拥有哪些api以及实际使用哪些api. 然后, 您必须了解每个API的目的,以便验证它是否按预期工作. 您还必须了解API的预期行为,以便能够捕获异常活动,从而更容易地识别威胁. 一旦您对API的功能和预期行为有了明确的了解, 然后,您就可以更有效地管理和测试您的API.

API management is a key element for API security. API不仅需要与web应用程序相同的控件,而且还需要针对API独特功能的额外控件. Documentation 和 version control of api is of vital importance, as one product can have multiple api – even hundreds or thous和s.

Poor management can lead to issues with legacy 和 defunct api, 因为您经常会发现只有一小部分API通过API网关. 与此同时, older api – which haven’t been decommissioned, 或者是那些球队根本没有意识到的——可以在没有保护的情况下坐在后台. 旧api存在已知漏洞的可能性也要高得多, which amplifies the risk profile.

The same legacy issues can also lead to coverage gaps, 在API网关之外的调用可能会在API内部调用时留下盲点. 发布和明确定义API将简化用户对API的理解, allowing them to connect in the most appropriate 和 effective way. 确保API得到适当监控是一项关键的管理技术. 持续进行性能检查将使您能够了解API是否因过载而承受压力. It can also provide an indication of traffic volumes to monitor usage, potentially gauge malicious activity (via audit logs), 和 judge whether you need to scale up your operation. 最后, 针对攻击制定响应计划是API安全的重要控制措施, allowing for a rapid but controlled response to potential threats.

最近出现了许多基于api的攻击,例如 Wordpress – 和 even on the dating scene with 熊的 recent vulnerability issues. 您可以采取一些简单但有效的步骤来保护API并降低此类暴露的风险,包括:

  • 身份验证: Do you have a control in place to underst和 who's calling your API?
  • 授权: Should the person calling be able to access this data?
  • 加密: Have you encrypted 你的网络 traffic?
  • 流量管理: 您是否设置了速率限制或阈值,以防止客户提取过多的数据或运行脚本来捆绑API?
  • 审计日志: 有效的日志记录确保您可以了解正常流量的样子,并允许您识别异常活动.

如何测试你的API

API测试仍在不断发展,以跟上数量和复杂性的增长. 手动API安全测试可以用传统的测试工具来完成, 大多数主要的DAST解决方案都部分支持全自动API安全测试, 有许多开源工具是为引导性API安全测试而编写的. API测试与适当的API管理结合使用将提高API安全性.

当你拥有完整的业务风险概况时,API测试是最有效的.e. 您完全了解所有api(包括遗留的或已失效的api),以确保没有可能暴露或操纵的盲点. Taking time to identify vulnerabilities in API frameworks, 你的网络, 配置, 和 policy all enhance your API security.

通过理解预期的行为和适当的测试来预测威胁,将允许主动覆盖、增强保护和威胁识别.

最后, 您必须不断地测试端点,以确保始终保持保护,并提供最佳安全性. 在安全风险发生之前识别和阻止安全风险的能力对于提供针对API威胁的最佳保护至关重要.

更多阅读:

不要错过任何一个博客

Get the latest stories, expertise, 和 news about security today.