Polymorphic Web Code Caching via Intermediate Representation Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
ImprovesecurityVSAvoidserver load
Core Design Contradiction:
ReliabilityVSProductivity

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #15Dynamics

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

Engineering Contradiction:
Improvere-coding accuracyVSAvoidprocessing time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #26Copying

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

Engineering Contradiction:
Improveserver loadVSAvoidsecurity
Core Design Contradiction:
ProductivityVSReliability

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10554777B1Caching for re-coding techniques
Publication Date: 2020.02.04 SHAPE SECURITY INC
  • US10554777B1 patent drawing
  • US10554777B1 patent drawing
  • US10554777B1 patent drawing

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.