×

Detecting code injection attacks against databases

  • US 7,444,331 B1
  • Filed: 03/02/2005
  • Issued: 10/28/2008
  • Est. Priority Date: 03/02/2005
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method of determining whether an incoming database query represented in a query language is malicious, comprising:

  • representing the incoming database query as an ordered set of tokens;

    representing a plurality of template queries as ordered sets of tokens;

    comparing the ordered set of tokens representing the incoming database query with the ordered sets of tokens representing the template queries;

    identifying a template query of the plurality of template queries that is similar to the incoming database query, the similar template query being represented as an ordered set of tokens;

    identifying a portion of the ordered set of tokens representing the incoming database query not found in the ordered set of tokens representing the similar template query as an extra token;

    determining if all of the tokens in the set of tokens representing the similar template query are in the same order as the set of tokens representing the incoming database query and if the extra token has meaning in the query language;

    declaring the incoming query malicious if all of the tokens in the set of tokens representing the similar template query are in the same order as the set of tokens representing the incoming database query, if the set of tokens representing the incoming database query includes the extra token not found in the set of tokens representing the similar template query, and if the extra token has meaning in the query language;

    declaring the incoming database query anomalous if the extra token does not have meaning in the query language; and

    reporting the result of the declaration.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×