Skip to main content
QUICK REVIEW

[論文レビュー] Vulseye: Detect Smart Contract Vulnerabilities via Stateful Directed Graybox Fuzzing

Ruichao Liang, Jing Chen|arXiv (Cornell University)|Aug 19, 2024
Imbalanced Data Classification Techniques被引用数 7
ひとこと要約

Vulseye は、脆弱なコード領域とコントラクト状態を対象とする状態を保持した指向グレイボックスファザーで、脆弱性発見と効率性の点でSOTAファザーを上回る。

ABSTRACT

Smart contracts, the cornerstone of decentralized applications, have become increasingly prominent in revolutionizing the digital landscape. However, vulnerabilities in smart contracts pose great risks to user assets and undermine overall trust in decentralized systems. But current smart contract fuzzers fall short of expectations in testing efficiency for two primary reasons. Firstly, smart contracts are stateful programs, and existing approaches, primarily coverage-guided, lack effective feedback from the contract state. Consequently, they struggle to effectively explore the contract state space. Secondly, coverage-guided fuzzers, aiming for comprehensive program coverage, may lead to a wastage of testing resources on benign code areas. This wastage worsens in smart contract testing, as the mix of code and state spaces further complicates comprehensive testing. To address these challenges, we propose Vulseye, a stateful directed graybox fuzzer for smart contracts guided by vulnerabilities. Different from prior works, Vulseye achieves stateful directed fuzzing by prioritizing testing resources to code areas and contract states that are more prone to vulnerabilities. We introduce Code Targets and State Targets into fuzzing loops as the testing targets of Vulseye. We use static analysis and pattern matching to pinpoint Code Targets, and propose a scalable backward analysis algorithm to specify State Targets. We design a novel fitness metric that leverages feedback from both the contract code space and state space, directing fuzzing toward these targets. With the guidance of code and state targets, Vulseye alleviates the wastage of testing resources on benign code areas and achieves effective stateful fuzzing. In comparison with state-of-the-art fuzzers, Vulseye demonstrated superior effectiveness and efficiency.

研究の動機と目的

  • 静的解析とパターンマッチングを用いてスマートコントラクトの脆弱なコード領域を特定する。
  • バイトコードの逆解析を通じて脆弱性を悪用するために必要な重要なコントラクト状態を特定する。
  • コードと状態ターゲットを同時に考慮する適合度誘導型ファジングループを開発する。
  • 脆弱性発見の効率を改善するため、コードと状態ターゲットへのファジング資源を優先する。
  • 実世界データセットに対して Vulseye を評価し、最先端のファザーと比較する。

提案手法

  • Solidity を中間表現(IR)に変換し、パターンマッチングによってコードターゲットを特定するために静的コード解析を実施する。
  • コントラクト CFG に対して逆解析を行い、状態制約を解くことで State Targets を導出する。
  • 逆解析ベースのプロセスを開発し、脆弱性パスのための状態制約を導出する(アルゴリズム 2 および 3)。
  • コード距離と状態距離を組み合わせた新しい適合度指標を定義し、シード割り当てを導く(式 1–式 9)。
  • 適合度指標に guided されたシード初期化、交叉、変異、脆弱性検出を含むファジングループで遺伝的アルゴリズムを使用する。
  • 分析のために持続的状態ストレージを用いてトレースを収集するよう py-evm を組み込む。
Figure 2: Overview of Vulseye .
Figure 2: Overview of Vulseye .

実験結果

リサーチクエスチョン

  • RQ1コードターゲットと状態ターゲットをどのように同定して、スマートコントラクトの状態遷移を前提とした指向ファジングを可能にするか?
  • RQ2バイトコードの逆解析は、脆弱性を悪用するのに必要なコントラクト状態を効果的に特定できるか?
  • RQ3コードと状態のフィードバックを統合することは、既存のファザーと比較して脆弱性検出の効率と効果を向上させるか?
  • RQ4大規模な Ethereum スマートコントラクトデータセットに対する Vulseye の実世界での脆弱性発見能力はどうか?

主な発見

  • Vulseye は 42,738 件の実世界スマートコントラクトから 4,845 件の脆弱性を発見し、SOTAツールを最大で 9.7× 上回った。
  • Vulseye はテストターゲットに対する到達速度がベースラインより最大 8.4×速い。
  • 上位 50 の Ethereum DApps で11件の未知の脆弱性を特定し、約 2.5 百万 USD に達する。
  • このアプローチはコードターゲットと状態ターゲットのフィードバックを組み合わせて状態遷移を伴うファジングを推進し、無害なコード/状態領域の探索を削減する。
  • この手法は新しい適合度指標とシード割り当てを統合し、脆弱性の悪用が有望な入力を優先するようにする。
Figure 3: Example for State Identification.
Figure 3: Example for State Identification.

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。