Two
injection flaws, XSS
and SQL Injection, are the low-hanging fruit of the web application orchard. A day or two reviewing vulnerability feeds grimly suggests that developers are still just realizing what this class of attack means, and that the attackers are, as usual, two steps ahead.
By and large, we view these weaknesses as "input validation errors." That kind of language has a distinguished academic history dating back as far as the early Nineties -- perhaps even earlier, though our records of those ancient times are fragmentary. I'd happily blather about the merits of those vulnerability
taxonomies for hours, but that won't cross the gulf between the academic and the practical.
So, let's unlearn what we have learned, at least briefly. We'll be able to avoid reinventing the input validation wheel, particularly that unending stream of broken or incomplete s/// perl-style substitution regexes. (I still see industry experts going so far as to label this a "best practice".) If thinking about "input validation" hasn't helped the typical developer, perhaps overtly ignoring it will.
I'll give a quick illustration of XSS and SQL Injection attacks portrayed as input validation flaws, and their proposed remediation, drawing from thoroughly unsurprising public mailing lists. I'll then hypnotize the audience, exploiting this suggestible state to implant general techniques and language-specific examples of injection flaw prevention.
|