Skip to main content
QUICK REVIEW

[논문 리뷰] Vulseye: Detect Smart Contract Vulnerabilities via Stateful Directed Graybox Fuzzing

Ruichao Liang, Jing Chen|arXiv (Cornell University)|2024. 08. 19.
Imbalanced Data Classification TechniquesComputer Science인용 수 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를 평가하고 SOTA 퍼저와 비교한다.

제안 방법

  • Solidity를 중간 표현(IR)로 변환하고 패턴 매칭을 통해 Code Targets를 찾기 위해 정적 코드 분석을 수행한다.
  • 계약 CFG에 대한 역분석을 수행하여 상태 제약 해결을 통해 State Targets를 도출한다.
  • 취약 경로를 위한 상태 제약 도출을 위한 역분석 기반 프로세스를 개발한다(Algorithms 2 and 3).
  • 코드 거리와 상태 거리를 결합하여 seed 스케줄링을 안내하는 새로운 피트니스 지표를 정의한다(Equations 1-9).
  • 퍼징 루프에서 seed 초기화, 교차, 돌연변이 및 피트니스 지표에 의해 안내되는 취약성 탐지를 포함하는 유전 알고리즘을 사용한다.
  • 분석을 위해 지속 상태 저장이 가능한 추적을 수집하고 계약을 실행하기 위해 py-evm을 계측한다.
Figure 2: Overview of Vulseye .
Figure 2: Overview of Vulseye .

실험 결과

연구 질문

  • RQ1코드 대상과 상태 대상을 어떻게 식별하여 스마트 계약의 상태지향적 방향성 퍼징을 가능하게 할 수 있는가?
  • RQ2바이트코드의 역분석이 취약점을 악용하는 데 필요한 계약 상태를 효과적으로 규정할 수 있는가?
  • RQ3코드 및 상태 피드백의 통합이 기존 퍼저와 비교하여 취약점 탐지의 효율성과 효과를 향상시키는가?
  • RQ4대규모 이더리움 스마트 계약 데이터세트에서 Vulseye의 실세계 취약점 탐지 능력은 어떤가?

주요 결과

  • Vulseye는 42,738개의 실제 스마트 계약에서 4,845개의 취약점을 발견하여, 최첨단 도구를 최대 9.7× 앞질렀다.
  • Vulseye는 벤치마크 대비 테스트 대상에 최대 8.4× 빠르게 도달한다.
  • 상위 50개 이더리움 DApp에서 이 전에 알려지지 않은 11개의 취약점을 식별했고, 약 250만 달러에 해당한다.
  • 이 방법은 코드 타깃과 상태 타깃 피드백을 결합하여 상태 기반 퍼징을 추진하고 무해한 코드/상태 영역의 탐색을 줄인다.
  • 이 방법은 새로운 피트니스 지표와 seed 스케줄링을 통합하여 취약점 악용 가능성이 높은 입력을 우선시한다.
Figure 3: Example for State Identification.
Figure 3: Example for State Identification.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.