2007年6月3日星期日

[Tips]Image Upload XSS

by axis
2007-06-04
www.ph4nt0m.org

今天在ha.ckers.org看到了一个小技巧,关于图片上传处跨站的。

原文地址是:http://ha.ckers.org/blog/20070603/image-upload-xss/

引用原文中的例子

an example of something you might test for:

<IMG SRC="$filename">

So you upload this file:

http://ha.ckers.org/image-xss/"onerror="alert('XSS')"a=".jpg

This ends up making the page look like:

<IMG SRC=""onerror="alert('XSS')"a=".jpg">


简单来说,就是如果图片的文件名没有检查的话,也是会造成跨站的,我想很多程序员都会忽略这里吧!

需要注意的是,在windows下是不允许输入双引号的,但是linux下可以。类似的还有一些其他字符。

在windows下利用时,可以直接构造数据包提交,同时也要注意服务器是否对非法文件名的字符过滤。

2 条评论:

products 说...

China Wholesale has been described as the world’s factory. This phenomenom is typified by the rise ofbusiness. Incredible range of products available with China Wholesalers “Low Price and High Quality” not only reaches directly to their target clients worldwide but also ensures that wholesale from china from China means margins you cannot find elsewhere and buy products wholesaleChina Wholesale will skyroket your profits.wedding dressescheap naruto cosplayanime cosplaycheap Gemstone Jewelry

products 说...

Women’s nike tn Shox Rivalry est le modèle féminin le plus tendance de baskets pour le sport. tn chaussuresConcernant la semelle :spyder jacketsCheap Brand Jeans Shop - True Religion Jeans cheap nike shox & Puma Shoes Online- tn nike,Diesel Jeans le caoutchouc extérieur, l’EVA intermédiaire Levis Jeanset le textile intérieur s’associent pour attribuer à la.ed hardy shirts pretty fitCharlestoncheap columbia jackets. turned a pair of double plays to do the trick.Lacoste Polo Shirts, puma basket, Burberry Polo Shirts.wholesale Lacoste polo shirts and cheap polo shirtswith great price.Thank you so much!!cheap polo shirts men'ssweate,gillette mach3 razor bladesfor men.As for Cheap Evisu JeansCheap Armani Jeanspolo shirtsPuma shoes