Skip to content
Free planNo credit card requiredStart writing

article · PolyU Institutional Research Archive (Hong Kong Polytechnic University) · 2023

BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts

Peilin Zheng, Xiapu Luo, Zibin Zheng

Cited by 6Open access

Abstract

Supporting the most popular cryptocurrency, the Bitcoin platform allows its transactions to be programmable via its scripts. Defects in Bitcoin scripts will make users lose their bitcoins. However, there are few studies on the defects of Bitcoin scripts. In this paper, we conduct the first systematic investigation on the defects of Bitcoin scripts through three steps, including defect definition, defect detection, and exploitation tracing. First, we define six typical defects of scripts in Bitcoin history, namely unbinded-txid, simple-key, useless-sig, uncertain-sig, impossible-key, and never-true. Three are inspired by the community, and three are new from us. Second, we develop a tool to discover Bitcoin scripts with any of typical defects based on symbolic execution and enhanced by historical exact scripts. By analyzing all Bitcoin transactions from Oct. 2009 to Aug. 2022, we find that 383,544 transaction outputs are paid to the Bitcoin scripts with defects. The total amount of them is 3,115.43 BTC, which is around 60 million dollars at present. Third, in order to trace the exploitation of the defects, we instrument the Bitcoin VM to record the traces of the real-world spending transactions of the buggy scripts. We find that 84,130 output scripts are exploited. The implementation and non-harmful datasets are released.

Cite this paper

APA 7

Zheng, P., Luo, X., & Zheng, Z. (2023). BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts. PolyU Institutional Research Archive (Hong Kong Polytechnic University), 307–318. https://doi.org/10.1109/icse48619.2023.00037

MLA 9

Zheng, Peilin, et al. “BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts.” PolyU Institutional Research Archive (Hong Kong Polytechnic University), 2023, pp. 307–18, https://doi.org/10.1109/icse48619.2023.00037.

Chicago

Zheng, Peilin, Xiapu Luo, and Zibin Zheng. 2023. “BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts.” PolyU Institutional Research Archive (Hong Kong Polytechnic University): 307–18. https://doi.org/10.1109/icse48619.2023.00037.

Harvard

Zheng, P., Luo, X. and Zheng, Z. (2023) ‘BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts’, PolyU Institutional Research Archive (Hong Kong Polytechnic University), pp. 307–318. Available at: https://doi.org/10.1109/icse48619.2023.00037.

BibTeX
@article{zheng2023bshunter,
  title = {{BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts}},
  author = {Zheng, Peilin and Luo, Xiapu and Zheng, Zibin},
  journal = {PolyU Institutional Research Archive (Hong Kong Polytechnic University)},
  pages = {307--318},
  year = {2023},
  doi = {10.1109/icse48619.2023.00037}
}

Made from the index record. Check names, capitalisation and page numbers against the paper. Need another style? AI for Research has over 10,000.

Tracing Paper

Emily F. Henderson · Palgrave studies in gender and education · 2015

Cited by 0