Grigorios Ntousakis, "Applying dynamic coarse-grained library interposition to security", Master Thesis, School of Electrical and Computer Engineering, Technical University of Crete, Chania, Greece, 2024
https://doi.org/10.26233/heallink.tuc.99671
In today's complex software landscape, developers face the challenge of building complex systems that meet the growing demands of users and businesses. A common approach to analyzing, detecting problems, and solving security problems in these systems is the use of dynamic interposition. Dynamic interposition involves adding new functionality between existing software interfaces to extend the system, while preserving old functionality. An effective dynamic interposition technique is module recontextualization, which operates at the module or library level in modern dynamic languages, like JavaScript and Racket. Module recontextualization leverages run-time module loading to apply lightweight code transformations that insert analysis code at module boundaries, capturing interactions around the module. This provides a low overhead, always-on analysis approach compared to instruction-level or procedure-level techniques. This thesis presents several applications of the module-level dynamic interposition approach to demonstrate its versatility and practical value for program monitoring, analysis, and security tasks. The work includes two large-scale studies of the Node.js ecosystem, a dynamic enforcement engine for language policies, a system to secure native add-ons, and a combined static and dynamic analysis framework. The goal is to show how this module-level interposition technique can enable practical program analysis and security for complex applications.