流行 DeFi 项目基础安全风险分析

币圈资讯 阅读:37 2024-04-22 11:50:18 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

By: 山哥&Mr.A@慢雾安全团队

背景

近年来 DeFi 项目快速增长,引领了一场金融创新的革命。DeFi 项目利用区块链技术提供去中心化的金融服务,如借贷、交易、资产管理等,使用户能够直接交互而无需传统金融中介。

但由于 DeFi 项目存在一定的资金规模和用户基础,也成了黑客潜在的攻击目标,很多项目方认为 DeFi 安全就是合约安全,这是一个较错误的认知,因为 DeFi 同样包含域名、服务器等信息。

鉴于此,各种钓鱼诈骗团伙随之而来,比较特别的是利用社会工程学攻击的 Angel Drainer,今年来,该钓鱼团伙已对 DeFi 项目方如 Balancer, Galxe, Frax Finance, VelodromeFi, Aerodrome.Finance 发起过攻击。Angel Drainer 通过对项目方 DNS 的接管实现劫持域名,在前端注入恶意 js 代码,骗取用户签名,最终达到盗取资产的目的。

在此背景下,本篇文章旨在评估和分析 DefiLlama 排行榜上 DeFi 项目的基础安全风险。DefiLlama 作为一个提供 DeFi 项目数据和排名的平台,其排行榜上的项目代表了市场上最受关注和广泛使用的 DeFi 服务。

测试项目及方法

首先,我们根据 DefiLlama 的排名将项目分为排名前 50、前 100、前 200、前 500、前 3000 的不同范围来进行统计。主要采集每个项目对应域名的 DNSSEC 相关信息、域名 whois 信息、CDN 信息、源 IP 暴露情况进行分析。

DNSSEC 安全问题

DNSSEC (Domain Name System Security Extensions) 是一种用于增强域名系统(DNS) 安全性的技术扩展,其主要作用是提供一种机制,以确保 DNS 查询的数据完整性、真实性和认证性。以下是 DNSSEC 的主要作用:

1. 数据完整性:DNSSEC 通过使用数字签名技术对 DNS 数据进行签名,确保在数据传输过程中没有被篡改。这可以防止恶意攻击者篡改 DNS 响应,将用户重定向到恶意网站或劫持网络流量。

2. 数据真实性和认证:DNSSEC 能够验证 DNS 响应的真实性,确保数据来自权威 DNS 服务器,而不是恶意 DNS 服务器。这有助于防止 DNS 欺诈攻击,其中攻击者试图伪造 DNS 响应以欺骗用户。

3. 抵御缓存投毒攻击:DNSSEC 可以防止缓存投毒攻击,即防止攻击者向 DNS 缓存中插入虚假的 DNS 记录,导致用户被引导到恶意网站。通过数字签名验证,DNSSEC 可以检测和拒绝虚假的 DNS 记录。

4. 增强 DNS 安全性:DNS 是互联网的关键基础设施之一,许多网络活动都依赖于 DNS。DNSSEC 的使用可以提高整个互联网的安全性,减少恶意攻击的成功率,从而增强用户和组织的网络安全。

总之,DNSSEC 的作用是通过数字签名和验证机制来加强 DNS 的安全性,确保 DNS 查询的数据完整性和真实性。特别是 DNSSEC 开启后,允许验证域名的权威 DNS 服务器是否真实,减少了域名劫持和 DNS 欺诈的风险,有助于提高互联网的整体安全性和可信度。


本测试中通过脚本及第三方检测网站如 https://domsignal.com/ 进行 DNSSEC 的安全分析,检测项目域名的 DNSKEY 是否正确配置、RRSIG 是否有效等,样例如下:

域名注册服务商安全问题

域名注册服务商负责注册和管理域名。其安全措施包括保护用户账户免遭未授权访问,防止域名被恶意转移或更改,以及确保域名注册数据的安全。一个安全的域名注册服务商通常会提供双因素认证、定期的安全审计和强大的隐私保护功能。

使用不安全的域名服务商可能会导致多种 DNS 安全问题,其中一些主要问题包括:

1. DNS 劫持:不安全的域名服务商可能容易受到 DNS 劫持攻击,攻击者可以篡改 DNS 响应,将用户重定向到恶意网站。这可能导致用户被欺骗,暴露于网络钓鱼、恶意软件或其他恶意活动的风险中。

2. DNS 缓存投毒:攻击者可以通过向不安全的域名服务商提供虚假的 DNS 记录来进行缓存投毒攻击。这会导致不安全的 DNS 服务器将虚假数据缓存在其 DNS 缓存中,从而影响广泛的用户并引导他们到恶意网站。

3. 数据篡改:不安全的域名服务商可能容易受到中间人攻击,攻击者可以在 DNS 查询的传输过程中篡改数据,从而导致用户接收到虚假的 DNS 响应。这可能导致用户连接到错误的服务器或暴露于恶意网站的风险中。

4. 服务不可用:如果不安全的域名服务商受到分布式拒绝服务(DDoS) 攻击或其他网络攻击,其 DNS 服务器可能会变得不可用,导致网站和在线服务不可访问。

5. 缺乏 DNSSEC 支持:不安全的域名服务商可能不提供 DNSSEC 支持,这将增加 DNS 查询的不安全性,使得用户更容易受到 DNS 欺诈和其他攻击的影响。

总之,使用不安全的域名服务商可能会导致 DNS 安全性问题,从而暴露用户和组织于各种网络威胁中。因此,选择可信赖的、提供强大安全性措施(如 DNSSEC 支持)的域名服务商对于保护域名和网络安全至关重要。DeFi 项目方应仔细评估和选择域名服务商,以确保其提供的服务是安全可靠的。

本测试通过使用 https://www.godaddy.com/whois 等 whois 服务商进行域名查询,采集项目域名对应的 Register 及目前的 Name Server,样例如下:

CDN 及流量防护安全问题

内容分发网络(CDN) 是一种优化网站性能和安全性的服务,通过在全球多个节点分发网站内容,减少延迟并提高访问速度。CDN 的安全措施包括对抗分布式拒绝服务(DDoS) 攻击、网站应用防火墙保护、以及 HTTPS 支持,保障数据传输过程中的安全和加密。

不安全的内容分发网络(CDN) 厂商可能会带来多种安全风险,其中一些主要风险包括:

1. 数据泄露:不安全的 CDN 厂商可能不足以保护托管在其服务器上的数据。这可能导致敏感信息泄露,例如客户数据、登录凭据或敏感文档。攻击者可以通过利用 CDN 的弱点来获取或窃取这些数据。

2. 中间人攻击:攻击者可能尝试在 CDN 和终端用户之间进行中间人攻击。这意味着攻击者可能会篡改或监视通过 CDN 传输的数据流量,以获取敏感信息或传播恶意内容。

3. 服务不可用:如果 CDN 厂商受到分布式拒绝服务(DDoS) 攻击或其他网络攻击,CDN 服务可能会中断,导致网站或应用程序无法访问。这会对业务可用性和性能造成严重影响。

4. 恶意内容传播:如果 CDN 厂商未采取足够的安全措施来验证和审核托管在其网络上的内容,恶意用户可能会滥用 CDN 来传播恶意软件、恶意脚本或其他有害内容。

5. 缺乏加密支持:不安全的 CDN 厂商可能未提供足够的加密支持,使数据传输容易受到窃听。这可能导致数据泄露和隐私问题。

6. 安全漏洞利用:攻击者可以利用不安全的 CDN 中的安全漏洞来入侵 CDN 网络并访问敏感数据或控制网络资源。

7. 法律和合规问题:某些 CDN 厂商可能位于不同的国家或司法管辖区,可能会涉及法律和合规问题。这可能导致数据隐私和合规方面的困扰。

为了降低这些风险,DeFi 项目方在选择 CDN 厂商时应仔细评估其安全性措施、隐私政策和合规性。选择具备良好安全记录和专门的安全团队的可信赖 CDN 厂商是确保数据和网络安全的重要步骤。

本测试获取项目域名对应的 IP 来对市面上主流的 CDN 如 Akamai, Azure cdn, Cloudflare, Cloudfront, Fastly, Google cloud cdn, Maxcdn 的使用情况进行统计。样例如下:

源 IP 暴露安全问题

源 IP 暴露是指攻击者能够识别出网站后端服务器的真实 IP 地址,从而绕过 CDN 或其他安全措施直接攻击服务器、绕过防火墙限制策略等问题。同时 Web 服务器的源 IP 暴露可能会导致以下安全问题:

1. 直接攻击:暴露的 IP 地址成为黑客直接攻击的目标,包括分布式拒绝服务(DDoS),这可能导致网站无法访问。

2. 安全漏洞利用:如果服务器软件存在已知漏洞,黑客可以利用这些漏洞入侵服务器。

3. 数据泄露风险:黑客可能通过暴露的 IP 访问敏感数据,导致数据泄露。

4. 网络钓鱼和欺诈:黑客可能伪造服务器身份,进行网络钓鱼或欺诈活动。

因此,保护 Web 服务器的源 IP 地址是维护网络安全的重要措施。为了保护源 IP 不被暴露,通常会采取隐藏真实 IP 地址的措施,如使用反向代理服务器、配置安全的 DNS 记录以及确保服务器的所有入口点都有适当的安全保护,这样可以减少直接针对源服务器的攻击风险。

本测试通过第三方服务尝试对使用 CDN 的域名进行绕过,以检测项目域名的源 IP 是否存在暴露情况,样例如下:

基于以上的测试,下面来统计分析下结果。

结果统计

DNSSEC 安全问题

部分结果:

DNSSEC 统计:

(数量分布)

(百分比分布)

域名注册服务商安全问题

部分结果:

域名注册商统计:

CDN 及流量防护安全问题

部分结果:

CDN 使用统计:

可以看到,全球第一的安全 CDN 厂商 Akamai 在 DeFi 行业的使用率基本为 0,DeFi 基础安全和安全意识的提升任重道远。

源 IP 暴露安全问题

部分结果:

暴露统计:

源 IP 暴露引发的安全问题不容忽视,就在 12 月 7 日,知名游戏项目 @XAI_GAMES 遭 DDoS 攻击,导致其官网不可用,同时,攻击者在该项目的 Discord 社区发布虚假官网,诱骗受害者访问欺诈网站,进行钓鱼攻击,导致大量受害者被骗,损失约 400 多个 ETH。因此,DeFi 项目方应重视保护 Web 服务器的源 IP 地址,减小直接针对源服务器的攻击风险。

总结

综合上面各方位的统计信息,我们可以清楚看到目前 DeFi 项目基础安全风险严峻,大量 DeFi 项目的配置是不安全的,存在被攻击风险。

通过本篇文章的分析,我们知道 DeFi 安全不仅仅是合约安全,安全是一个整体。慢雾安全团队发布的 Web3 项目安全实践要求(https://github.com/slowmist/Web3-Project-Security-Practice-Requirements) 和 Web3 行业供应链安全指南,均旨在指导与提醒 Web3 项目方注意全方位的安全措施;慢雾安全团队部署的 MistEye 安全监控系统,涵盖合约监控、前后端监控、漏洞发现预警等全方位信息,关注 DeFi 项目事前、事中、事后全流程安全,欢迎项目方使用 MistEye 安全监控系统把控风险,提高项目安全性。

鸣谢:@DefiLlama @censysio

参考链接:

https://www.akamai.com/blog/trends/dnssec-how-it-works-key-considerations

https://en.wikipedia.org/wiki/Domain_name

https://www.akamai.com/glossary/what-is-a-cdn


Background of Shan Ge Slow Fog Security Team In recent years, the rapid growth of the project has led to a revolution in financial innovation. The project uses blockchain technology to provide decentralized financial services, such as loan transaction asset management, so that users can interact directly without traditional financial intermediaries. However, due to the existence of a certain fund scale and user base, the project has also become a potential target for hackers. Many project parties think that security is contract security, which is a wrong cognition because it also contains information such as domain name servers. This kind of phishing fraud gang has followed, especially the attack by social engineering. This year, the phishing gang has attacked the project party, hijacked the domain name by taking over the project party, injected malicious code into the front end to defraud the user's signature, and finally achieved the purpose of stealing assets. Under this background, this article aims to evaluate and analyze the basic security risks of the projects on the leaderboard. As a platform to provide project data and ranking, the projects on the leaderboard represent the most concerned in the market. Note and widely used service testing items and methods First of all, we divide the items into different ranges according to the ranking, and make statistics. We mainly collect the relevant information of the domain name corresponding to each item, and analyze the exposure of the domain name information source. Security is a technical extension used to enhance the security of the domain name system. Its main function is to provide a mechanism to ensure the data integrity, authenticity and authentication of the query. The following are the main functions of data integrity through the use of numbers. Signature technology signs data to ensure that it has not been tampered with during data transmission, which can prevent malicious attackers from tampering with the response, redirecting users to malicious websites or hijacking network traffic, data authenticity and authentication can verify the authenticity of the response, and ensure that the data comes from authoritative servers instead of malicious servers, which helps to prevent fraudulent attacks, in which attackers try to forge responses to deceive users to resist cache poisoning attacks, which can prevent cache poisoning attacks, that is, prevent attackers from inserting them into the cache. False records lead users to be led to malicious websites, and false records can be detected and rejected through digital signature verification. Enhancing security is one of the key infrastructures of the Internet, and the use on which many network activities depend can improve the security of the whole Internet and reduce the success rate of malicious attacks, thus enhancing the network security of users and organizations. In short, the role is to enhance the security through digital signature and verification mechanism to ensure the integrity and authenticity of query data, especially after opening. Verifying whether the authoritative server of the domain name really reduces the risk of domain name hijacking and fraud is helpful to improve the overall security and credibility of the Internet. In this test, scripts and third-party detection websites are used to detect whether the project domain name is correctly configured and effective. Examples are as follows: domain name registrar security issues. Domain name registrars are responsible for registering and managing domain names, and their security measures include protecting user accounts from unauthorized access and preventing domain names from being maliciously transferred or changed. And to ensure the security of domain name registration data, a secure domain name registrar usually provides two-factor authentication, regular security audit and strong privacy protection function. Using an insecure domain name registrar may lead to a variety of security problems, some of which include hijacking an unsafe domain name registrar, which may be vulnerable to hijacking attacks. Attackers can tamper with the response and redirect users to malicious websites, which may lead users to be deceived and exposed to phishing malware or other malicious activities. Cache poisoning in the dynamic risk Attackers can carry out cache poisoning attacks by providing false records to unsafe domain name service providers, which will cause unsafe servers to cache false data in their caches, thus affecting a wide range of users and guiding them to malicious websites. Unsafe domain name service providers may be vulnerable to middleman attacks. Attackers can tamper with data during the transmission of queries, which may lead users to receive false responses. Wrong server or exposure to the risk of malicious websites, the service is unavailable. If an insecure domain name service provider is attacked by distributed denial of service or other network attacks, its server may become unavailable, resulting in inaccessible websites and online services, lack of support, and the insecure domain name service provider may not provide support, which will increase the insecurity of the query and make users more vulnerable to fraud and other attacks. In short, the use of insecure domain name service providers may lead to security problems. Exposing users and organizations to various network threats, it is very important to choose reliable domain name service providers that provide strong security measures, such as support, to protect domain names and network security. The project party should carefully evaluate and select domain name service providers to ensure that the services they provide are safe and reliable. This test collects the corresponding and current examples of project domain names by using such service providers as follows: Traffic protection and security issues. Content distribution network is a service to optimize the performance and security of the website. Security measures to reduce delay and improve access speed by distributing website content at multiple nodes around the world include resisting distributed denial of service attacks, applying firewall protection to websites, and supporting content distribution network vendors with insecure data transmission and encryption, which may bring various security risks, some of which include data leakage. Unsafe vendors may not be able to protect the data hosted on their servers, which may lead to the disclosure of sensitive information such as customer data. Login credentials or sensitive documents can be used by attackers to obtain or steal these data. Man-in-the-middle attack attackers may try to carry out man-in-the-middle attacks with end users, which means that attackers may tamper with or monitor the transmitted data traffic to obtain sensitive information or spread malicious content. Services are unavailable. If vendors are attacked by distributed denial of service or other network attacks, services may be interrupted, resulting in inaccessible websites or applications, which will be available for business. And if vendors do not take adequate security measures to verify and audit the content hosted on their networks, malicious users may abuse it to spread malicious software, malicious scripts or other harmful content. Unsafe vendors may not provide sufficient encryption support to make data transmission vulnerable to eavesdropping, which may lead to data leakage and privacy problems. Security vulnerabilities can be exploited by attackers to invade the network and access sensitive data or control network resources. Legal and compliance issues some vendors may be located in different countries or jurisdictions. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=62484

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友