Blog

保护 API:不可能完成的任务?

June 6, 2022
Pieter Danhieux

毫无疑问,网络攻击呈上升趋势。根据Verizon 2021年数据泄露调查报告,威胁格局是 今天更危险 比以往任何时候。各种规模的组织都面临着针对他们的威胁行为者的攻击数量和更高的复杂程度。而且攻击者的成功率也在飞速上升。

分析最新的攻击有助于揭示黑客在这场前所未有的网络防御闪电战中使用的一些最常见的漏洞和技术。一些最受欢迎的攻击,例如那些构成开放网络应用程序安全项目 (OWASP) 的攻击 2021 年十大安全风险和漏洞,涉及窃取或以其他方式泄露凭证。而且 根据安全研究 由 Akamai 进行的,绝大多数(近 75%)直接针对 API 持有的证书。

API 的兴起和可能的毁灭

难怪应用程序编程接口(主要称为API)在几乎每个组织的网络中都呈上升趋势。它们是大多数基于云的服务的关键组成部分,这些服务正在迅速接管大多数公司、组织和政府机构的本地资产的功能。如今,没有云,你几乎无法经营任何类型的业务或任务,尤其是面向公众的业务或任务。这意味着,API肯定会成为将每个网络中许多服务结合在一起的粘合剂。

API 的神奇之处在于,就网络资源分配而言,它们大多很小且不显眼。而且它们非常灵活,因此他们可以承担几乎所有工作的任务。API的核心是为控制或管理特定程序而量身定制的独立软件。它们可以用来执行非常具体的功能,例如访问来自主机操作系统、应用程序或服务的数据。

不幸的是,正是这种同样的灵活性,以及它们通常规模小且被安全团队忽视的事实,使得 API 成为有吸引力的目标。大多数 API 都是由开发人员设计的,具有完全的灵活性,例如,即使他们管理的核心程序被修改或更改,它们也可以继续运行。而且标准很少。就像雪花一样,许多 API 的独特之处在于,它们是为在特定网络上通过单个程序提供特定功能而创建的。如果它们是由不太了解安全性或不太专注于安全性的开发人员编写的,那么他们可以而且很可能会有任意数量的 脆弱性 攻击者可以找到并加以利用。

可悲的是,问题很快就失控了。根据Gartner的数据,到2022年, 涉及 API 的漏洞 将成为所有网络安全类别中最常见的攻击载体。

攻击者想要破坏 API 的关键原因不是为了接管 API 执行的任何特定功能,而是为了窃取与之相关的凭据。除了漏洞成熟之外,API 的最大问题之一是它们通常 权限过高 关于它们的核心功能。为简单起见,大多数 API 在网络上具有接近管理员级别的访问权限。如果攻击者获得了对网络的控制权,他们通常可以利用其权限对网络发起更深入、更大规模的入侵。而且,由于API有权执行攻击者重定向的任何任务,因此他们的操作通常可以绕过传统的网络安全监控,因为API没有违反任何规则,这要归功于其访问所有区域的VIP后台通行证。

如果组织不小心,则其网络和云中API的兴起如果成为攻击者的目标,也会带来很大的麻烦。

为 API 辩护

尽管 API 的情况变得越来越危险,但它远非没有希望。动作需要付出很大的努力 像 DevSecOps 一样 帮助开发人员提高安全意识,并将安全性和最佳实践引入软件创建的各个方面(从开发到测试和部署)。对于任何想要在2022年及以后逆转API开发趋势的组织来说,将API安全作为培训的一部分都至关重要。

话虽如此,就API安全性而言,目前可以实施一些非常好的最佳实践。

第一件事是对所有 API 进行严格的身份控制。在分配权限时,你几乎应该将他们视为人类用户。仅仅因为 API 仅用于执行特定功能而设计,您就必须考虑如果攻击者能够对其进行入侵会发生什么。考虑使用基于角色的访问控制。理想情况下,您最终应该将零信任原则应用于您的API和用户,但这通常是一条漫长的道路。良好的身份管理是一个不错的起点。只要确保将 API 作为该程序的一部分即可。

您还应尽可能严格控制 API 发出的各种调用。如果你将这些调用限制在非常以上下文为中心的请求上,那么攻击者将很难出于恶意目的对其进行修改。您甚至可以对自己的 API 进行分层,初始 API 对另一个 API 进行高度上下文化的调用,该调用确切地知道要查找什么和要忽略什么。这可能是限制威胁行为者可用功能的有效方法,即使他们能够利用和破坏该链中的API。

针对 API 的威胁肯定显得势不可挡。但是,通过实施最佳实践,为成为安全卫士的开发人员提供帮助和奖励,情况似乎就不那么希望了。通过良好的训练和练习,你可以建立一个强大的安全程序,即使攻击者以某种方式入侵了你的一个微小但必不可少的 API 主力,也几乎没有回旋余地。

标语

Govern AI-driven development before it ships

Measure AI-assisted risk, enforce secure coding policy at commit, and accelerate secure delivery across your SDLC.

book a demo
标语

Explore more blogs

Lorem Issum diam quis eim leboutis ein selerisque lobortis sepitis beelrisque lobortis sepitis celerisque lobortis celeriskue filmentis celeriskue filmentis celeriskue diam

browse all
Case Study
Filter Label
This is some text inside of a div block.

Supercharged Security Awareness: How Tournaments are Inspiring Developers at Erste Group

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Learn More
Case Study
Filter Label
This is some text inside of a div block.

Security as culture: How Blue Prism cultivates world-class secure developers

Learn how Blue Prism, the global leader in intelligent automation for the enterprise, used Secure Code Warrior's agile learning platform to create a security-first culture with their developers, achieve their business goals, and ship secure code at speed

Learn More
Case Study
Filter Label
This is some text inside of a div block.

One Culture of Security: How Sage built their security champions program with agile secure code learning

Discover how Sage enhanced security with a flexible, relationship-focused approach, creating 200+ security champions and achieving measurable risk reduction.

Learn More
Blog
Filter Label
This is some text inside of a div block.

The Future of AI Software Governance Is Built on Strong Partnerships

Discover why Secure Code Warrior is becoming a channel-first company and how trusted partners help organizations adopt AI Software Governance securely and at scale.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Citizen AI by Secure Code Warrior: Build an AI-Ready Workforce

Secure Code Warrior's AI literacy program for non-developer employees.

Learn More
Blog
Filter Label
This is some text inside of a div block.

Why most CISOs are navigating AI adoption blindfolded (and how they can remove it)

Today, Secure Code Warrior issued an all-new white paper covering a prescriptive, directional AI adoption model that security leaders can use to identify their adoption stage and make real progress in bringing the AI security risks within their organization under control.

Learn More

Secure AI-driven development before it ships

See developer risk, enforce policy, and prevent vulnerabilities across your software development lifecycle.

Book a demo