Polymorphic Web Code Caching via Intermediate Representation Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing web content delivery systems face challenges in efficiently managing and securing web page code, leading to increased load on servers and latency, as repeated requests for static content can burden networks and result in malware exploitation opportunities.
Innovation Solution
Implementing an intermediary system that analyzes and re-codes web page code into polymorphic forms, using intermediate representations like DOMs and ASTs, to create a 'moving target' for malware while reducing computational expenses by caching analyzed content and selectively re-analyzing changed portions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If web page code is re-coded for each request to prevent malware exploitation, then security is improved, but server load and processing time increase
Solution Approach 1:
The system performs code analysis and generates intermediate representations (DOMs, ASTs) in advance before requests are made. These pre-analyzed representations are stored and reused for subsequent requests, eliminating the need to re-analyze the entire codebase for each request while still maintaining security through polymorphic re-coding when needed.
Solution Approach 2:
The system dynamically determines whether full re-coding is necessary by comparing intermediate representations of the web page code across requests. If the code structure has changed, full re-coding is performed; if unchanged, the pre-analyzed representation is reused. This dynamic approach optimizes the balance between security and server load.
2Manufacturing precision
If complete analysis of web page code is performed for each request to enable consistent re-coding, then re-coding accuracy is improved, but processing time and computational cost increase
Solution Approach 1:
The system performs complete code analysis once to generate intermediate representations (DOMs for HTML, ASTs for JavaScript and CSS), then stores these representations for reuse. This preliminary action eliminates the need to repeat expensive analysis for each request while maintaining re-coding accuracy through the use of these pre-generated representations.
Solution Approach 2:
The system creates intermediate representation copies (DOMs and ASTs) of the original web page code that can be reused across multiple requests. These copies capture the structural relationships and dependencies needed for accurate re-coding without requiring re-analysis of the original code, significantly reducing processing time while maintaining precision.
3Productivity
If static content is cached to reduce server load, then server load is reduced, but security against malware is weakened due to lack of code changes
Solution Approach 1:
The system applies polymorphic re-coding to cached content by dynamically changing code elements (such as function names, variable names, and other identifiers) while preserving the functional behavior. This creates a 'moving target' that appears different to malware each time it is served, maintaining security even though the content is being cached and reused across multiple requests.
Solution Approach 2:
The system changes specific parameters and identifiers within the code (such as renaming functions, variables, and attributes) while maintaining the overall structure and functionality. These parameter changes create polymorphic versions of the same content that are functionally equivalent but structurally different, preventing malware from reliably exploiting static code patterns.
Data Source
AI summary
This document describes, among other things, a computer-implemented method that can include receiving, from a web server system, web page code to be provided over the internet to a computing device. The web page code can correspond to a particular web page served by the web server system. The method may include generating an intermediate representation of at least a portion of the web page code, and comparing the intermediate representation to a prior intermediate representation of the particular web page. Based on a result of the comparison, the method can include determining what portion of the web page code to analyze for re-coding of the web page code before serving the web page code to the computing device.


