Research Article

Exploitation and prevention of Python prototype chain pollution

Zhang Qingyun*
Beijing University of Posts and Telecommunications

* Corresponding author: [email protected]

Abstract

As more and more enterprises and organizations migrate their business infrastructure to the internet, the significance of software security vulnerabilities becomes increasingly prominent. Python, as a flexible and efficient programming language, plays a crucial role in web application development. Consequently, research on its security is imperative. In recent years, researchers have explored Python prototype chain pollution vulnerabilities. This paper aims to further investigate the exploitation of prototype chain pollution in Python and provide an explanation of pollution prevention. The paper will introduce the working principles of the prototype chain, attack scenarios, and analyze the exploitation of prototype chain pollution in Python using experimental samples. Finally, the article will propose two possible defense measures to assist developers in better mitigating potential development risks and safeguarding cyberspace security.

Keywords: Prototype Chain; Prototype Chain Pollution; Reflection; Dynamic Pollution Analysis; Fuzz Testing
Published: February 26, 2024
DOI: 10.54254/2755-2721/43/20230839
Volume: ACE Vol.43
pp. 229-236
Download PDF

References

  1. Shcherbakov, Mikhail, Musard Balliu, and Cristian-Alexandru Staicu. “Silent spring: Prototype pollution leads to remote code execution in Node. js.” USENIX Security Symposium 2023. 2023.
  2. Python Software Foundation. “Python.org.” Python.org, https://www.python.org/. Accessed 9 October 2023.
  3. Mozilla. “JavaScript.” Mozilla Developer Network, https://developer.mozilla.org/en-US/docs/Web/JavaScript. Accessed 9 October 2023.
  4. Clause, James, Wanchun Li, and Alessandro Orso. “Dytan: a generic dynamic taint analysis framework.” Proceedings of the 2007 international symposium on Software testing and analysis. 2007.
  5. Li, Jun, Bodong Zhao, and Chao Zhang. “Fuzzing: a survey.” Cybersecurity 1.1 (2018): 1-13.
  6. Arteau, Olivier. “Prototype pollution attack in nodejs application.” (2018).
  7. Ouyang, Ziyi. “Research and Explore of Prototype Pollution Attack in Python.” 2023 3rd Asia-Pacific Conference on Communications Technology and Computer Science (ACCTCS). IEEE, 2023.
  8. Tripp, Omer, et al. “TAJ: effective taint analysis of web applications.” ACM Sigplan Notices 44.6 (2009): 87-97.
  9. Ganesh, Vijay, Tim Leek, and Martin Rinard. “Taint-based directed whitebox fuzzing.” 2009 IEEE 31st International Conference on Software Engineering. IEEE, 2009.
  10. Schwarz, Michael, Moritz Lipp, and Daniel Gruss. “JavaScript Zero: Real JavaScript and Zero Side-Channel Attacks.” NDSS. Vol. 18. 2018.