Final Challenge: The Complete Ultimate Filter
This is the final and most comprehensive XSS filter challenge! The filter now blocks 12 case variations of 'script' plus 'img', 'image', 'svg', 'audio', and 'video' tags.
str_replace(array('script','Script','sCript',...,'video'), '', $_GET['lname'])
Objective: Bypass the complete ultimate filter and execute a JavaScript alert.
Critical Note: Only the Last Name field is now filtered and displayed. The First Name field is unfiltered but not used in output.
if(isset($_GET["fname"]) && isset($_GET["lname"])){
$arr = array('script','Script','sCript','scRipt',
'scrIpt','scriPt','scripT','SCript',
'SCRipt','SCRIpt','SCRIPt','SCRIPT',
'img','image','svg','audio','video');
$re = str_replace($arr, '', $_GET['lname']);
echo $re;
}
body, iframe, object, embed, link, meta, base, form, input, button, select, textarea, source, track, canvas, details, summary, marquee (deprecated but works)onload, onerror, onclick, onmouseover, onfocus, onblur, onchange, onsubmit, onreset, onselect, onabort, oncanplay, oncanplaythrough, ondurationchange, onemptied, onended, onloadeddata, onloadedmetadata, onloadstart, onpause, onplay, onplaying, onprogress, onratechange, onseeked, onseeking, onstalled, onsuspend, ontimeupdate, onvolumechange, onwaiting<body onload=alert(1)><a href="javascript:alert(1)">click</a><template> with event handlersThis challenge represents the absolute maximum in blacklist filtering:
Successfully bypassing this filter proves:
You've reached the absolute final challenge in the XSS filter bypass series! This is the maximum complexity.