Closed csujedihy closed 8 years ago
Hi,
Not sure if there's an official taint example. I've attached a link to a simple Taint analysis I built using shadow values. Hopefully it's useful.
and an example that uses it
Good luck, Blake
cool, thx!
Not sure if I should reply here. I tried the example above. It cannot handle the cases when a tainted variable is used in for/while/if statements. See below an example:
var frm=document.querySelectorAll("form"); for (var i=0;i<frm.length;i++){ if(frm[i].addEventListener) { frm[i].addEventListener("submit", clk, false); } else { frm[i].attachEvent('onsubmit', clk); } }
if querySelectorAll
is marked as taint, the the result of i<frm.length
will return {shadow: true}
, not true
, so the for loop will continue for ever. Similar cases for while and if.
I want to do taint analysis using this amazing framework.