Tainted Value Cache for Java Command Injection Protection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing command-injection protection techniques for Java applications, such as bytecode-level and library-level instrumentation, face challenges including instability, bugs, and widespread commercial unadoptability due to the need for modifying core Java API classes or libraries, making them infeasible for real-world applications.

Innovation Solution

A garbage-collected tainted-value-cache system operates with the JVM's garbage collector, intercepting and testing untrusted input data without modifying the JVM or Java API class libraries, reducing the risk of command-injection vulnerabilities by creating a tainted value cache and implementing security actions when malicious data is detected.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If bytecode-level or library-level instrumentation is used to implement command-injection protection, then security protection capability is improved, but system stability deteriorates due to bugs and instability in modified JVM or Java API classes

Engineering Contradiction:
Improvecommand-injection protection capabilityVSAvoidJVM or Java API class library stability
Core Design Contradiction:
ReliabilityVSStability of the object's composition

Solution Approach 1:

The patent introduces a proxy class mechanism that acts as an intermediary between untrusted input sources and sensitive Java API methods. The proxy class intercepts method invocations, validates inputs against tainted data, and only allows safe operations to proceed. This mediator approach provides security protection without directly modifying or injecting code into the core JVM or Java API classes, thereby maintaining their stability while still achieving command-injection prevention.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If bytecode-level instrumentation is used to protect against command injection, then security protection is improved, but ease of operation deteriorates due to complexity in modifying and maintaining instrumented code

Engineering Contradiction:
Improvecommand-injection protectionVSAvoidapplication deployment and maintenance simplicity
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent performs security validation actions in advance by creating a proxy class that pre-establishes validation rules and interception logic before the application runs. The proxy class is configured with knowledge of which methods are sensitive and what constitutes tainted data, allowing security checks to be performed automatically without requiring runtime modification or complex instrumentation setup. This preliminary configuration simplifies deployment while maintaining strong security protection.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If core Java API classes are modified to implement taint tracking, then command-injection protection is improved, but adaptability deteriorates because the solution becomes tied to specific JVM implementations

Engineering Contradiction:
Improvecommand-injection protection capabilityVSAvoidcompatibility with different JVM implementations
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

Instead of modifying the core Java API classes to add security functionality, the patent inverts the approach by creating a separate proxy class that wraps and intercepts calls to these API methods. The proxy class contains the security logic and validation rules, while the original Java API classes remain completely unmodified. This inversion allows the solution to work with any standard Java implementation without requiring changes to the underlying JVM or API libraries, thereby maintaining full adaptability and compatibility.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentEP3164827B1Command injection protection for JAVA applications
Publication Date: 2021.09.01 WARATEK LTD
  • EP3164827B1 patent drawingFigure 1
  • EP3164827B1 patent drawingFigure 2
  • EP3164827B1 patent drawingFigure 3

AI summary

A method of enhancing secure operation of a computer is disclosed. The computer receives input data from one us to source and also operates an application program which can utilise the input data. The method involves creating a tainted value cache and storing the input data in that cache. In the event that the application program invokes a method which utilises data from the cache, then that data is intercepted before it is utilised by the application program. The intercepted data is subjected to a data content test. If the intercepted data passes the data content test, then the intercepted data is forwarded to the application program to be utilised thereby. However, if the intercepted data fails the data content test, a security action is implemented.