Command injection protection for java applications
Abstract
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 utilize 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 utilizes data from the cache, then that data is intercepted before it is utilized 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 utilized thereby. However, if the intercepted data fails the data content test, a security action is implemented.
Claims
exact text as granted — not AI-modified1 .- 11 . (canceled)
12 . A method of enhancing secure operation of a computer which receives input data from an untrusted source, and which operates an application program which can utilize said input data, said method comprising the steps of:
creating a tainted value cache, storing in said cache said input data to create stored data and without passing said stored data to said application program for utilization, if said application program invokes a method which utilizes stored data from said cache, intercepting said stored data before it is utilized by said application program to create intercepted data and subjecting the intercepted data to a data content test, if said intercepted data passes said data content test, forwarding said intercepted data to said application program for utilization, and if said intercepted data fails said data content test, implementing a security action.
13 . The method as defined in claim 12 wherein said data content test comprises searching for code indicating characters, said code indicating characters being permissible characters other than alpha-numeric characters.
14 . The method as defined in claim 12 wherein prior to storing said input data in said cache, said input data is subject to a data character test and, if said data character test is passed, sending said passed data to said application program without storing said passed data in said tainted value cache.
15 . The method as defined in claim 14 wherein said data character test comprises a test to see if said input data comprises only numerical data.
16 . The method as defined in claim 14 wherein said data character test comprises a test to see if said input data comprises only alphabetical data.
17 . The method as defined in claim 14 wherein said data character test comprises a test to see if said input data comprises only alphabetical data or numerical data.
18 . The method as defined in claim 12 wherein each input value stored in said tainted value cache has a corresponding encapsulating weak reference, and said weak reference(s) is/are stored in a weak reference queue.
19 . The method as defined in claim 18 wherein weak references corresponding to data deleted from said tainted value cache are also deleted from said weak reference queue.
20 . The method as defined in claim 12 wherein if said application program invokes a source method, the values returned to said source method are stored in said tainted value cache.
21 . The method as defined in claim 12 wherein said security action is selected from the class of security actions consisting of making a log entry, blocking execution of said application program, and shutting down said computer.
22 . The method as defined claim 12 wherein said tainted value cache is garbage collected memory.
23 . The method as defined in claim 12 wherein said input data received from said untrusted source comprises command injection data.
24 . The method as defined in claim 12 wherein if said application program invokes a source method, the values returned to said source method are treated as input data from an untrusted source.Join the waitlist — get patent alerts
Track US2018139234A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.