Patent ID: 8413239

Claim:
A system for improving web security, comprising: a computer server comprising a content injection service in a cloud external to network edges of a system, the content injection service comprising instructions executable by the server, and in response to such execution causes the server to: receive a web request from a client within the system, wherein all data destined for or received by a user traverses the content injection service in the cloud, identify a potential threat comprising one of a malicious function and malicious data included in a response to the web request or preemptively anticipate such a threat, determine an appropriate counter of a plurality of countermeasures for the potential threat, wherein the countermeasures comprise blocking the malicious function, blocking malicious content, injecting warning messages, identifying malicious page formatting, performing a set of checks on the response, predefining a set of expressions that correspond to a threat, and adding default content into the response for providing security to the client, and inject content selected to embody the counter, at a selected location in the response, wherein if the counter is designed to override the malicious function, the selected location is at a beginning of the response, and if the counter is to search and identify the malicious data, the selected location is towards an end of the response after all response data is available for inspection.